An abstract base class for data containers representing the state of model items which can own labels.
Inheritance Hierarchy
Remarks
Developers should not extend this class. Only instances of its subclasses FolderNodeState and FoldingEdgeState are supported.
When the properties of the state are changed, these changes are reflected immediately in the views.
Examples
const state = manager.getFolderNodeState(masterNode)
const labelState = state.labels.get(0)
labelState.text = 'New Label Text'const state = manager.getFolderNodeState(masterNode)
const style = new LabelStyle()
state.addLabel(
'Folder Label',
InteriorNodeLabelModel.TOP_RIGHT,
style,
new Size(20, 10),
)See Also
Members
No filters for this type
Constructors
Properties
Gets the FoldingLabelStates owned by this state.
Gets the FoldingLabelStates owned by this state.
readonly
Examples
const state = manager.getFolderNodeState(masterNode)
const labelState = state.labels.get(0)
labelState.text = 'New Label Text'const state = manager.getFolderNodeState(masterNode)
const labelState = state.labels.get(0)
labelState.text = 'New Label Text'Methods
Adds a FoldingLabelState to this state.
Adds a FoldingLabelState to this state.
abstract
Parameters
- text: string
- The text of the new label.
- layoutParameter?: ILabelModelParameter
- The layout parameter of the new label.
- style?: ILabelStyle
- The style of the new label.
- preferredSize?: Size
- The preferred size of the label.
- tag?: ILabel['tag']
- The tag of the label.
Return Value
- FoldingLabelState
- The newly added FoldingLabelState.
Examples
const state = manager.getFolderNodeState(masterNode)
const style = new LabelStyle()
state.addLabel(
'Folder Label',
InteriorNodeLabelModel.TOP_RIGHT,
style,
new Size(20, 10),
)Removes all labels.
Removes all labels.
Removes the label from its owning FoldingLabelOwnerState.
Removes the
label from its owning FoldingLabelOwnerState.