A data container representing the collapsed state of a node.
Inheritance Hierarchy
Remarks
When the properties of the state are changed, these changes are reflected immediately in the views.
This class cannot be instantiated
Examples
const state = manager.getFolderNodeState(masterNode)
state.style = new GroupNodeStyle()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
Developer's Guide
API
- getFolderNodeState
Members
Show:
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'Defined in
FoldingLabelOwnerState.labelsGets or sets the layout of the node.
Gets or sets the layout of the node.
Gets the FoldingPortStates owned by this state.
Gets the FoldingPortStates owned by this state.
readonlyfinal
Examples
const state = manager.getFolderNodeState(masterNode)
const portState = state.ports.get(0)
portState.locationParameter = FreeNodePortLocationModel.TOPGets or sets the style of this node.
Gets or sets the style of this node.
final
Examples
const state = manager.getFolderNodeState(masterNode)
state.style = new GroupNodeStyle()Methods
Adds a FoldingLabelState to this state.
Adds a FoldingLabelState to this state.
final
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.
Overrides
FoldingLabelOwnerState.addLabelThe returned node is not present in any graph but may be passed to getViewItem to get the node state's folder node in the folding view graph.
final
Return Value
Removes all labels.
Removes all labels.
Defined in
FoldingLabelOwnerState.clearLabelsProvides access to the folding state of a master port.
Provides access to the folding state of a master port.
This method can be used to query the folding state of a port at the folder which is represented by this state.
final
Parameters
- masterPort: IPort
- The master port for which the state should be returned.
Return Value
- FoldingPortState
- A state holder implementation of the
masterPort, which reflects the port in the node's collapsed state.
See Also
Removes the label from its owning FoldingLabelOwnerState.
Removes the
label from its owning FoldingLabelOwnerState.final
Parameters
- label: FoldingLabelState
- The label to remove.