A mutable implementation of the ILabel interface that can be used without an IGraph.
Remarks
Type Details
- yFiles module
- view
Constructors
Creates an instance of the SimpleLabel class with default lookup, VOID_LABEL_STYLE as style, and the given parameter, text, and owner.
Remarks
null
here, this can cause issues, e.g. with styles that require the owners to be non-null
to work properly.Parameters
A map of options to pass to the method.
- owner - ILabelOwner
- The label's owner. The default value is
null
. - text - string
- The label's text. The default value is an empty string.
- layoutParameter - ILabelModelParameter
- The parameter that describes the label's layout. The default value places the label at ORIGIN with the FreeLabelModel.
- style - ILabelStyle
- The style that is responsible for the visual representation of this node in a CanvasComponent. This option sets the style property on the created object.
- preferredSize - Size
- The preferred size of the label with respect to its current contents and the implementation of the visualization. This option sets the preferredSize property on the created object.
- tag - ILabel['tag']
Properties
Gets a snapshot of the current layout of the label.
Remarks
<0,-1>
), it coincides with its lower left corner. The positioning of the label is determined using a pair of ILabelModel and ILabelModelParameter. In order to modify the layout of a label instance, set another layoutParameter for this label or modify its associated instance.See Also
Defined in
Gets or sets the label model's parameter that determines the positioning of this label.
Remarks
See Also
Implements
Gets or sets the owner of this label.
Gets or sets the preferred size of the label with respect to its current contents and the implementation of the visualization.
Remarks
See Also
Implements
Gets or sets the style that is responsible for the visual representation of this node in a CanvasComponent.
Remarks
See Also
Implements
Gets or sets the tag object associated with this item instance.
Remarks
Implements
Gets or sets the text string associated with this label.
Remarks
See Also
Implements
Methods
Gets the getPreferredSize from the label's style and sets the preferredSize to that value.
Gets a LabelDecorator to modify the ports ILookup.
Returns
- ↪LabelDecorator
- A LabelDecorator for this instance.
Returns an instance that implements the given type or null
.
Remarks
null
implementations for the types, nor does it have to return the same instance any time. Also, it depends on the type and context whether the instance returned stays up to date or needs to be re-obtained for further use.Type Parameters
- T
Parameters
A map of options to pass to the method.
- type - Constructor<T>
- the type for which an instance shall be returned
Returns
- ↪T?
- an instance that is assignable to the type or
null