Chapter 1. Introduction

The user interface (GUI) of XMLmind XML Editor is made of parts. Parts are high level building blocks such as menus, menu bars, tool bars, status bars, actions (for use in menus, tool bars and status bars), etc.

These parts are declared in a special GUI specification file having a .xxe_gui suffix. Such GUI specification files also contain a layout element which specifies which assembly of parts to use to create the user interface of XMLmind XML Editor.

Example (excerpts of DesktopApp.xxe_gui):

<?xml version='1.0' encoding='UTF-8'?>
<gui xmlns="http://www.xmlmind.com/xmleditor/schema/gui"
     xmlns:gui="http://www.xmlmind.com/xmleditor/schema/gui">
  ...
  <action name="newAction" label="_New..."1
          icon="icons/newAction.gif"
          accelerator="mod N">
    <class>com.xmlmind.xmleditapp.kit.part.NewAction</class>
  </action>
  ...
  <menu name="fileMenu" label="_File"2 
        helpId="fileMenu">
    <action name="newAction" />
    ...
    <menuItems name="recentFilesMenuItems" />
  </menu>
  ...
  <menuBar name="menuBar" helpId="menuBar">3
    <menu name="fileMenu" />
    <menu name="selectMenu" />
    ...
  </menuBar>
  ...
  <layout width="900" height="700">4
    <menuBar name="menuBar" />5
    ...
  </layout>
</gui>

1

Declares action "newAction".

2

Declares menu "fileMenu".

3

Declares menu bar "menuBar".

4

Element layout actually specifies which GUI to create.

5

It is menu bar "menuBar" which will be used in the GUI of XXE because it is referenced in the layout element.

Important

Declaring a part does not mean that this part will be created and then, displayed in the GUI of XXE. For this to happen, a part must be referenced directly or indirectly[1] by the layout element of the GUI specification file.

The archive file XXE_install_dir/bin/xxe.jar containing the code of XMLmind XML Editor (XXE for short), also contains a number of GUI specifications:

Resource /gui/DesktopApp.xxe_gui

Specifies the default user interface of the XMLmind XML Editor desktop application. By doing this, it also specifies the user interface parts which are common to all XMLmind XML Editor variants.

Resource /gui/WebStartedApp.xxe_gui

Specifies the user interface of XMLmind XML Editor when deployed using Java™ Web Start. This GUI is similar to the GUI of the desktop application, except that it has no OptionsInstall Add-ons and HelpCheck for Updates menu items.

Resource /gui/EmbeddedApp.xxe_gui

Specifies the user interface of XMLmind XML Editor when embedded in another application. This GUI is similar to the GUI of the Java Web Start-ed application, except that its FileQuit menu item does not invoke System.exit().

Resource /gui/SingleDocApp.xxe_gui

Specifies the user interface of an embeddable single document, single document view, XML editor panel.

Resource /gui/SingleDocApp2.xxe_gui

Same as SingleDocApp.xxe_gui, except that the tool bar has New, Open, Save, Save As, Print and Close buttons.

Resource /gui/MultiDocApp.xxe_gui

Specifies the user interface of an embeddable multi document, possibly multi view per document, XML editor frame.

A copy of these files is found in XXE_install_dir/doc/gui/gui/. This, because using DesktopApp.xxe_gui as a reference when creating custom GUIs for XXE is absolutely required.

If you are curious and want to see the effect of using SingleDocApp.xxe_gui, a GUI quite different from the standard GUI of the desktop application, please proceed as follows:

Windows
  1. Open a command prompt.

  2. Change working directory to the directory where XXE has been installed (typically C:\Program Files\XMLmind_XML_Editor\).

  3. Change to subdirectory bin\ where xxe.exe (and xxe-c.bat) are found.

  4. Set environment variable XXE_GUI as follows:

    C:\Program Files\XMLmind_XML_Editor\bin> set XXE_GUI=xxe-gui:SingleDocApp.xxe_gui
  5. Start XXE as follows:

    C:\Program Files\XMLmind_XML_Editor\bin> xxe.exe
  6. Drop an XML file onto the newly started XXE to open the corresponding document.

Linux, Mac (with bash)
  1. Open a terminal.

  2. Change working directory to the directory where XXE has been installed (example: /opt/xxe/).

  3. Change to subdirectory bin\ where the xxe shell script is found.

  4. Set environment variable XXE_GUI as follows[2]:

    /opt/xxe/bin$ XXE_GUI=xxe-gui:SingleDocApp.xxe_gui; export XXE_GUI
  5. Start XXE as follows:

    /opt/xxe/bin$ ./xxe &
  6. Drop an XML file onto the newly started XXE to open the corresponding document.

Don't worry, all this will be detailed in the deployment chapter of this document.



[1] Example: layout references a statusBar which references an action.

[2] Quicker, directly execute this:

/opt/xxe/bin$ XXE_GUI=xxe-gui:SingleDocApp.xxe_gui ./xxe &