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
ConstructorDescriptionContructs an empty point object.Copy constructor.MAtomSetPoint
(MolAtom[] a) Contructs a point object. -
Method Summary
Modifier and TypeMethodDescriptionboolean
checkValidity
(MDocument doc, Collection<MolAtom> invec) Is it a valid object in the document?clone()
Creates a clone.void
boolean
Checks if the atom set contains the specified atom object.boolean
Two points equal if their atoms equal.void
finishCloning
(MDocument olddoc, MDocument newdoc) Finish cloning a document.protected MolAtom[]
MolAtom[]
getAtoms()
Gets the atoms.void
getLocation
(DPoint3 q, CTransform3D trot) Gets the location.getPoint
(int i) Gets the point.double[]
Gets the atom weights used in average location calculation.int
hashCode()
boolean
Is it a transformable object?void
replaceAtom
(MolAtom orig, MolAtom a) Replaces a contained atom with another one.void
Sets the atoms.void
setLocation
(DPoint3 p, CTransform3D trot) Sets the atom coordinates.void
setWeights
(double[] w) Sets the atom weights for location calculation.toString()
Overrides Object.toString() to ease debugging.void
transform
(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, isInternalSelectable
Methods inherited from class chemaxon.struc.MObject
addAttributeKeys, addCdataAttributeKeys, addNotify, containsPoint, distanceFrom, fixClonedPoints, getAttribute, getBackground, getColor, getContainerMObject, getLineColor, hasBackground, hasColor, hasLineColor, isEmpty, isReactionArrow, isSelectableNow, isSelected, makeColor, removeAtom, removeChild, removeNotify, 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:MObject
Creates 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:
containsAtom
in classMObject
- Returns:
- true if the atom set contains the specified object, false otherwise
- Since:
- Marvin 3.5, 07/04/2004
-
connectToSgroupOfAtom
- Overrides:
connectToSgroupOfAtom
in classMObject
-
replaceAtom
Replaces a contained atom with another one.- Overrides:
replaceAtom
in 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:
getLocation
in 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:
setLocation
in 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:
isTransformable
in 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:
checkValidity
in 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:
finishCloning
in classMObject
- Since:
- Marvin 3.5, 07/02/2004
-
getAtomArray
-
toString
Description copied from class:MObject
Overrides 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.
-