public class MAtomSetPoint extends MPoint
MEFlow
.PAINT_ANTIALIAS, PAINT_FOCUSED, TRANSFORM_DISTORT
Constructor and Description |
---|
MAtomSetPoint()
Contructs an empty point object.
|
MAtomSetPoint(MAtomSetPoint p)
Copy constructor.
|
MAtomSetPoint(MolAtom[] a)
Contructs a point object.
|
Modifier and Type | Method and Description |
---|---|
boolean |
checkValidity(MDocument doc,
Collection<MolAtom> invec)
Is it a valid object in the document?
|
MAtomSetPoint |
clone()
Creates a clone.
|
void |
connectToSgroupOfAtom(SuperatomSgroup sg,
MolAtom a) |
boolean |
containsAtom(MolAtom a)
Checks if the atom set contains the specified atom object.
|
boolean |
equals(Object o)
Two points equal if their atoms equal.
|
void |
finishCloning(MDocument olddoc,
MDocument newdoc)
Finish cloning a document.
|
protected MolAtom[] |
getAtomArray() |
MolAtom[] |
getAtoms()
Gets the atoms.
|
void |
getLocation(DPoint3 q,
CTransform3D trot)
Gets the location.
|
MPoint |
getPoint(int i)
Gets the point.
|
double[] |
getWeights()
Gets the atom weights used in average location calculation.
|
boolean |
isTransformable()
Is it a transformable object?
|
void |
replaceAtom(MolAtom orig,
MolAtom a)
Replaces a contained atom with another one.
|
void |
setAtoms(MolAtom[] a)
Sets the atoms.
|
void |
setLocation(DPoint3 p,
CTransform3D trot)
Sets the atom coordinates.
|
void |
setWeights(double[] w)
Sets the atom weights for location calculation.
|
String |
toString()
Overrides Object.toString() to ease debugging.
|
void |
transform(CTransform3D t,
int opts,
CTransform3D trot)
Does not perform any operation.
|
calcCenter, distanceFrom, getLocation, getLocation, getPointCount, getPointRef, getPointRefCount, hashCode, isChildOf, isInternalSelectable
addAttributeKeys, addCdataAttributeKeys, addNotify, addNotify, containsPoint, distanceFrom, fixClonedPoints, getAttribute, getBackground, getColor, getLineColor, hasBackground, hasColor, hasLineColor, isEmpty, isReactionArrow, isSelectableNow, isSelected, makeColor, removeAtom, removeChild, removeNotify, removeNotify, setAttribute, setBackground, setColor, setLineColor, setSelected, unselectContents, updateBoundingRect
public MAtomSetPoint()
public MAtomSetPoint(MolAtom[] a)
a
- array of atomspublic MAtomSetPoint(MAtomSetPoint p)
p
- the pointpublic boolean equals(Object o)
public MAtomSetPoint clone()
MObject
public void setAtoms(MolAtom[] a)
a
- the atomspublic MolAtom[] getAtoms()
public boolean containsAtom(MolAtom a)
containsAtom
in class MObject
public void connectToSgroupOfAtom(SuperatomSgroup sg, MolAtom a)
connectToSgroupOfAtom
in class MObject
public void replaceAtom(MolAtom orig, MolAtom a)
replaceAtom
in class MObject
orig
- the original atoma
- the new atompublic void getLocation(DPoint3 q, CTransform3D trot)
getLocation
in class MPoint
q
- the output point objecttrot
- the viewing transformation or nullpublic void setLocation(DPoint3 p, CTransform3D trot)
setLocation
in class MPoint
p
- the new locationtrot
- the viewing transformation or nullpublic MPoint getPoint(int i)
public double[] getWeights()
public void setWeights(double[] w)
w
- the atom weights or nullpublic void transform(CTransform3D t, int opts, CTransform3D trot)
transform
in class MPoint
t
- the transformation matrixopts
- transform options or 0trot
- the viewing transformation or nullMObject.TRANSFORM_DISTORT
public boolean isTransformable()
isTransformable
in class MObject
public boolean checkValidity(MDocument doc, Collection<MolAtom> invec)
checkValidity
in class MObject
doc
- the documentinvec
- collection of invalid atoms or nullpublic void finishCloning(MDocument olddoc, MDocument newdoc)
finishCloning
in class MObject
protected MolAtom[] getAtomArray()