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
Nested ClassesModifier and TypeClassDescriptionstatic classFixed middle point that can be a point of a polyline. -
Field Summary
FieldsFields inherited from class chemaxon.struc.MObject
TRANSFORM_DISTORT -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidPoint added to a document.clone()Creates a clone.booleanTwo midpoints equal if their parent lines are the same and the polyline point indices also equal.protected voidGets the fixed location in the polyline.voidgetLocation(DPoint3 q, CTransform3D t) Gets the location.Gets the parent line.intGets the position in the polyline.inthashCode()booleanIs this object a children of another one?booleanIs the object selectable now?voidremoveNotify(MDocument doc) Point removed from a document.voidsetLocation(DPoint3 p, CTransform3D trot) Sets the locationtoString()Overrides Object.toString() to ease debugging.voidtransform(CTransform3D t, int opts, CTransform3D trot) Transforms all points.Methods inherited from class chemaxon.struc.MPoint
calcCenter, distanceFrom, getLocation, getLocation, getPoint, getPointCount, getPointRef, getPointRefCount, isInternalSelectableMethods inherited from class chemaxon.struc.MObject
addAttributeKeys, addCdataAttributeKeys, checkValidity, clearProperties, connectToSgroupOfAtom, containsAtom, containsPoint, containsPropertyKey, distanceFrom, finishCloning, fixClonedPoints, getAttribute, getBackground, getColor, getContainerMObject, getLineColor, getProperty, hasBackground, hasColor, hasLineColor, isEmpty, isReactionArrow, isSelected, isTransformable, makeColor, propertyCount, propertyKeySet, propertySet, putProperty, removeAtom, removeChild, removeProperty, 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:MObjectCreates a clone. -
isSelectableNow
public boolean isSelectableNow()Description copied from class:MObjectIs the object selectable now?- Overrides:
isSelectableNowin 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:
removeNotifyin classMObject- Parameters:
doc- The document from which the object is removed.
-
getLocation
Gets the location.- Overrides:
getLocationin 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:
setLocationin 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.
-