Package chemaxon.struc.graphics
Class MEFlowBasePoint
- java.lang.Object
-
- chemaxon.struc.MObject
-
- chemaxon.struc.MPoint
-
- chemaxon.struc.graphics.MEFlowBasePoint
-
- All Implemented Interfaces:
Serializable
,Cloneable
@PublicAPI public class MEFlowBasePoint extends MPoint
Electron flow arrow base point. May be fixed to a lone pair.- Since:
- Marvin 5.3, 09/25/2009
- See Also:
- Serialized Form
-
-
Field Summary
Fields Modifier and Type Field Description static String
electronRadious
static String
lonePairCoordsLabel
static String
lonePairRealCoordsLabel
static String
radicalCoordsLabel
-
Fields inherited from class chemaxon.struc.MObject
TRANSFORM_DISTORT
-
-
Constructor Summary
Constructors Constructor Description MEFlowBasePoint()
Contructs an empty point object.MEFlowBasePoint(MEFlowBasePoint p)
Copy constructor.MEFlowBasePoint(MolAtom a, MPoint p)
Contructs a point object.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
checkValidity(MDocument doc, Collection<MolAtom> invec)
Is it a valid object in the document?MEFlowBasePoint
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.MolAtom
getAtom()
Gets the atom.void
getLocation(DPoint3 out, CTransform3D trot)
Gets the location.MPoint
getOtherEnd()
Gets the atom at the other end point.MPoint
getPoint(int i)
Gets the point.int
hashCode()
boolean
isTransformable()
Is it a transformable object?void
replaceAtom(MolAtom orig, MolAtom a)
Replaces a contained atom with another one.void
setBaseElectronContainerIndex(int baseElectronContainerIndex)
void
setBaseElectronIndexInContainer(int baseElectronIndexInContainer)
void
setElectronIndex(String label, int dotIndex)
void
setLocation(DPoint3 p, CTransform3D trot)
Sets the atom coordinates.void
setStartEnd(MolAtom a, MPoint p)
Sets the atoms.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, toString
-
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
-
-
-
-
Field Detail
-
radicalCoordsLabel
public static final String radicalCoordsLabel
- See Also:
- Constant Field Values
-
lonePairCoordsLabel
public static final String lonePairCoordsLabel
- See Also:
- Constant Field Values
-
lonePairRealCoordsLabel
public static final String lonePairRealCoordsLabel
- See Also:
- Constant Field Values
-
electronRadious
public static final String electronRadious
- See Also:
- Constant Field Values
-
-
Constructor Detail
-
MEFlowBasePoint
public MEFlowBasePoint()
Contructs an empty point object.
-
MEFlowBasePoint
public MEFlowBasePoint(MolAtom a, MPoint p)
Contructs a point object.- Parameters:
a
- the starting point of the arrowp
- other end point of the arrow
-
MEFlowBasePoint
public MEFlowBasePoint(MEFlowBasePoint p)
Copy constructor.- Parameters:
p
- the point
-
-
Method Detail
-
equals
public boolean equals(Object o)
Two points equal if their atoms equal.
-
clone
public MEFlowBasePoint clone()
Description copied from class:MObject
Creates a clone.
-
setStartEnd
public void setStartEnd(MolAtom a, MPoint p)
Sets the atoms.- Parameters:
a
- the starting point of the arrowp
- other end point of the arrow
-
getAtom
public MolAtom getAtom()
Gets the atom.- Returns:
- the atom
-
getOtherEnd
public MPoint getOtherEnd()
Gets the atom at the other end point.- Returns:
- the atom
-
containsAtom
public boolean containsAtom(MolAtom a)
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
-
connectToSgroupOfAtom
public void connectToSgroupOfAtom(SuperatomSgroup sg, MolAtom a)
- Overrides:
connectToSgroupOfAtom
in classMObject
-
replaceAtom
public void replaceAtom(MolAtom orig, MolAtom a)
Replaces a contained atom with another one.- Overrides:
replaceAtom
in classMObject
- Parameters:
orig
- the original atoma
- the new atom
-
getLocation
public void getLocation(DPoint3 out, CTransform3D trot)
Gets the location. The atom set's location is the weighted average of the atom locations.- Overrides:
getLocation
in classMPoint
- Parameters:
out
- the output point objecttrot
- the viewing transformation or null
-
setLocation
public void setLocation(DPoint3 p, CTransform3D trot)
Sets the atom coordinates.- Overrides:
setLocation
in classMPoint
- Parameters:
p
- the new locationtrot
- the viewing transformation or null
-
getPoint
public MPoint getPoint(int i)
Gets the point.
-
transform
public void transform(CTransform3D t, int opts, CTransform3D trot)
Does not perform any operation. An atom set point's location is fixed to the atoms.- Overrides:
transform
in classMPoint
- Parameters:
t
- the transformation matrixopts
- transform options or 0trot
- the viewing transformation or null- See Also:
MObject.TRANSFORM_DISTORT
-
isTransformable
public boolean isTransformable()
Is it a transformable object?- Overrides:
isTransformable
in classMObject
- Returns:
- true if the object can be transformed, false otherwise
-
checkValidity
public boolean checkValidity(MDocument doc, Collection<MolAtom> invec)
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
-
finishCloning
public void finishCloning(MDocument olddoc, MDocument newdoc)
Finish cloning a document. Called by the copy constructor.- Overrides:
finishCloning
in classMObject
-
setElectronIndex
public void setElectronIndex(String label, int dotIndex)
-
setBaseElectronContainerIndex
public void setBaseElectronContainerIndex(int baseElectronContainerIndex)
-
setBaseElectronIndexInContainer
public void setBaseElectronIndexInContainer(int baseElectronIndexInContainer)
-
-