Property change events

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

    Property name Type Meaning
    "mol" Molecule The molecule is replaced or altered.
    "file" java.io.File Molecule file changed from File/Open or File/Save As.
    "implicitH" String Implicit Hydrogen display style changed.
    "explicitH" Boolean Explicit Hydrogen display style changed. true: show explicit H atoms false: hide explicit H atoms
    "colorScheme" String Color scheme changed.
    "autoscale" Boolean Autoscale changed.
    "rendering" String Rendering style changed.
    "wireThickness" Double Wire thickness changed.
    "stickThickness" Double Sticks diameter changed.
    "ballRadius" Double Ball radius changed.
    "grinvVisible" Boolean Graph invariants displayed/not displayed.
    "downWedge" String Down wedge bond orientation changed.
    "objectAtPointer" Object The MolAtom or MolBond object at the mouse pointer.
    "invisibleSets" Long Visibility of atom sets changed.
    " atomNumbersVisible " Deprecated
    "atomNumberingType" Integer Visibility of atom numbers changed.
    "valencePropertyVisible" Boolean Visibility of valence properties changed.
    "ligandErrorVisible" Boolean Visibility of ligand error changed.
    "atomMappingVisible" Boolean Visibility of atom mapping changed.
    "popupMenusEnabled" Boolean Popup menus are enabled/disabled.
    "valenceErrorVisible" Boolean Visibility of valence errors changed.
    "reactionErrorVisible" Boolean Visibility 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());
        }       
        }
    }