A label model for node labels that lie inside the node's layout bounds and have been stretched to fit the node's size.
Implements
- I
Remarks
This label model supports seven positions inside the layout's bounds.
The label's preferredSize is ignored. Instead, the label is stretched to fit the node's width and/or height.
For the vertical positions CENTER_VERTICAL, LEFT, and RIGHT the label is rotated by 90 degrees.
See Also
Developer's Guide
Members
No filters for this type
Constructors
Properties
Methods
Creates the parameter for the given position.
Creates the parameter for the given position.
Parameters
- position: StretchNodeLabelModelPosition
- The position.
Return Value
- StretchNodeLabelModelParameter
- The parameter for the given position.
Provides a lookup context for the given label.
Provides a lookup context for the given label.
Parameters
- label: ILabel
- The label to use in the context.
Return Value
- ILookup
- An implementation of the ILookup interface that can be used to query additional aspects of the label.
Implements
ILabelModel.getContextCalculates the geometry of the given label using the given model parameter.
Calculates the geometry of the given label using the given model parameter.
final
Parameters
- label: ILabel
- The label to calculate the geometry for.
- layoutParameter: ILabelModelParameter
- A parameter that is compatible with this model. Typically, this is a parameter that has been created by this model, and its property model returns this instance.
Return Value
- IOrientedRectangle
- An IOrientedRectangle that describes the geometry of the label. This is typically designed as a flyweight, therefore clients should not cache the instance but store the values if they need a snapshot for later use.
Implements
ILabelModel.getGeometryReturns the minimum size this model would require for the node owner of the label if the given label was used with the provided parameter.
Returns the minimum size this model would require for the node owner of the label if the given label was used with the provided parameter.
Parameters
- label: ILabel
- The label to use.
- layoutParameter: ILabelModelParameter
- The parameter to use.
Return Value
- Size
- The minimum size requirements for this label.
Returns the padding this model would require for the node owner of the label if the given label were used with the provided parameter.
Returns the padding this model would require for the node owner of the label if the given label were used with the provided parameter.
Parameters
- label: ILabel
- The label to use.
- layoutParameter: ILabelModelParameter
- The parameter to use.
Return Value
- Insets
- The padding rectangle.
Constants
A predefined parameter that places the label on the bottom side of the node interior, stretching over the node's width.
A predefined parameter that places the label on the bottom side of the node interior, stretching over the node's width.
This parameter's model is immutable. Trying to change its padding property will raise an InvalidOperationError.
static
Sample Graphs
A predefined parameter that places the label inside the node, filling the node's layout.
A predefined parameter that places the label inside the node, filling the node's layout.
This parameter's model is immutable. Trying to change its padding property will raise an InvalidOperationError.
static
Sample Graphs
See Also
Developer's Guide
A predefined parameter that places the label at the vertical center with the preferred height of the label and the width of the node.
A predefined parameter that places the label at the vertical center with the preferred height of the label and the width of the node.
This parameter's model is immutable. Trying to change its padding property will raise an InvalidOperationError.
static
Sample Graphs
A predefined parameter that places the label at the horizontal center with the preferred width of the label and the height of the node.
A predefined parameter that places the label at the horizontal center with the preferred width of the label and the height of the node.
This parameter's model is immutable. Trying to change its padding property will raise an InvalidOperationError.
static
Sample Graphs
A predefined parameter that places the label on the left side of the node interior, stretching over the node's height.
A predefined parameter that places the label on the left side of the node interior, stretching over the node's height.
The label is rotated 90 degrees counterclockwise.
This parameter's model is immutable. Trying to change its padding property will raise an InvalidOperationError.
static
Sample Graphs
A predefined parameter that places the label on the right side of the node interior, stretching over the node's height.
A predefined parameter that places the label on the right side of the node interior, stretching over the node's height.
The label is rotated 90 degrees clockwise.
This parameter's model is immutable. Trying to change its padding property will raise an InvalidOperationError.
static
Sample Graphs
A predefined parameter that places the label on the top side of the node interior, stretching over the node's width.
A predefined parameter that places the label on the top side of the node interior, stretching over the node's width.
This parameter's model is immutable. Trying to change its padding property will raise an InvalidOperationError.
static