|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectchemaxon.struc.MObject
chemaxon.struc.graphics.MChemicalStruct
public class MChemicalStruct
Molecule graph object.
Field Summary |
---|
Fields inherited from class chemaxon.struc.MObject |
---|
PAINT_ANTIALIAS, PAINT_FOCUSED, TRANSFORM_DISTORT |
Constructor Summary | |
---|---|
protected |
MChemicalStruct(MChemicalStruct mcs)
Copy constructor. |
|
MChemicalStruct(MoleculeGraph m)
Contructs a molecule graph object. |
Method Summary | |
---|---|
void |
calcCenter(DPoint3 p,
CTransform3D t)
Calculates the geometrical center. |
java.lang.Object |
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. |
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 |
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 |
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. |
Methods inherited from class chemaxon.struc.MObject |
---|
addAttributeKeys, addCdataAttributeKeys, addNotify, checkValidity, containsPoint, distanceFrom, finishCloning, fixClonedPoints, getAttribute, getBackground, getColor, getLineColor, getPointRef, getPointRefCount, hasBackground, hasColor, hasLineColor, isChildOf, isInternalSelectable, isReactionArrow, isSelectableNow, isSelected, isTransformable, makeColor, removeAtom, removeChild, removeNotify, replaceAtom, setAttribute, setBackground, setColor, setLineColor, toString, updateBoundingRect |
Methods inherited from class java.lang.Object |
---|
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public MChemicalStruct(MoleculeGraph m)
m
- the molecule graphprotected MChemicalStruct(MChemicalStruct mcs)
mcs
- the original objectMethod Detail |
---|
public MoleculeGraph getMoleculeGraph()
public java.lang.Object clone()
clone
in class MObject
public boolean isEmpty()
isEmpty
in class MObject
public int getPointCount()
getPointCount
in class MObject
public MPoint getPoint(int i)
getPoint
in class MObject
i
- the point index
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
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |