Customization ドキュメントでは、画面構成の対話的なカスタマイズ方法を紹介していますが、このドキュメントでは、MarvinSketchをサーバ上のappletやJavaBeanとして使用する場合の画面構成のカスタマイズ方法について紹介します。
注: APIとXSDも近いうちに使用可能になる予定です。
USER_HOME/CHEMAXON_DIR/VERSION/ にあるconfigurationファイルに保存しています。
USER_HOME は、Windowsでは C:\Documents and Settings\USERNAME、Unixでは /home/USERNAME になります。CHEMAXON_DIR は、chemaxon (Windows) か .chemaxon (Unix) になります。VERSION は使用中のMarvinSketchのバージョンになります。C:\Documents and Settings\USERNAME\chemaxon\5.0.0\customization.xml/home/USERNAME/.chemaxon/5.0.0/customization.xml
msketch_param("menuconfig", "http://example-server.org/marvin/configuration.xml"); msketch_param("menuconfig", "files/marvin/configuration.xml");
UserSettings userSettings=new UserSettings();
userSettings.tryToLoad();
userSettings.put("menuconfig", "org/example/configuration.xml");
MSketchPane sketchPane=new MSketchPane(userSettings);
Configurations ドキュメントでは、個人用の画面構成を定義するconfigurationを別途作成する方法について記述しています。
あるconfigurationをデフォルトの設定にする場合は、そのconfigurationに対応するidentifierをxmlファイル内で指定する必要があります。
使用できるconfigurationのidentifierは以下になります:
Configuration Identifier Marvin default Classic Marvin classic ISIS/Draw-like config1 ChemDraw-like config2
configurationファイルの中身です:
<?xml version="1.0" encoding="UTF-8"?>
<customization active="config1">
</customization>
この例では、以下のような独自の画面構成をconfigurationファイルに設定します:
画面構成の変更後は次のようになります:

configurationファイルは次のようになります:
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<customization active="default">
<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"/>
</add>
<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"/>
</toolbar>
</scheme>
</customization>
現在、configurationファイルはappletまたはbeansへの適用に限られますが、近いうちにAPIでも使用できるようになる予定です。
MarvinViewとMarvinSpaceの画面構成は、現時点では変更できません。