public abstract class OutsideLabel extends Label
Modifier and Type | Class and Description |
---|---|
static class |
OutsideLabel.BoxOutsideLabel
A class for box outside labels.
|
static class |
OutsideLabel.LineLabel
A class for line outside labels.
|
Modifier and Type | Method and Description |
---|---|
InsideLabel |
createInsideLabel(java.awt.geom.Rectangle2D.Double rectangle,
LayoutConstraints.ConstraintType constraintType,
double spacing,
java.lang.Integer row,
java.lang.Integer column)
Creates a new inside label as a child of this container.
|
void |
flip()
Rotates this label sideways, i.e., swaps the width and the height of the label.
|
boolean |
isAutoFlipped()
Checks whether the auto flip parameter for this label is set.
|
boolean |
isFlipped()
Checks whether the label currently is rotated.
|
void |
resize(double width,
double height)
Resizes this label to the given dimensions while keeping its center unchanged if possible.
|
void |
resize(java.awt.geom.Rectangle2D.Double rectangle)
Resizes the label, moving it from its current relative position to the position defined by
the given rectangle center point.
|
abstract void |
setAutoFlip(boolean state)
Sets the auto flip parameter for this label.
|
void |
setSpacing(double spacing)
Sets the spacing of the element.
|
_convertToBoxOutsideLabel, _convertToInsideLabel, convertToBoxOutsideLabel, convertToBoxOutsideLabel, convertToInsideLabel, convertToInsideLabel, convertToLineLabel, convertToLineLabel, setMinHeight, setMinSize, setMinWidth
contains, createInsideLabel, createInsideLabel, findDescendantEnclosingRectangle, findNextRectangleEnclosingRectangle, getBottom, getBounds, getCenter, getCenterX, getCenterY, getHeight, getInsideLabels, getLayoutConstraints, getLeft, getMinHeight, getMinWidth, getRight, getTop, getWidth, remove, setConstraintType
getDiagram, getOwner, getSpacing, remove
public void flip()
isFlipped()
to check whether the label currently is flipped.public boolean isFlipped()
public abstract void setAutoFlip(boolean state)
flipped
is set, in which case this
ensures the label always runs perpendicular to the segment).state
- whether to set or unset the auto flip parameterpublic boolean isAutoFlipped()
public void resize(java.awt.geom.Rectangle2D.Double rectangle)
Label
rectangle
- the new position of the label to resize it topublic void resize(double width, double height)
width
- the new width of the labelheight
- the new height of the labelpublic void setSpacing(double spacing)
Element
setSpacing
in class Element
spacing
- the value to setpublic InsideLabel createInsideLabel(java.awt.geom.Rectangle2D.Double rectangle, LayoutConstraints.ConstraintType constraintType, double spacing, java.lang.Integer row, java.lang.Integer column)
AbstractContainer
createInsideLabel
in class AbstractContainer
rectangle
- the position of the new labelconstraintType
- the type of the layout constraints for the new labelspacing
- the spacing value for the new labelrow
- the row of the new label in this container's gridcolumn
- the column of the new label in this container's grid