A data container representing the state of an edge whose source and/or target node are collapsed.
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.getFoldingEdgeState(
new FoldingEdgeStateId(
masterEdge,
masterSource,
true,
masterTarget,
false,
),
)
state.style = new PolylineEdgeStyle({ stroke: Stroke.RED })const state = manager.getFoldingEdgeState(
new FoldingEdgeStateId(
masterEdge,
masterSource,
true,
masterTarget,
false,
),
)
const portState = state.sourcePort
portState.locationParameter = FreeNodePortLocationModel.RIGHTSee Also
Developer's Guide
API
- FoldingEdgeStateId, getFoldingEdgeState
Members
Show:
Properties
Gets the FoldingBendStates of this state.
Gets the FoldingBendStates of this state.
readonlyfinal
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 the FoldingPortState which represents the source port of this edge state.
Gets the FoldingPortState which represents the source port of this edge state.
readonlyfinal
Gets or sets the style of this edge.
Gets or sets the style of this edge.
final
Gets the FoldingPortState which represents the target port of this edge state.
Gets the FoldingPortState which represents the target port of this edge state.
readonlyfinal
Methods
final
Parameters
- location: Point
- The location of the new bend state.
- index?: number
- The index the bend state shall be inserted in the bends; a negative value (which is the default) indicates that the bend should be appended to the end of the list of bends.
Return Value
- FoldingBendState
- The newly added bend state.
Throws
- Exception ({ name: 'ArgumentError' })
locationcontains one or more NaN values.
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 edge is not present in any graph but may be passed to getViewItem to get the edge state's view edge in the folding view graph.
final
Return Value
Removes all bends.
Removes all bends.
final
Removes all labels.
Removes all labels.
Defined in
FoldingLabelOwnerState.clearLabelsRemoves the bend from this edge state.
Removes the
bend from this edge state.final
Parameters
- bend: FoldingBendState
- The bend to remove.
Throws
- Exception ({ name: 'ArgumentError' })
- Thrown if the
benddoesn't belong to this edge state.
Removes the label from its owning FoldingLabelOwnerState.
Removes the
label from its owning FoldingLabelOwnerState.final
Parameters
- label: FoldingLabelState
- The label to remove.