Package chemaxon.struc.graphics
Class MBracket
java.lang.Object
chemaxon.struc.MObject
chemaxon.struc.graphics.MPolyline
chemaxon.struc.graphics.MRectangle
chemaxon.struc.graphics.MBracket
- All Implemented Interfaces:
Serializable,Cloneable
Bracket object.
- Since:
- Marvin 5.0, 01/09/2007
- See Also:
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final doubleThe default arc angle of the Braces Rectangle in degrees.static final doubleThe default arc angle of the Rounded Rectangle in degrees.static final intBraces.static final intChevrons.static final intThe bracket has two sides.static final intRound bracket type (parenthesis).static final intThe bracket has one side.static final intSquare bracket type.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
ConstructorsModifierConstructorDescriptionMBracket()Constructs a bracket.protectedCopy constructor.Constructs a bracket with the specified corner points.Constructs a bracket with the specified corner points and color. -
Method Summary
Modifier and TypeMethodDescriptionvoidAdds the attribute names to the specified list.clone()Creates a clone.voidCopies line properties to another line object.booleanenclosesPoint(double x, double y) Checks if a specified point is enclosed by this bracket.Gets the value of an attribute.intGets the orientation of the bracket.getLeftBracket(CTransform3D transform) getRightBracket(CTransform3D transform) getShapes(CTransform3D transform) intgetType()Gets the bracket type.getVisiblePointRef(int index, CTransform3D trot) Deprecated, for removal: This API element is subject to removal in a future version.intDeprecated, for removal: This API element is subject to removal in a future version.booleanA bracket has no background.voidsetAttribute(String s, String v) Sets the value of an attribute.voidsetBracketOrientation(int bracketOrientation) Sets the orientation of the bracket.voidsetType(int t) Sets the bracket type.voidtransform(CTransform3D t, int opts, CTransform3D trot) Transforms the bracket.voidupdateBoundingRect(double[] xyminm, CTransform3D pretrf) Calculate the bounding rectangle.Methods inherited from class chemaxon.struc.graphics.MRectangle
calcCenter, convertTransform, distanceFrom, fixClonedPoints, fixRectanglePointClones, getClip, getPointRef, getPointRefCount, getTCenter, getTOption, removeChild, setCorners, setTCenter, setTOption, 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, hasColor, hasFace, hasLineColor, hasOutline, isArrow, isEmpty, isThicknessSet, removeNotify, replaceAtom, reverse, rotate, setArcAngle, setArrow, setArrowFlags, setArrowLength, setArrowWidth, setFlags, setPoints, setSkip, setThickness, unselectContentsMethods inherited from class chemaxon.struc.MObject
addCdataAttributeKeys, addNotify, clearProperties, connectToSgroupOfAtom, containsPoint, 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
-
Field Details
-
T_ROUND
public static final int T_ROUNDRound bracket type (parenthesis).- See Also:
-
T_SQUARE
public static final int T_SQUARESquare bracket type.- See Also:
-
T_BRACES
public static final int T_BRACESBraces.- See Also:
-
T_CHEVRONS
public static final int T_CHEVRONSChevrons.- See Also:
-
T_SINGLE
public static final int T_SINGLEThe bracket has one side.- See Also:
-
T_DOUBLE
public static final int T_DOUBLEThe bracket has two sides.- See Also:
-
ARC_ROUND
public static final double ARC_ROUNDThe default arc angle of the Rounded Rectangle in degrees.- See Also:
-
ARC_BRACES
public static final double ARC_BRACESThe default arc angle of the Braces Rectangle in degrees.- See Also:
-
-
Constructor Details
-
MBracket
public MBracket()Constructs a bracket. -
MBracket
Constructs a bracket with the specified corner points.- Parameters:
p1- the top left cornerp2- the bottom right corner
-
MBracket
Constructs a bracket with the specified corner points and color.- Parameters:
p1- the top left cornerp2- the bottom right cornerc- the color
-
MBracket
Copy constructor.- Parameters:
r- the original bracket
-
-
Method Details
-
hasBackground
public boolean hasBackground()A bracket has no background.- Overrides:
hasBackgroundin classMPolyline- Returns:
- false
-
copyProperties
Copies line properties to another line object.- Parameters:
l- the other line
-
getType
public int getType()Gets the bracket type.- Returns:
- the type
- See Also:
-
setType
public void setType(int t) Sets the bracket type.- Parameters:
t- the type- See Also:
-
clone
Description copied from class:MObjectCreates a clone.- Overrides:
clonein classMRectangle- Returns:
- the clone
-
transform
Transforms the bracket.- Overrides:
transformin classMRectangle- Parameters:
t- the transformation matrixopts- transform options or 0trot- the viewing transformation or null- See Also:
-
addAttributeKeys
Adds the attribute names to the specified list. CDATA attributes are not added.- Overrides:
addAttributeKeysin classMRectangle- Parameters:
l- the list
-
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
-
getBracketOrientation
public int getBracketOrientation()Gets the orientation of the bracket.- Returns:
- the orientation of the bracket
- See Also:
-
setBracketOrientation
public void setBracketOrientation(int bracketOrientation) Sets the orientation of the bracket.- See Also:
-
enclosesPoint
public boolean enclosesPoint(double x, double y) Checks if a specified point is enclosed by this bracket.- Parameters:
x- the x coordinate of the point to be testedy- the y coordinate of the point to be tested- Returns:
- true if the point is enclosed by this bracket, false otherwise.
-
getVisiblePointRefCount
@Deprecated(forRemoval=true) @SubjectToRemoval(date=JUL_01_2025) public int getVisiblePointRefCount()Deprecated, for removal: This API element is subject to removal in a future version.Gets the number of internal selectable point references that are visible when highlighting.- Returns:
- the number of selectable points.
-
getVisiblePointRef
@Deprecated(forRemoval=true) @SubjectToRemoval(date=JUL_01_2025) public MPoint getVisiblePointRef(int index, CTransform3D trot) Deprecated, for removal: This API element is subject to removal in a future version.Gets an internal selectable point of the rectangle.that is visible when highlighting.- Parameters:
index- the point indextrot- the viewing transformation or null- Returns:
- the point's reference
-
updateBoundingRect
Description copied from class:MPolylineCalculate the bounding rectangle.- Overrides:
updateBoundingRectin classMPolyline- Parameters:
xyminm- array containing the current minimum x, y and maximum x, y coordinatespretrf- transformation matrix
-
getLeftBracket
-
getRightBracket
-
getShapes
-