Package chemaxon.struc.graphics
Class MRectanglePoint
- java.lang.Object
-
- chemaxon.struc.MObject
-
- chemaxon.struc.MPoint
-
- chemaxon.struc.graphics.MRectanglePoint
-
- All Implemented Interfaces:
Serializable
,Cloneable
- Direct Known Subclasses:
MRectanglePoint.Sticky
@PublicAPI public class MRectanglePoint extends MPoint
Rectangle point object.- Since:
- Marvin 3.3, 10/18/2003
- See Also:
- Serialized Form
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
MRectanglePoint.Sticky
Fixed rectangle point that can be a point of a polyline.
-
Field Summary
Fields Modifier and Type Field Description protected MRectangle
parentRect
protected byte
positionInRect
-
Fields inherited from class chemaxon.struc.MObject
TRANSFORM_DISTORT
-
-
Constructor Summary
Constructors Modifier Constructor Description protected
MRectanglePoint(MRectangle r, int i, double x, double y, double z)
Contructs a rectangle corner point object.protected
MRectanglePoint(MRectanglePoint p)
Copy constructor.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
addNotify(MDocument doc)
Point added to a document.MRectanglePoint
clone()
Creates a clone.boolean
equals(Object o)
Two rectangle points equal if their parent rectangles are the same and they are on the same corner or edge.MRectangle
getParentRect()
Gets the parent rectangle.int
getPositionInRect()
Gets the position in the rectangle.boolean
isChildOf(MObject o)
Is this object a children of another one?boolean
isSelectableNow()
Is the object selectable now?boolean
isTransformable()
Is it a transformable object?void
removeNotify(MDocument doc)
Point removed from a document.void
setLocation(DPoint3 p, CTransform3D t)
Sets the coordinates.String
toString()
Overrides Object.toString() to ease debugging.void
transform(CTransform3D t, int opts, CTransform3D trot)
Transforms all points.-
Methods inherited from class chemaxon.struc.MPoint
calcCenter, distanceFrom, getLocation, getLocation, getLocation, getPoint, getPointCount, getPointRef, getPointRefCount, hashCode, isInternalSelectable
-
Methods inherited from class chemaxon.struc.MObject
addAttributeKeys, addCdataAttributeKeys, checkValidity, connectToSgroupOfAtom, containsAtom, containsPoint, distanceFrom, finishCloning, fixClonedPoints, getAttribute, getBackground, getColor, getContainerMObject, getLineColor, hasBackground, hasColor, hasLineColor, isEmpty, isReactionArrow, isSelected, makeColor, removeAtom, removeChild, replaceAtom, setAttribute, setBackground, setColor, setLineColor, setSelected, unselectContents, updateBoundingRect, updateBoundingRect
-
-
-
-
Field Detail
-
positionInRect
protected transient byte positionInRect
-
parentRect
protected transient MRectangle parentRect
-
-
Constructor Detail
-
MRectanglePoint
protected MRectanglePoint(MRectangle r, int i, double x, double y, double z)
Contructs a rectangle corner point object.- Parameters:
r
- the parent rectanglei
- position on the rectangle (0-3)x
- the x coordinatey
- the y coordinatez
- the z coordinate
-
MRectanglePoint
protected MRectanglePoint(MRectanglePoint p)
Copy constructor.- Parameters:
p
- the point
-
-
Method Detail
-
equals
public boolean equals(Object o)
Two rectangle points equal if their parent rectangles are the same and they are on the same corner or edge.
-
clone
public MRectanglePoint clone()
Description copied from class:MObject
Creates a clone.
-
isSelectableNow
public boolean isSelectableNow()
Description copied from class:MObject
Is the object selectable now?- Overrides:
isSelectableNow
in classMObject
- Returns:
- true for ordinary objects, false for some internal selectables
-
isChildOf
public boolean isChildOf(MObject o)
Is this object a children of another one?
-
getPositionInRect
public int getPositionInRect()
Gets the position in the rectangle.- Returns:
- the position
- Since:
- Marvin 4.1, 03/06/2006
-
getParentRect
public MRectangle getParentRect()
Gets the parent rectangle.- Returns:
- the parent rectangle
- Since:
- Marvin 4.1, 03/06/2006
-
addNotify
public void addNotify(MDocument doc)
Point added to a document.
-
removeNotify
public void removeNotify(MDocument doc)
Point removed from a document.- Overrides:
removeNotify
in classMObject
- Parameters:
doc
- The document from which the object is removed.
-
setLocation
public void setLocation(DPoint3 p, CTransform3D t)
Sets the coordinates.- Overrides:
setLocation
in classMPoint
- Parameters:
p
- the new locationt
- the viewing transformation or null
-
transform
public void transform(CTransform3D t, int opts, CTransform3D trot)
Transforms all points.- Overrides:
transform
in classMPoint
- Parameters:
t
- the transformation matrixopts
- the optionstrot
- the viewing transformation or null- See Also:
MObject.TRANSFORM_DISTORT
-
toString
public String 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.
-
isTransformable
public boolean isTransformable()
Description copied from class:MObject
Is it a transformable object?- Overrides:
isTransformable
in classMObject
- Returns:
- true if the object can be transformed, false otherwise
-
-