Class Model
- java.lang.Object
-
- com.actelion.research.share.gui.editor.Model
-
public abstract class Model extends java.lang.Object
Project: User: rufenec Date: 1/24/13 Time: 5:02 PM
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static interface
Model.AtomHighlightCallback
static interface
Model.BondHighlightCallback
-
Field Summary
Fields Modifier and Type Field Description static int
FAKE_ATOM_NO
protected GeomFactory
geomFactory
static int
KEY_IS_ATOM_LABEL
static int
KEY_IS_INVALID
static int
KEY_IS_SUBSTITUENT
static int
KEY_IS_VALID_START
static int
MAX_CONNATOMS
static int
MAX_UNDO_SIZE
static int
MIN_BOND_LENGTH_SQUARE
static int
MODE_DRAWING_OBJECTS
static int
MODE_MARKUSH_STRUCTURE
static int
MODE_MULTIPLE_FRAGMENTS
static int
MODE_REACTION
-
Constructor Summary
Constructors Constructor Description Model(GeomFactory factory, int mode)
-
Method Summary
-
-
-
Field Detail
-
geomFactory
protected GeomFactory geomFactory
-
KEY_IS_ATOM_LABEL
public static final int KEY_IS_ATOM_LABEL
- See Also:
- Constant Field Values
-
KEY_IS_SUBSTITUENT
public static final int KEY_IS_SUBSTITUENT
- See Also:
- Constant Field Values
-
KEY_IS_VALID_START
public static final int KEY_IS_VALID_START
- See Also:
- Constant Field Values
-
KEY_IS_INVALID
public static final int KEY_IS_INVALID
- See Also:
- Constant Field Values
-
MODE_MULTIPLE_FRAGMENTS
public static final int MODE_MULTIPLE_FRAGMENTS
- See Also:
- Constant Field Values
-
MODE_MARKUSH_STRUCTURE
public static final int MODE_MARKUSH_STRUCTURE
- See Also:
- Constant Field Values
-
MODE_REACTION
public static final int MODE_REACTION
- See Also:
- Constant Field Values
-
MODE_DRAWING_OBJECTS
public static final int MODE_DRAWING_OBJECTS
- See Also:
- Constant Field Values
-
MAX_CONNATOMS
public static final int MAX_CONNATOMS
- See Also:
- Constant Field Values
-
MIN_BOND_LENGTH_SQUARE
public static final int MIN_BOND_LENGTH_SQUARE
- See Also:
- Constant Field Values
-
FAKE_ATOM_NO
public static final int FAKE_ATOM_NO
- See Also:
- Constant Field Values
-
MAX_UNDO_SIZE
public static final int MAX_UNDO_SIZE
- See Also:
- Constant Field Values
-
-
Constructor Detail
-
Model
public Model(GeomFactory factory, int mode)
-
-
Method Detail
-
getGeomFactory
public GeomFactory getGeomFactory()
-
cleanReaction
public void cleanReaction(boolean cleanAll)
-
getSelectedCopy
public StereoMolecule getSelectedCopy(StereoMolecule sourceMol)
-
scale
public void scale(float dx, float dy)
-
getSelectedReaction
public Reaction getSelectedReaction()
-
getFragments
public StereoMolecule[] getFragments()
-
setFragments
public void setFragments(StereoMolecule[] fragment)
-
getReaction
public Reaction getReaction()
-
setReaction
public void setReaction(Reaction rxn)
-
getMarkushStructure
public MarkushStructure getMarkushStructure()
-
setMarkushStructure
public void setMarkushStructure(MarkushStructure markush)
-
setDisplayMode
public void setDisplayMode(int dMode)
-
getMode
public int getMode()
-
getMolecule
public StereoMolecule getMolecule()
-
isAtomColorSupported
public boolean isAtomColorSupported()
-
setAtomColorSupported
public void setAtomColorSupported(boolean acs)
-
cleanupCoordinates
protected void cleanupCoordinates(boolean multifragment, boolean invent)
-
analyzeFragmentMembership
public void analyzeFragmentMembership()
-
isOnProductSide
public boolean isOnProductSide(double x, double y)
-
setMapper
public void setMapper(IReactionMapper mapper)
-
mapReaction
public void mapReaction(int atom, java.awt.geom.Point2D left, java.awt.geom.Point2D right)
-
getNextMapNo
public int getNextMapNo()
*********************************************************************************************************
-
popUndo
public void popUndo()
-
pushUndo
public void pushUndo()
-
getESRType
public int getESRType()
-
setESRType
public void setESRType(int type)
-
addValidationListener
public void addValidationListener(IValidationListener l)
-
removeValidationListener
public void removeValidationListener(IValidationListener l)
-
addChangeListener
public void addChangeListener(IChangeListener l)
-
removeChangeListener
public void removeChangeListener(IChangeListener l)
-
setDisplaySize
public void setDisplaySize(java.awt.Dimension displaySize)
-
getDisplaySize
public java.awt.Dimension getDisplaySize()
-
deleteMolecule
public void deleteMolecule(StereoMolecule tm)
-
setValue
public final void setValue(StereoMolecule value, boolean b)
-
setValue
public void setValue(Reaction rxn)
-
changed
public void changed()
-
valueInvalidated
public void valueInvalidated()
-
getMoleculeAt
public StereoMolecule getMoleculeAt(java.awt.geom.Point2D pt, boolean includeBond)
-
selectFragmentByAtom
public void selectFragmentByAtom(int rootAtom)
-
getFragmentAt
public StereoMolecule getFragmentAt(java.awt.geom.Point2D pt, boolean includeBond)
-
rowFromESRType
public static int rowFromESRType(int type)
-
esrTypeFromRow
public static int esrTypeFromRow(int row)
-
getSelectedAtom
public int getSelectedAtom()
-
setSelectedAtom
public void setSelectedAtom(int theAtom)
-
getSelectedBond
public int getSelectedBond()
-
setSelectedBond
public void setSelectedBond(int theBond)
-
setMode
public final void setMode(int mode)
-
getDrawingObjects
public java.util.List<IDrawingObject> getDrawingObjects()
-
addDrawingObject
public void addDrawingObject(IDrawingObject o)
-
isReaction
public boolean isReaction()
-
isFragment
public boolean isFragment()
-
setFragment
public void setFragment(boolean fragment)
-
setNewMolecule
public void setNewMolecule()
-
needsLayout
public void needsLayout(boolean set)
-
needsLayout
public boolean needsLayout()
-
getDisplayMode
public int getDisplayMode()
-
getIDCode
public java.lang.String getIDCode()
-
getKeyStrokeBuffer
public java.lang.StringBuilder getKeyStrokeBuffer()
-
getAtomKeyStrokeValidity
public int getAtomKeyStrokeValidity(java.lang.String s)
-
getMarkushCount
public int getMarkushCount()
-
tryAutoMapReaction
public void tryAutoMapReaction()
-
getMolFile
public java.lang.String getMolFile(boolean v3)
-
setMolFile
public void setMolFile(java.lang.String molFile)
-
getSmiles
public java.lang.String getSmiles()
-
setSmiles
public void setSmiles(java.lang.String smiles)
-
getReactantCount
public int getReactantCount()
-
flip
public void flip(boolean horiz)
-
registerAtomHighlightCallback
public void registerAtomHighlightCallback(Model.AtomHighlightCallback cb)
-
registerBondHighlightCallback
public void registerBondHighlightCallback(Model.BondHighlightCallback cb)
-
addMolecule
public void addMolecule(StereoMolecule mol, double x, double y)
-
getSelectedDrawingObject
public IDrawingObject getSelectedDrawingObject()
-
setSelectedDrawingObject
public void setSelectedDrawingObject(IDrawingObject sel)
-
cleanMolecule
public void cleanMolecule(boolean invent, boolean selectedOnly)
-
createExtendedDepictor
protected abstract AbstractExtendedDepictor createExtendedDepictor()
-
createDepictor
protected abstract AbstractDepictor createDepictor(StereoMolecule stereoMolecule)
-
analyzeReaction
public abstract void analyzeReaction()
-
copyMolecule
public abstract boolean copyMolecule(boolean selected)
-
copyReaction
public abstract boolean copyReaction(boolean selected)
-
pasteMolecule
public abstract StereoMolecule pasteMolecule(double cx, double cy)
-
pasteReaction
public abstract Reaction pasteReaction(double cx, double cy)
-
getImageProvider
public ImageProvider getImageProvider()
-
setImageProvider
public void setImageProvider(ImageProvider p)
-
-