A label model for stripe labels which supports the possible header positions of IRows and IColumns.
Remarks
This label model supports four positions inside the stripe bounds. The left and right positions are rotated automatically. ILabelModelParameters created by this model support only IStripe instances as label owner.
It uses the label's preferredSize for the size of the label layout.
Type Details
- yFiles module
- view
See Also
Sample Graphs
Constructors
Creates a new instance of this model with zero padding.
Parameters
A map of options to pass to the method.
- useTotalPadding - boolean
- A value indicating whether to use the global padding or the normal padding of a stripe for centering the label inside the stripe header area. This option sets the useTotalPadding property on the created object.
- ratio - number
- The ratio of how far the label should be positioned from the border in the header area. This option sets the ratio property on the created object.
Properties
Gets or sets a value indicating whether to use the global padding or the normal padding of a stripe for centering the label inside the stripe header area.
Remarks
true
the header padding is used. Default is false
Methods
Creates the parameter for the given position.
Parameters
A map of options to pass to the method.
- position - StripeLabelModelPosition
- The position.
Returns
- ↪StripeLabelModelParameter
- The parameter for the given position.
Provides a lookup context for the given label.
Calculates the geometry in the form of an IOrientedRectangle for a given label using the given model parameter.
Remarks
Parameters
A map of options to pass to the method.
- label - ILabel
- the label to calculate the geometry for
- layoutParameter - ILabelModelParameter
- A parameter that has been created by this model. This is typically the parameter that yielded this instance through its model property.
Returns
- ↪IOrientedRectangle
- An instance that describes the geometry. This is typically an instance designed as a flyweight, so clients should not cache the instance but store the values if they need a snapshot for later use
Implements
Constants
A predefined parameter instance that places a label inside the bottom header of a column.
Remarks
Sample Graphs
A predefined parameter instance that places a label inside the left header of a row.
Remarks
Sample Graphs
A predefined parameter instance that places a label inside the right header of a row.
Remarks
Sample Graphs
A predefined parameter instance that places a label inside the top header of a column.