Package chemaxon.struc.graphics
Class MAtomSetPoint
java.lang.Object
chemaxon.struc.MObject
chemaxon.struc.MPoint
chemaxon.struc.graphics.MAtomSetPoint
- All Implemented Interfaces:
Serializable,Cloneable
- Direct Known Subclasses:
MElectron
Point fixed to the location of one or more atoms. The point's location is the weighted average of
the atom locations. Useful for creating bond or atom pair type electron source/sink points for
MEFlow.- Since:
- Marvin 3.5, 07/05/2004
- See Also:
-
Field Summary
Fields inherited from class chemaxon.struc.MObject
TRANSFORM_DISTORT -
Constructor Summary
ConstructorsConstructorDescriptionContructs an empty point object.Copy constructor.MAtomSetPoint(MolAtom[] a) Contructs a point object. -
Method Summary
Modifier and TypeMethodDescriptionbooleancheckValidity(MDocument doc, Collection<MolAtom> invec) Is it a valid object in the document?clone()Creates a clone.voidbooleanChecks if the atom set contains the specified atom object.booleanTwo points equal if their atoms equal.voidfinishCloning(MDocument olddoc, MDocument newdoc) Finish cloning a document.protected MolAtom[]MolAtom[]getAtoms()Gets the atoms.voidgetLocation(DPoint3 q, CTransform3D trot) Gets the location.getPoint(int i) Gets the point.double[]Gets the atom weights used in average location calculation.inthashCode()booleanIs it a transformable object?voidreplaceAtom(MolAtom orig, MolAtom a) Replaces a contained atom with another one.voidSets the atoms.voidsetLocation(DPoint3 p, CTransform3D trot) Sets the atom coordinates.voidsetWeights(double[] w) Sets the atom weights for location calculation.toString()Overrides Object.toString() to ease debugging.voidtransform(CTransform3D t, int opts, CTransform3D trot) Does not perform any operation.Methods inherited from class chemaxon.struc.MPoint
calcCenter, distanceFrom, getLocation, getLocation, getPointCount, getPointRef, getPointRefCount, isChildOf, isInternalSelectableMethods inherited from class chemaxon.struc.MObject
addAttributeKeys, addCdataAttributeKeys, addNotify, clearProperties, containsPoint, containsPropertyKey, distanceFrom, fixClonedPoints, getAttribute, getBackground, getColor, getContainerMObject, getLineColor, getProperty, hasBackground, hasColor, hasLineColor, isEmpty, isReactionArrow, isSelectableNow, isSelected, makeColor, propertyCount, propertyKeySet, propertySet, putProperty, removeAtom, removeChild, removeNotify, removeProperty, setAttribute, setBackground, setColor, setLineColor, setSelected, unselectContents, updateBoundingRect, updateBoundingRect
-
Constructor Details
-
MAtomSetPoint
public MAtomSetPoint()Contructs an empty point object. -
MAtomSetPoint
Contructs a point object.- Parameters:
a- array of atoms
-
MAtomSetPoint
Copy constructor.- Parameters:
p- the point
-
-
Method Details
-
hashCode
public int hashCode() -
equals
Two points equal if their atoms equal. -
clone
Description copied from class:MObjectCreates a clone. -
setAtoms
Sets the atoms.- Parameters:
a- the atoms
-
getAtoms
Gets the atoms.- Returns:
- the atoms
-
containsAtom
Checks if the atom set contains the specified atom object.- Overrides:
containsAtomin classMObject- Returns:
- true if the atom set contains the specified object, false otherwise
- Since:
- Marvin 3.5, 07/04/2004
-
connectToSgroupOfAtom
- Overrides:
connectToSgroupOfAtomin classMObject
-
replaceAtom
Replaces a contained atom with another one.- Overrides:
replaceAtomin classMObject- Parameters:
orig- the original atoma- the new atom- Since:
- Marvin 3.5, 07/04/2004
-
getLocation
Gets the location. The atom set's location is the weighted average of the atom locations.- Overrides:
getLocationin classMPoint- Parameters:
q- the output point objecttrot- the viewing transformation or null- Since:
- Marvin 4.1, 04/28/2006
-
setLocation
Sets the atom coordinates. The atom set's location is the weighted average of the atom locations.- Overrides:
setLocationin classMPoint- Parameters:
p- the new locationtrot- the viewing transformation or null
-
getPoint
Gets the point. -
getWeights
public double[] getWeights()Gets the atom weights used in average location calculation.- Returns:
- the weights or null
- Since:
- Marvin 4.1, 04/21/2006
-
setWeights
public void setWeights(double[] w) Sets the atom weights for location calculation.- Parameters:
w- the atom weights or null- Since:
- Marvin 4.1, 04/21/2006
-
transform
Does not perform any operation. An atom set point's location is fixed to the atoms. -
isTransformable
public boolean isTransformable()Is it a transformable object?- Overrides:
isTransformablein classMObject- Returns:
- true if the object can be transformed, false otherwise
- Since:
- Marvin 3.5, 07/06/2004
-
checkValidity
Is it a valid object in the document?- Overrides:
checkValidityin classMObject- Parameters:
doc- the documentinvec- collection of invalid atoms or null- Returns:
- true if the object is valid, false if it contains an unknown atom
- Since:
- Marvin 3.5, 07/06/2004
-
finishCloning
Finish cloning a document. Called by the copy constructor.- Overrides:
finishCloningin classMObject- Since:
- Marvin 3.5, 07/02/2004
-
getAtomArray
-
toString
Description copied from class:MObjectOverrides Object.toString() to ease debugging. Returns a string consisting of the classname (without the package name!), the at-sign character `@', and the unsigned hexadecimal representation of the hash code of the object.
-