Page tree
Skip to end of metadata
Go to start of metadata

To handle the property change events of MSketchPane, the java.beans.PropertyChangeListener interface must be implemented.

 

Property nameTypeMeaning
"mol"MoleculeThe molecule is replaced or altered.
"file"java.io.FileMolecule file changed from File/Open or File/Save As.
"implicitH"StringImplicit Hydrogen display style changed.
"explicitH"BooleanExplicit Hydrogen display style changed.
true: show explicit H atoms
false: hide explicit H atoms
"colorScheme"StringColor scheme changed.
"autoscale"BooleanAutoscale changed.
"rendering"StringRendering style changed.
"wireThickness"Double Wire thickness changed.
"stickThickness"DoubleSticks diameter changed.
"ballRadius"DoubleBall radius changed.
"grinvVisible"BooleanGraph invariants displayed/not displayed.
"downWedge"StringDown wedge bond orientation changed.
"objectAtPointer"ObjectThe MolAtom or MolBond object at the mouse pointer.
"invisibleSets"LongVisibility of atom sets changed.
"atomNumbersVisible" Deprecated
"atomNumberingType"IntegerVisibility of atom numbers changed.
"valencePropertyVisible"BooleanVisibility of valence properties changed.
"ligandErrorVisible"BooleanVisibility of ligand error changed.
"atomMappingVisible"BooleanVisibility of atom mapping changed.
"popupMenusEnabled"BooleanPopup menus are enabled/disabled.
"valenceErrorVisible"BooleanVisibility of valence errors changed.
"reactionErrorVisible"BooleanVisibility of reaction errors changed.

 

Example:

    sketchPane.addPropertyChangeListener(this);
    ...

public void propertyChange(PropertyChangeEvent ev) {
    String name = ev.getPropertyName();
    if("file".equals(name)) {
	File f = (File)ev.getNewValue();
	if(f != null) {
	    setTitle("MarvinSketch: "+f.getName());
	}	    
    }
}

 

 
  • No labels