public final class FolderNodeState extends FoldingLabelOwnerState
When the properties of the state are changed, these changes are reflected immediately in the
Views
.
FoldingManager.getFolderNodeState(INode)
Modifier and Type | Method and Description |
---|---|
FoldingLabelState |
addLabel(String text,
ILabelModelParameter layoutParameter,
ILabelStyle style,
SizeD preferredSize,
Object tag)
Adds a
FoldingLabelState to this state. |
INode |
asNode()
Returns an
INode instance which represents this folder node state. |
FoldingPortState |
getFoldingPortState(IPort masterPort)
Provides access to the folding state of a master port.
|
IRectangle |
getLayout()
The layout of the node.
|
IListEnumerable<FoldingPortState> |
getPorts()
The
FoldingPortState s owned by this state. |
INodeStyle |
getStyle()
The style of this node.
|
Object |
getTag()
The tag of the node.
|
void |
remove(FoldingLabelState label)
Removes the
label from its owning FoldingLabelOwnerState . |
void |
setLayout(IRectangle value)
The layout of the node.
|
void |
setStyle(INodeStyle value)
The style of this node.
|
void |
setTag(Object value)
The tag of the node.
|
clearLabels, getLabels
public FoldingLabelState addLabel(String text, ILabelModelParameter layoutParameter, ILabelStyle style, SizeD preferredSize, Object tag)
FoldingLabelOwnerState
FoldingLabelState
to this state.addLabel
in class FoldingLabelOwnerState
text
- The text of the new label.layoutParameter
- The layout parameter of the new label.style
- The style of the new label.preferredSize
- The preferred size of the label.tag
- The tag of the label.FoldingLabelState
.public final INode asNode()
INode
instance which represents this folder node state.
The returned node is not present in any graph but may be passed to IFoldingView.getViewItem(com.yworks.yfiles.graph.IModelItem)
to get the node state's folder node in the folding view graph
.
INode
instance which represents this folder node state.public final FoldingPortState getFoldingPortState(IPort masterPort)
This method can be used to query the folding state of a port at the folder which is represented by this state.
masterPort
- The master port for which the state should be returned.masterPort
, which reflects the port in the node's collapsed state.FoldingPortState.getStyle()
,
FoldingPortState.getLocationParameter()
public final IRectangle getLayout()
setLayout(IRectangle)
public final IListEnumerable<FoldingPortState> getPorts()
FoldingPortState
s owned by this state.public final INodeStyle getStyle()
setStyle(INodeStyle)
public final Object getTag()
setTag(Object)
public void remove(FoldingLabelState label)
FoldingLabelOwnerState
label
from its owning FoldingLabelOwnerState
.remove
in class FoldingLabelOwnerState
label
- The label to remove.public final void setLayout(IRectangle value)
value
- The Layout to set.getLayout()
public final void setStyle(INodeStyle value)
value
- The Style to set.getStyle()