public interface IFolderNodeConverter
FoldingManager
and IFoldingView
which is responsible for managing the appearance of
folder nodes.
Since FoldingManager.createFoldingView(INode, java.util.function.Predicate)
creates views that can potentially
contain nodes which have a different set of attributes, these attributes need to be determined somehow. Implementations
of this interface are being called by the view
s to configure the appearance of these
folder nodes
.
Modifier and Type | Method and Description |
---|---|
void |
initializeFolderNodeState(FolderNodeState state,
IFoldingView foldingView,
INode viewNode,
INode masterNode)
|
void |
updateFolderNodeState(FolderNodeState state,
IFoldingView foldingView,
INode viewNode,
INode masterNode)
|
void initializeFolderNodeState(FolderNodeState state, IFoldingView foldingView, INode viewNode, INode masterNode)
view
implementations to initially create the appearance of a folder
node.
This method is called by the view to allow for initially creating the appearance of a local folder node in the view when
it is included in the view for the first time. This can be used, e.g. to initialize the labels or style properties with
the corresponding properties of the masterNode
.
By default the state
is an exact copy of the masterNode
, including layout, style, labels, and ports.
Note that changing the appearance has to be done on state
.
state
- The folder node state to initialize.foldingView
- The graph instance for which the folder node has been created.viewNode
- The folder node instance in the viewmasterNode
- The node that represents the IFoldingView.getMasterItem(com.yworks.yfiles.graph.IModelItem)
of the viewstate to
change.updateFolderNodeState(FolderNodeState, IFoldingView, INode, INode)
void updateFolderNodeState(FolderNodeState state, IFoldingView foldingView, INode viewNode, INode masterNode)
view
implementations to change the appearance of a folder
node.
This method is called by the view to allow for adjusting the appearance of a local folder node in the view when the master
node for it has changed properties. This can be used, e.g. to synchronize the label or style properties with the
corresponding properties of the masterNode
.
Note that changing the appearance has to be done on state
.
state
- The folder node state to update.foldingView
- The graph instance for which the folder node can be changed.viewNode
- The folder node instance in the viewmasterNode
- The node that represents the IFoldingView.getMasterItem(com.yworks.yfiles.graph.IModelItem)
of the viewstate to
change.initializeFolderNodeState(FolderNodeState, IFoldingView, INode, INode)