C

FolderNodeState

A data container representing the collapsed state of a node.

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.
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'
Gets or sets the layout of the node.
conversionfinal

Throws

Exception ({ name: 'ArgumentError' })
value contains one or more NaN values.
Gets the FoldingPortStates owned by this state.
readonlyfinal

Examples

const state = manager.getFolderNodeState(masterNode)
const portState = state.ports.get(0)
portState.locationParameter = FreeNodePortLocationModel.TOP
Gets or sets the style of this node.
final

Examples

const state = manager.getFolderNodeState(masterNode)
state.style = new GroupNodeStyle()
Gets or sets the tag of the node.
final

Methods

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.
Returns an INode instance which represents this folder node state.
The 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

INode
An INode instance which represents this folder node state.
Removes all labels.
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

API
style, locationParameter
Removes the label from its owning FoldingLabelOwnerState.
final

Parameters

label: FoldingLabelState
The label to remove.