A mutable implementation of the ILabel interface that can be used without an IGraph.
Remarks
Type Details
- yfiles module
- view-component
- yfiles-umd modules
- All view modules
- Legacy UMD name
- yfiles.graph.SimpleLabel
Constructors
Creates an instance of the SimpleLabel class with default lookup, an instance of VoidLabelStyle and the given parameter, text, and owner.
Parameters
A map of options to pass to the method.
- owner - ILabelOwner
- The label's owner.
- text - string
- The label's text.
- layoutParameter - ILabelModelParameter
- The parameter that describes the label's layout.
- 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 - Object
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.
Remarks
See Also
Implements
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 associated with this instance.
Remarks
See Also
Implements
Gets or sets the text string associated with this label.
Remarks
See Also
Implements
Methods
Gets the getPreferredSize from the labels style and sets the preferredSize to that value.
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 reobtained for subsequent use.Type Parameters
- T: any
Parameters
A map of options to pass to the method.
- type - Class<T>
- The type for which an instance shall be returned.
Returns
- ↪T
- an instance that is assignable to type or
null