Applet only parameters

The following parameters are meaningful only for the applet (JMSketch) and not for the JavaBean (MSketchPane).





Enable the embedded menubar.



Enable menubar in button (/hide) mode if the menubar parameter is true. Combine it with the detach parameter to set the button mode.
True, to allow, false to deny menu bar on the big sketcher button.



Detachment behavior. The value consists of some optional arguments: show/hide size, and maxscale. If more arguments are included, they must be separated by a comma.
To detach the sketcher from the web page and display it in a separate window, set "show".
To detach the sketcher without displaying the separate window, set "hide".
Both settings make the applet on the web page look like a molecule viewer.

The initial size of the sketcher window can be specified with "size=widthxheight"
Examples: "show", "size=500x500", "hide,size=500x500".
In case the maxscale argument is set, it can prevent small molecules to be overscaled on the button.
Example for maximum 100% magnification: "hide,maxscale=28"
Live applet example: MarvinSketch Exemple - Pure visualization mode



Sketcher window close (x) behavior.
false: always hide sketcher
true: replace viewer component by sketcher in web browser window if the applet is large enough (>= 400x300)



The molecule file to be loaded at startup, as either a URL or the file itself (inline) in MDL mol, compressed mol, SMILES, SMARTS, etc format.
Newlines occurring in the string must be replaced or preceded by "\n" and backslashes are recommended to be escaped as "\\".
The file format and/or import options can be specified if one of the following forms is used:
"file{format:options}", or
If the MULTISET option is specified, then a multi-molecule file is read into one molecule object containing multiple atom sets.
Examples: "{f1.4C4}", "{gzip:xyz:MULTISET,f1.4C4}"






Store loaded molecules in an internal cache (true or false).



Comma-separated list of molfiles to preload. Useful for caching molecules in JavaScript "slideshows".



Comma-separated list of additional jar files that can be used by the applet. The additional files have to be defined with their paths relative to the applet's base.



The default file format for image saving.



Evaluates a JavaScript code after the loading of the molecule into the editor is finished. This "event" is invoked if molecule is loaded-in into the applet in any of the following cases:

  • Automaticaly, at applet starting: (using the mol applet parameter)

  • Calling (J)MSketch.setMol(...) from JavaScript.

Note: If the MAYSCRIPT option is not specified, JavaScript can not be evaluated from the applet. E.g.:

msketch_param("molLoaderFinishedEvent","js:alert('Molecule is loaded-in.')");



Switch on/off property change event listener to the applet. If listener is active, the applet will call propertyChange(prop) JavaScript method. If you would like to handle property change events in JavaScript, implement this method in your html source. Note: If the MAYSCRIPT option is not specified, JavaScript can not be evaluated from the applet. E.g.:

function propertyChange(prop) {
if(document.textform != null) {
var s = document.textform.txt.value;
document.textform.txt.value = s + "\n" + prop;

If you also specify the "appletid" parameter, its value will appear in the name of the property as prefix (e.g.: "firstapplet.mol").



Identify applet in property change event notifications to JavaScript. Use this parameter with listenpropertychange when more than one applet are located on the same web page. It helps to identify which applet sent the notification.



Change the component's Look & Feel (only in SWING applet). If you do not specify this parameter, Marvin will use the default LookAndFeel style.
This parameter value is the name of the new LookAndFeel class.

javax.swing.plaf .metal .MetalLookAndFeel


Change the component's splash screen displayed at startup. If you do not specify this parameter, Marvin will use its default splash screen.
This parameter value is the relative path of the image, specify relatively to the CODEBASE
Note: Animated gif files can be displayed badly (flashing, or too fast animation)



Sets the contents of a pre-read license file to the license manager to read and validate licenses from.



Sets the license file location to the license manager to read and validate licenses from.



A string containing a javascript code, that has to be run by the applet, if it has a failure at initialization.
The %s wildcard can be used to include the error message given by the applet inside the javascript code.
If used with alertError also set to true, the alert window will be shown first, and after the user has pressed the OK button on the alert will the given code run.



If this parameter is set to true, the applet will show a javascript alert window with an error message, if there was a problem in the initialization process of the applet.



The "legacy_lifecycle" is a general Java applet parameter. If its value is true, it helps avoid destroying the applet when you leaves the applet page. If you use "marvin.js", it sets its value to true automatically unless you specify its value explicitly. By the way, the default value of this parameter in Java is false. See the discussion about it on the forum.



You can specify the order of the modules for background loading. After startup of MarvinSketch, modules that are not used yet are started downloading in the background to fast up their initalization of their first usage. The value of this parameter is a comma separated list of modules that get priority for loading. See also bgloadEnabled.



Let or deny loading of rest of modules in a background thread after startup. Set this parameter to true to accept background loading. Set it to false if you would like to reject this functionality.



MarvinSketch help contents. Accepts relative URL to the applet codebase or any absolute URL.

chemaxon/marvin/help /sketch-index.html


MarvinSketch quick help. Accepts relative URL to the applet codebase or any absolute URL.

chemaxon/marvin/help /sketch.html


Default checker configuration URL. Accepts any absolute URL.

local configuration