public abstract class Label extends AbstractContainer
Modifier and Type | Method and Description |
---|---|
OutsideLabel.BoxOutsideLabel |
_convertToBoxOutsideLabel(Box newOwner)
Converts this label to a box outside label belonging to the new owner.
|
InsideLabel |
_convertToInsideLabel(AbstractContainer newOwner)
Converts this label to an inside label belonging to the new owner.
|
OutsideLabel.BoxOutsideLabel |
convertToBoxOutsideLabel(Box.BoxSide side,
double position,
Box box)
Converts this label to a box outside label (if it wasn't already), then moves this label to
the given side of the given box at the given position.
|
OutsideLabel.BoxOutsideLabel |
convertToBoxOutsideLabel(java.awt.geom.Point2D.Double point,
Box box)
Converts this label to a box outside label (if it wasn't already), then moves this box
outside label to the given point onto the given box.
|
InsideLabel |
convertToInsideLabel(java.awt.geom.Point2D.Double newCenter,
AbstractContainer newOwner,
java.awt.geom.Point2D.Double growPoint)
Converts this label to an inside label (if it wasn't already), then places it at the given
position, along with its children.
|
InsideLabel |
convertToInsideLabel(java.awt.geom.Point2D.Double newCenter,
AbstractContainer newOwner,
java.awt.geom.Point2D.Double growPoint,
java.lang.Integer row,
java.lang.Integer column)
Converts this label to an inside label (if it wasn't already), then places it at the given
position, along with its children.
|
OutsideLabel.LineLabel |
convertToLineLabel(double position,
Line newOwner,
OutsideLabel.LineLabel.Orientation orientation)
Converts this label to a line label (if it wasn't already), then moves this label to the
given relative position on the given line.
|
OutsideLabel.LineLabel |
convertToLineLabel(java.awt.geom.Point2D.Double point,
Line newOwner,
OutsideLabel.LineLabel.Orientation orientation)
Converts this label to a line label (if it wasn't already), then moves this label to the
given point on the given line.
|
void |
setMinHeight(double minHeight)
Sets the minimum height.
|
void |
setMinSize(double width,
double height)
Sets the minimum size of the label.
|
void |
setMinWidth(double minWidth)
Sets the minimum width.
|
contains, createInsideLabel, createInsideLabel, createInsideLabel, findDescendantEnclosingRectangle, findNextRectangleEnclosingRectangle, getBottom, getBounds, getCenter, getCenterX, getCenterY, getHeight, getInsideLabels, getLayoutConstraints, getLeft, getMinHeight, getMinWidth, getRight, getTop, getWidth, remove, setConstraintType
getDiagram, getOwner, getSpacing, remove, setSpacing
public void setMinHeight(double minHeight)
minHeight
- the new minimum heightpublic void setMinWidth(double minWidth)
minWidth
- the new minimum widthpublic void setMinSize(double width, double height)
width
- the new minimum widthheight
- the new minimum heightpublic InsideLabel _convertToInsideLabel(AbstractContainer newOwner)
newOwner
- the owner of the new inside label.public InsideLabel convertToInsideLabel(java.awt.geom.Point2D.Double newCenter, AbstractContainer newOwner, java.awt.geom.Point2D.Double growPoint)
newCenter
- the new desired center of the labelnewOwner
- the new owner of the labelgrowPoint
- the exact point at which to insert the label, it will then be grow from that
point to its desired position as per resize(java.awt.geom.Rectangle2D.Double)
public InsideLabel convertToInsideLabel(java.awt.geom.Point2D.Double newCenter, AbstractContainer newOwner, java.awt.geom.Point2D.Double growPoint, java.lang.Integer row, java.lang.Integer column)
newCenter
- the new desired center of the labelnewOwner
- the new owner of the labelgrowPoint
- the exact point at which to insert the label, it will then be grow from that
point to its desired position as per resize(java.awt.geom.Rectangle2D.Double)
row
- the row of the label in new owner's gridcolumn
- the column of the label in new owner's gridpublic OutsideLabel.BoxOutsideLabel _convertToBoxOutsideLabel(Box newOwner)
newOwner
- the owner of the new box outside label.public OutsideLabel.BoxOutsideLabel convertToBoxOutsideLabel(java.awt.geom.Point2D.Double point, Box box)
point
- the point to move this label to. If this point is not on the perimeter of this
label's box, it is moved there.box
- the new box owner of this labelpublic OutsideLabel.BoxOutsideLabel convertToBoxOutsideLabel(Box.BoxSide side, double position, Box box)
side
- the side of this labels box to move it toposition
- the position on this side to place the label at, as a proportion of the whole
length of the side. Must be between 0 and 1, inclusive.box
- the new box owner of this labelpublic OutsideLabel.LineLabel convertToLineLabel(java.awt.geom.Point2D.Double point, Line newOwner, OutsideLabel.LineLabel.Orientation orientation)
point
- the point where to move this labelnewOwner
- the line on which to place this labelorientation
- the orientation of the new line labelpublic OutsideLabel.LineLabel convertToLineLabel(double position, Line newOwner, OutsideLabel.LineLabel.Orientation orientation)
position
- the relative position where to place this label on the line (should be
between 0 and 1, inclusive)newOwner
- the line on which to place this labelorientation
- the orientation of the new line label