Package chemaxon.struc.graphics
Class MMidPoint
java.lang.Object
chemaxon.struc.MObject
chemaxon.struc.MPoint
chemaxon.struc.graphics.MMidPoint
- All Implemented Interfaces:
Serializable
,Cloneable
- Direct Known Subclasses:
MMidPoint.Sticky
Middle point in a line.
- Since:
- Marvin 4.1, 04/26/2006
- See Also:
-
Nested Class Summary
Modifier and TypeClassDescriptionstatic class
Fixed middle point that can be a point of a polyline. -
Field Summary
Fields inherited from class chemaxon.struc.MObject
TRANSFORM_DISTORT
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionvoid
Point added to a document.clone()
Creates a clone.boolean
Two midpoints equal if their parent lines are the same and the polyline point indices also equal.protected void
Gets the fixed location in the polyline.void
getLocation
(DPoint3 q, CTransform3D t) Gets the location.Gets the parent line.int
Gets the position in the polyline.int
hashCode()
boolean
Is this object a children of another one?boolean
Is the object selectable now?void
removeNotify
(MDocument doc) Point removed from a document.void
setLocation
(DPoint3 p, CTransform3D trot) Sets the locationtoString()
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, getPoint, getPointCount, getPointRef, getPointRefCount, 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, isTransformable, makeColor, removeAtom, removeChild, replaceAtom, setAttribute, setBackground, setColor, setLineColor, setSelected, unselectContents, updateBoundingRect, updateBoundingRect
-
Field Details
-
polylinePointIndex
protected transient int polylinePointIndex -
parentLine
-
-
Constructor Details
-
MMidPoint
Contructs a middle point object.- Parameters:
l
- the parent polylinei
- polyline point indexx
- the x coordinatey
- the y coordinatez
- the z coordinate
-
MMidPoint
Copy constructor.- Parameters:
p
- the point
-
-
Method Details
-
hashCode
public int hashCode() -
equals
Two midpoints equal if their parent lines are the same and the polyline point indices also equal. -
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
Is this object a children of another one? -
getPositionInPolyline
public int getPositionInPolyline()Gets the position in the polyline.- Returns:
- the position
-
getParentLine
Gets the parent line.- Returns:
- the parent line
-
addNotify
Point added to a document. -
removeNotify
Point removed from a document.- Overrides:
removeNotify
in classMObject
- Parameters:
doc
- The document from which the object is removed.
-
getLocation
Gets the location.- Overrides:
getLocation
in classMPoint
- Parameters:
q
- the output point objectt
- the transformation matrix or null
-
getFixedLocation
Gets the fixed location in the polyline.- Parameters:
q
- the output point objectt
- the transformation matrix or null
-
setLocation
Sets the location- Overrides:
setLocation
in classMPoint
- Parameters:
p
- the new locationtrot
- the viewing transformation or null
-
transform
Transforms all points. -
toString
Overrides Object.toString() to ease debugging. Returns a string consisting of the classname (without the package name!), the at-sign character `@
', the unsigned hexadecimal representation of the hash code of the object and location information in square brackets. The location information consists of the parent polyline's toString representation and the section index, separated by a comma.
-