A canonical implementation of the ILabelDefaults interface
Type Details
- yfiles module
- view-component
- yfiles-umd modules
- All view modules
- Legacy UMD name
- yfiles.graph.LabelDefaults
Constructors
Initializes a new instance of the LabelDefaults class using a trivial parameter.
Parameters
options - Object
A map of options to pass to the method.
A map of options to pass to the method.
- autoAdjustPreferredSize - boolean
- shareLayoutParameterInstance - boolean
- layoutParameter - ILabelModelParameter
- style - ILabelStyle
- shareStyleInstance - boolean
Properties
Gets or sets a property that determines whether to automatically adjust the preferred size of a label.
Remarks
On a call to setLabelText or setStyle, the preferred size of the label will automatically be adjusted to the preferred size that is suggested by the label's style renderer, if this property is set to true.
See Also
Implements
Gets or sets the label model parameter to use for labels.
Remarks
Depending on the setting of shareLayoutParameterInstance, the getLayoutParameterInstance method should return a clone of this instance or the very same instance.
See Also
Implements
Gets or sets the style to use for labels.
Remarks
Depending on the setting of shareStyleInstance, the getStyleInstance method should return a clone of this instance or the very same instance.
See Also
Implements
Methods
Factory method that returns a label model parameter instance for use with newly created labels.
Remarks
Most implementations will yield either, a clone of or the layoutParameter property, if shareLayoutParameterInstance is enabled, but they might use more complicated logic, too.
Parameters
options - Object
A map of options to pass to the method.
A map of options to pass to the method.
- owner - ILabelOwner
- The owner of the label that will be created.
Returns
- ↪ILabelModelParameter
- The parameter to use, which for most implementations is either a clone of or the layoutParameter property, if shareLayoutParameterInstance is enabled.
Implements
Factory method that returns a style instance for use with newly created labels.
Remarks
Most implementations will yield either, a clone of or the style property, if shareStyleInstance is enabled, but they might use more complicated logic, too.
Parameters
options - Object
A map of options to pass to the method.
A map of options to pass to the method.
- owner - ILabelOwner
- The owner of the label that will be created.
Returns
- ↪ILabelStyle
- The style to use, which for most implementations is either a clone of or the style property, if shareStyleInstance is enabled.