Opening a Document

org.docx4all.ui.menu.FileMenu.openFile gets an instance of WordMLEditor then calls createInternalFrame(file).

org.docx4all.ui.main.WordMLEditor.createInternalFrame

JEditorPane editorView = createEditorView(f);

JPanel panel = FxScriptUIHelper.getInstance().createEditorPanel(editorView);

createEditorView(FileObject f) does, inter alia:

JEditorPane editorView = new WordMLTextPane();

WordMLEditorKit editorKit = (WordMLEditorKit) editorView.getEditorKit();

doc = editorKit.read(f);

org.docx4all.swing.text.WordMLEditorKit.read(FileObject f) returns a WordMLDocument object.

It does this by invoking ElementMLFactory.createDocumentML(f)

org.docx4all.xml.ElementMLFactory.createDocumentML(FileObject? f) returns a DocumentML object:

LoadFromVFSZipFile loader = new LoadFromVFSZipFile();

WordprocessingMLPackage wordMLPackage = (WordprocessingMLPackage)loader.getPackageFromFileObject(f);

return new DocumentML(wordMLPackage);

DocumentML is docx4all's internal representation of the docx document.