Customizing Marvin GUI

    The Customization document demonstrates an easy, interactive way of GUI personalization.

    This document shows how to use the same interactive method to customize the GUI if MarvinSketch is used as a JavaBean.

    Configuration File

    MarvinSketch stores all changes made on the GUI in a configuration file. This file is located at USER_HOME/CHEMAXON_DIR/VERSION/customization.xml

    Where the USER_HOME is

    • C:\Documents and Settings\USERNAME on Windows,
    • /home/USERNAME on Unix

    and the CHEMAXON_DIR is

    • chemaxon on Windows
    • .chemaxon on Linux.

    VERSION is the actual version number of MarvinSketch, with which the customization is made

    Example location:

    • Windows: C:\Documents and Settings\USERNAME\chemaxon\18.24.0\customization.xml
    • Unix/Linux: /home/USERNAME/.chemaxon/18.24.0/customization.xml

    Creating Custom Tools Palette

    This example shows a configuration file which performs the following changes:

    • The Tools toolbar on the left-hand side is hidden.
    • A new toolbar is defined in its place with some custom actions.
    • The Atoms toolbar on the right-hand side is changed.

    The result is shown in the picture below:

    Customizing the GUI

    The content of the default scheme of the configuration file is as follow

           <scheme id="default">
            <modify path="toolbar/atoms/atom.N" visible="false"/>
            <modify path="toolbar/atoms/atom.S" visible="false"/>
            <modify path="toolbar/atoms/atom.F" visible="false"/>
            <modify path="toolbar/atoms/atom.P" visible="false"/>
            <modify path="toolbar/atoms/atom.Cl" visible="false"/>
            <modify path="toolbar/atoms/atom.I" visible="false"/>
            <add path="toolbar/atoms">
              <item id="increaseCharge"/>
              <item id="decreaseCharge"/>
            <order itemorder="periodicSystem/atom.H/atom.C/atom.N/atom.O/atom.S/atom.F/atom.P/atom.Cl/atom.Br/atom.I/increaseCharge/decreaseCharge" path="toolbar/atoms"/>
            <modify index="1" path="toolbar/tools" row="0" visible="false"/>
            <toolbar anchor="west" id="CustomToolbar-0" index="0" name="Custom-Tools-Palette" row="0">
              <item id="bondGroup"/>
              <item id="insertElectronFlow"/>
              <item id="insertElectronFlow2"/>
              <item id="insertRectangle"/>
              <item id="insertArrow"/>
              <item id="insertTwoHeadedArrow"/>

    Currently, using a configuration file is the only way to change the GUI. Note that the graphical user interface of MarvinView cannot be customized.