public static class OutsideLabel.LineLabel extends OutsideLabel
Modifier and Type | Class and Description |
---|---|
static class |
OutsideLabel.LineLabel.Orientation
This enumeration defines the options for limiting on which side of their line can labels
be placed.
|
OutsideLabel.BoxOutsideLabel, OutsideLabel.LineLabel
Modifier and Type | Method and Description |
---|---|
OutsideLabel.LineLabel.Orientation |
getOrientation()
Returns the orientation of this line label.
|
Line |
getOwner()
Each element can be owned by some other element.
|
double |
getRotationAngle()
Returns the clockwise rotation angle for this label if this label is to be rotated.
|
boolean |
isRotated()
Returns whether the label is rotated.Labels for orthogonal lines are never rotated, even
if this method returns
true . |
void |
move(double position,
Line line)
Moves this label to the given relative position on the given line.
|
void |
move(java.awt.geom.Point2D.Double point,
Line line)
Moves this label to the given point on the given line.
|
void |
setAutoFlip(boolean state)
Sets the auto flip parameter for this label.
|
void |
setOrientation(OutsideLabel.LineLabel.Orientation orientation)
Sets the orientation of this line label.
|
void |
setRotation(boolean state)
Sets whether to rotate this label.
|
createInsideLabel, flip, isAutoFlipped, isFlipped, resize, resize, setSpacing
_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, getSpacing, remove
public OutsideLabel.LineLabel.Orientation getOrientation()
public void setOrientation(OutsideLabel.LineLabel.Orientation orientation)
orientation
- the new orientation of this line labelpublic double getRotationAngle()
public void setRotation(boolean state)
true
.state
- the rotation state of the label.public boolean isRotated()
true
.public Line getOwner()
Element
public void setAutoFlip(boolean state)
OutsideLabel
OutsideLabel.flipped
is set, in which case this
ensures the label always runs perpendicular to the segment).setAutoFlip
in class OutsideLabel
state
- whether to set or unset the auto flip parameterpublic void move(java.awt.geom.Point2D.Double point, Line line)
point
- the point where to move this labelline
- the line on which to place this labelpublic void move(double position, Line line)
position
- the relative position where to place this label on the line (should be
between 0 and 1, inclusive)line
- the line on which to place this label