Package chemaxon.struc.graphics
Class MRoundedRectangle
java.lang.Object
chemaxon.struc.MObject
chemaxon.struc.graphics.MPolyline
chemaxon.struc.graphics.MRectangle
chemaxon.struc.graphics.MRoundedRectangle
- All Implemented Interfaces:
Serializable,Cloneable
Rounded rectangle object.
- Since:
- Marvin 5.3,
- See Also:
-
Field Summary
Fields inherited from class chemaxon.struc.graphics.MRectangle
P_CENTER, P_E, P_N, P_NE, P_NW, P_S, P_SE, P_SW, P_W, T_NOROTFields inherited from class chemaxon.struc.graphics.MPolyline
ARROW_BACK_FLAG, ARROW_CROSSED_FLAG, ARROW_CURVED_FLAG, ARROW_DASHED_FLAG, ARROW_EQUILIBRIUM_FLAG, ARROW_GROUP1_MASK, ARROW_GROUP2_MASK, ARROW_HALF_LEFT, ARROW_HALF_MASK, ARROW_HALF_RIGHT, ARROW_RETROSYNTHETIC_FLAG, arrowFlags, CLOSED_FLAG, DEFAULT_ARROW_HEAD_LENGTH, DEFAULT_ARROW_HEAD_WIDTH, DEFAULT_EQUILIBRIUM_HEAD_WIDTH, DEFAULT_MAX_CROSS_SIZE, DEFAULT_RETROSYNTHETIC_HEAD_WIDTH, DEFAULT_THICKNESS, HEAD, points, TAIL, THICKNESS_SET_FLAGFields inherited from class chemaxon.struc.MObject
TRANSFORM_DISTORT -
Constructor Summary
ConstructorsModifierConstructorDescriptionConstructs a rounded rectangleprotectedCopy constructor.MRoundedRectangle(MPoint p1, MPoint p2) Constructs a rounded rectangle with the specified corner points.MRoundedRectangle(MPoint p1, MPoint p2, double aw, double ah) Constructs a rounded rectangle with the specified corner points.MRoundedRectangle(MPoint p1, MPoint p2, double aw, double ah, Color c) Constructs a rounded rectangle with the specified corner points and color.MRoundedRectangle(MPoint p1, MPoint p2, Color c) Constructs a rounded rectangle with the specified corner points and color. -
Method Summary
Modifier and TypeMethodDescriptionvoidAdds the attribute names to the specified vector.clone()Creates a clone.booleancontainsPoint(DPoint3 p, CTransform3D trot) voidcorrectCornersRadius(double aw, double ah) doubledoubleGets the value of an attribute.getInnerPointRef(int i, CTransform3D trot) getPointRef(int i, CTransform3D trot) Gets an internal selectable point of the rectangle.intGets the number of internal selectable point references.voidsetArcHeight(double ah) voidsetArcWidth(double aw) voidsetAttribute(String s, String v) Sets the value of an attribute.voidsetCornersRadius(double aw, double ah) Methods inherited from class chemaxon.struc.graphics.MRectangle
calcCenter, convertTransform, distanceFrom, fixClonedPoints, fixRectanglePointClones, getClip, getTCenter, getTOption, removeChild, setCorners, setTCenter, setTOption, transform, transformTo2DMethods inherited from class chemaxon.struc.graphics.MPolyline
checkValidity, containsAtom, copyProperties, finishCloning, fixMidPointClones, getArcAngle, getArcCenter, getArcRadius, getArcRadius, getArrowFlags, getArrowLength, getArrowWidth, getFlags, getLineMiddlePoint, getMidPointLocation, getMirroredArrowFlags, getPoint, getPointCount, getPoints, getSkip, getThickness, hasBackground, hasColor, hasFace, hasLineColor, hasOutline, isArrow, isEmpty, isThicknessSet, removeNotify, replaceAtom, reverse, rotate, setArcAngle, setArrow, setArrowFlags, setArrowLength, setArrowWidth, setFlags, setPoints, setSkip, setThickness, unselectContents, updateBoundingRectMethods inherited from class chemaxon.struc.MObject
addCdataAttributeKeys, addNotify, clearProperties, connectToSgroupOfAtom, containsPropertyKey, distanceFrom, getBackground, getColor, getContainerMObject, getLineColor, getProperty, isChildOf, isInternalSelectable, isReactionArrow, isSelectableNow, isSelected, isTransformable, makeColor, propertyCount, propertyKeySet, propertySet, putProperty, removeAtom, removeProperty, setBackground, setColor, setLineColor, setSelected, toString, updateBoundingRect
-
Constructor Details
-
MRoundedRectangle
public MRoundedRectangle()Constructs a rounded rectangle -
MRoundedRectangle
Constructs a rounded rectangle with the specified corner points.- Parameters:
p1- the top left cornerp2- the bottom right corner
-
MRoundedRectangle
Constructs a rounded rectangle with the specified corner points.- Parameters:
p1- the top left cornerp2- the bottom right corneraw- the width of the corner's ellipseah- the height of the corner's ellipse
-
MRoundedRectangle
Constructs a rounded rectangle with the specified corner points and color.- Parameters:
p1- the top left cornerp2- the bottom right cornerc- the color
-
MRoundedRectangle
Constructs a rounded rectangle with the specified corner points and color.- Parameters:
p1- the top left cornerp2- the bottom right corneraw- the width of the corner's ellipseah- the height of the corner's ellipsec- the color
-
MRoundedRectangle
Copy constructor.- Parameters:
rr- the original rounded rectangle
-
-
Method Details
-
clone
Description copied from class:MObjectCreates a clone.- Overrides:
clonein classMRectangle- Returns:
- the clone
-
setArcWidth
public void setArcWidth(double aw) -
setArcHeight
public void setArcHeight(double ah) -
getArcWidth
public double getArcWidth() -
getArcHeight
public double getArcHeight() -
setCornersRadius
public void setCornersRadius(double aw, double ah) -
correctCornersRadius
public void correctCornersRadius(double aw, double ah) -
addAttributeKeys
Adds the attribute names to the specified vector.- Overrides:
addAttributeKeysin classMRectangle- Parameters:
l- the list of attributes
-
getAttribute
Gets the value of an attribute.- Overrides:
getAttributein classMRectangle- Parameters:
s- the attribute name- Returns:
- the value or null
-
setAttribute
Sets the value of an attribute.- Overrides:
setAttributein classMRectangle- Parameters:
s- the attribute namev- the attribute value
-
containsPoint
- Overrides:
containsPointin classMObject
-
getPointRefCount
public int getPointRefCount()Gets the number of internal selectable point references.- Overrides:
getPointRefCountin classMRectangle- Returns:
- 8
-
getPointRef
Gets an internal selectable point of the rectangle.- Overrides:
getPointRefin classMRectangle- Parameters:
i- the point indextrot- the viewing transformation or null- Returns:
- the point's reference
-
getInnerPointRef
-