public class MBracket extends MRectangle
| Modifier and Type | Field and Description |
|---|---|
static double |
ARC_BRACES
The default arc angle of the Braces Rectangle in degrees.
|
static double |
ARC_ROUND
The default arc angle of the Rounded Rectangle in degrees.
|
static int |
T_BRACES
Braces.
|
static int |
T_CHEVRONS
Chevrons.
|
static int |
T_DOUBLE
The bracket has two sides.
|
static int |
T_ROUND
Round bracket type (parenthesis).
|
static int |
T_SINGLE
The bracket has one side.
|
static int |
T_SQUARE
Square bracket type.
|
P_CENTER, P_E, P_N, P_NE, P_NW, P_S, P_SE, P_SW, P_W, T_NOROTARROW_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_FLAGPAINT_ANTIALIAS, PAINT_FOCUSED, TRANSFORM_DISTORT| Modifier | Constructor and Description |
|---|---|
|
MBracket()
Constructs a bracket.
|
protected |
MBracket(MBracket r)
Copy constructor.
|
|
MBracket(MPoint p1,
MPoint p2)
Constructs a bracket with the specified corner points.
|
|
MBracket(MPoint p1,
MPoint p2,
Color c)
Constructs a bracket with the specified corner points and color.
|
| Modifier and Type | Method and Description |
|---|---|
void |
addAttributeKeys(List<String> l)
Adds the attribute names to the specified list.
|
MBracket |
clone()
Creates a clone.
|
void |
copyProperties(MBracket l)
Copies line properties to another line object.
|
boolean |
enclosesPoint(double x,
double y)
Checks if a specified point is enclosed by this bracket.
|
String |
getAttribute(String s)
Gets the value of an attribute.
|
int |
getBracketOrientation()
Gets the orientation of the bracket.
|
List<Shape> |
getLeftBracket(CTransform3D transform) |
List<Shape> |
getRightBracket(CTransform3D transform) |
List<Shape> |
getShapes(CTransform3D transform) |
int |
getType()
Gets the bracket type.
|
MPoint |
getVisiblePointRef(int index,
CTransform3D trot)
Gets an internal selectable point of the rectangle.that is visible when highlighting.
|
int |
getVisiblePointRefCount()
Gets the number of internal selectable point references that are visible when highlighting.
|
boolean |
hasBackground()
A bracket has no background.
|
void |
setAttribute(String s,
String v)
Sets the value of an attribute.
|
void |
setBracketOrientation(int bracketOrientation)
Sets the orientation of the bracket.
|
void |
setType(int t)
Sets the bracket type.
|
void |
transform(CTransform3D t,
int opts,
CTransform3D trot)
Transforms the bracket.
|
void |
updateBoundingRect(double[] xyminm,
CTransform3D pretrf)
Calculate the bounding rectangle.
|
calcCenter, convertTransform, distanceFrom, fixClonedPoints, fixRectanglePointClones, getClip, getPointRef, getPointRefCount, getTCenter, getTOption, removeChild, setCorners, setTCenter, setTOption, transformTo2DcheckValidity, 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, unselectContentsaddCdataAttributeKeys, addNotify, addNotify, connectToSgroupOfAtom, containsPoint, distanceFrom, getBackground, getColor, getLineColor, isChildOf, isInternalSelectable, isReactionArrow, isSelectableNow, isSelected, isTransformable, makeColor, removeAtom, removeNotify, setBackground, setColor, setLineColor, setSelected, toString, updateBoundingRectpublic static final int T_ROUND
public static final int T_SQUARE
public static final int T_BRACES
public static final int T_CHEVRONS
public static final int T_SINGLE
public static final int T_DOUBLE
public static final double ARC_ROUND
public static final double ARC_BRACES
public MBracket()
public MBracket(MPoint p1, MPoint p2)
p1 - the top left cornerp2 - the bottom right cornerpublic MBracket(MPoint p1, MPoint p2, Color c)
p1 - the top left cornerp2 - the bottom right cornerc - the colorprotected MBracket(MBracket r)
r - the original bracketpublic boolean hasBackground()
hasBackground in class MPolylinepublic void copyProperties(MBracket l)
l - the other linepublic int getType()
T_SQUARE,
T_ROUND,
T_BRACES,
T_CHEVRONSpublic void setType(int t)
t - the typeT_SQUARE,
T_ROUND,
T_BRACES,
T_CHEVRONSpublic MBracket clone()
MObjectclone in class MRectanglepublic void transform(CTransform3D t, int opts, CTransform3D trot)
transform in class MRectanglet - the transformation matrixopts - transform options or 0trot - the viewing transformation or nullMObject.TRANSFORM_DISTORTpublic void addAttributeKeys(List<String> l)
addAttributeKeys in class MRectanglel - the listpublic String getAttribute(String s)
getAttribute in class MRectangles - the attribute namepublic void setAttribute(String s, String v)
setAttribute in class MRectangles - the attribute namev - the attribute valuepublic int getBracketOrientation()
public void setBracketOrientation(int bracketOrientation)
public boolean enclosesPoint(double x,
double y)
x - the x coordinate of the point to be testedy - the y coordinate of the point to be testedpublic int getVisiblePointRefCount()
public MPoint getVisiblePointRef(int index, CTransform3D trot)
index - the point indextrot - the viewing transformation or nullpublic void updateBoundingRect(double[] xyminm,
CTransform3D pretrf)
MPolylineupdateBoundingRect in class MPolylinexyminm - array containing the current minimum x, y and
maximum x, y coordinatespretrf - transformation matrixpublic List<Shape> getLeftBracket(CTransform3D transform)
public List<Shape> getRightBracket(CTransform3D transform)
public List<Shape> getShapes(CTransform3D transform)