public class MChemicalStruct extends MObject
PAINT_ANTIALIAS, PAINT_FOCUSED, TRANSFORM_DISTORT
Modifier | Constructor and Description |
---|---|
protected |
MChemicalStruct(MChemicalStruct mcs)
Copy constructor.
|
|
MChemicalStruct(MoleculeGraph m)
Contructs a molecule graph object.
|
Modifier and Type | Method and Description |
---|---|
void |
calcCenter(DPoint3 p,
CTransform3D t)
Calculates the geometrical center.
|
MChemicalStruct |
clone()
Creates a clone.
|
boolean |
containsAtom(MolAtom a)
Checks if the atom set contains the specified atom object.
|
double |
distanceFrom(double x,
double y,
CTransform3D t)
Gets the 2D distance from the specified point.
|
static double |
distanceFrom(MoleculeGraph molg,
double x,
double y,
CTransform3D t)
Gets the 2D distance from the specified point.
|
MolAtom |
getAtomOf(chemaxon.struc.graphics.MElectronContainer container) |
List<chemaxon.struc.graphics.MElectronContainer> |
getElectronContainersOf(MolAtom atom) |
int |
getMElectronContainerIndexInAtom(MolAtom atom,
chemaxon.struc.graphics.MElectronContainer container) |
chemaxon.struc.graphics.MElectronContainer |
getMElectronContainerOf(chemaxon.struc.graphics.MElectron e) |
MoleculeGraph |
getMoleculeGraph()
Gets the stored molecule graph.
|
MPoint |
getPoint(int i)
Gets a point of the object.
|
int |
getPointCount()
Gets the number of points (atoms).
|
boolean |
hasElectronContainer(MolAtom atom) |
boolean |
hasSelection()
Checks the existence of the selection.
|
static boolean |
hasSelection(MoleculeGraph molg)
Checks the existence of the selection.
|
boolean |
isEmpty()
A chemical structure object is empty if the molecule graph is empty.
|
void |
removeElectronToAtomMapping(MolAtom atom,
chemaxon.struc.graphics.MElectronContainer container) |
void |
setElectronToAtomMapping(MolAtom atom,
chemaxon.struc.graphics.MElectronContainer container) |
void |
setSelected(boolean s)
Selects or unselects the object.
|
static void |
setSelected(MoleculeGraph molg,
boolean s)
Selects or unselects atoms in a molecule graph.
|
void |
transform(CTransform3D t,
int opts,
CTransform3D trot)
Transforms all points.
|
void |
unselectContents()
Unselects atoms.
|
addAttributeKeys, addCdataAttributeKeys, addNotify, addNotify, checkValidity, connectToSgroupOfAtom, containsPoint, distanceFrom, finishCloning, fixClonedPoints, getAttribute, getBackground, getColor, getLineColor, getPointRef, getPointRefCount, hasBackground, hasColor, hasLineColor, isChildOf, isInternalSelectable, isReactionArrow, isSelectableNow, isSelected, isTransformable, makeColor, removeAtom, removeChild, removeNotify, removeNotify, replaceAtom, setAttribute, setBackground, setColor, setLineColor, toString, updateBoundingRect
public MChemicalStruct(MoleculeGraph m)
m
- the molecule graphprotected MChemicalStruct(MChemicalStruct mcs)
mcs
- the original objectpublic MoleculeGraph getMoleculeGraph()
public MChemicalStruct clone()
public boolean isEmpty()
public int getPointCount()
getPointCount
in class MObject
public MPoint getPoint(int i)
public boolean containsAtom(MolAtom a)
containsAtom
in class MObject
public void transform(CTransform3D t, int opts, CTransform3D trot)
transform
in class MObject
t
- the transformation matrixopts
- transform options or 0trot
- the viewing transformation or nullMObject.TRANSFORM_DISTORT
public void calcCenter(DPoint3 p, CTransform3D t)
calcCenter
in class MObject
p
- store the coordinates heret
- the transformation matrix or nullpublic double distanceFrom(double x, double y, CTransform3D t)
distanceFrom
in class MObject
x
- the x coordinatey
- the y coordinatet
- transformation or nullpublic static double distanceFrom(MoleculeGraph molg, double x, double y, CTransform3D t)
x
- the x coordinatey
- the y coordinatet
- transformation or nullpublic void setSelected(boolean s)
setSelected
in class MObject
s
- use true to select, false to unselectpublic static void setSelected(MoleculeGraph molg, boolean s)
s
- use true to select, false to unselectpublic boolean hasSelection()
public static boolean hasSelection(MoleculeGraph molg)
public void unselectContents()
unselectContents
in class MObject
public void setElectronToAtomMapping(MolAtom atom, chemaxon.struc.graphics.MElectronContainer container)
public void removeElectronToAtomMapping(MolAtom atom, chemaxon.struc.graphics.MElectronContainer container)
public MolAtom getAtomOf(chemaxon.struc.graphics.MElectronContainer container)
public List<chemaxon.struc.graphics.MElectronContainer> getElectronContainersOf(MolAtom atom)
public boolean hasElectronContainer(MolAtom atom)
public int getMElectronContainerIndexInAtom(MolAtom atom, chemaxon.struc.graphics.MElectronContainer container)
public chemaxon.struc.graphics.MElectronContainer getMElectronContainerOf(chemaxon.struc.graphics.MElectron e)