Search in sources :

Example 1 with IAtomPropertiesDialog

use of com.actelion.research.share.gui.editor.dialogs.IAtomPropertiesDialog in project openchemlib by Actelion.

the class ChangeAtomPropertiesAction method onMouseUp.

@Override
public boolean onMouseUp(IMouseEvent evt) {
    model.pushUndo();
    int theAtom = model.getSelectedAtom();
    StereoMolecule mol = model.getMolecule();
    if (mol != null && theAtom != -1) {
        GeomFactory builder = model.getGeomFactory();
        IAtomPropertiesDialog dlg = builder.createAtomPropertiesDialog(mol, theAtom);
        if (dlg.doModalAt(evt.getX(), evt.getY()) == DialogResult.IDOK) {
            return true;
        }
    }
    return false;
}
Also used : GeomFactory(com.actelion.research.share.gui.editor.geom.GeomFactory) IAtomPropertiesDialog(com.actelion.research.share.gui.editor.dialogs.IAtomPropertiesDialog) StereoMolecule(com.actelion.research.chem.StereoMolecule)

Aggregations

StereoMolecule (com.actelion.research.chem.StereoMolecule)1 IAtomPropertiesDialog (com.actelion.research.share.gui.editor.dialogs.IAtomPropertiesDialog)1 GeomFactory (com.actelion.research.share.gui.editor.geom.GeomFactory)1