|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.yworks.yfiles.server.graphml.folding.FoldingSupport
This class provides static utility methods for working with folded graph
structures. Class FoldedLayoutGraph provides this functionality
in a more convenient way.
| Method Summary | |
static EdgeViewState |
getEdgeViewState(Graph graph,
DummyEdgeId dummyEdgeId)
Returns the view state of a dummy edge identified by the provided dummy edge id. |
static Node |
getLocalRoot(Graph graph)
Returns the node that is currently considered the virtual root node of the folded graph. |
static NodeViewState |
getNodeViewState(Graph graph,
DummyNodeId dummyNodeId)
Returns the view state of a collapsed group node. |
protected static java.lang.Object |
getPortOwner(DummyEdgeId dummyEdgeId,
boolean source)
|
static boolean |
isExpanded(Graph graph,
Node node)
Returns whether the provided node is currently in expanded state. |
static void |
setEdgeViewState(Graph graph,
DummyEdgeId dummyEdgeId,
EdgeViewState edgeViewState)
Sets a view state of a dummy edge identified by the provided dummy edge id. |
static void |
setExpanded(Graph graph,
Node node,
boolean expanded)
Set the expanded state of the provided node. |
static void |
setLocalRoot(Graph graph,
Node node)
Set the virtual root node of the folded graph view defined by the provided graph to the provided non-leaf node. |
static void |
setNodeViewState(Graph graph,
DummyNodeId dummyNodeId,
NodeViewState nodeViewState)
Sets the view state of a collapsed group node. |
static void |
validateFoldingState(Graph graph)
Make sure that there are NodeViewState and EdgeViewState
instances available for all dummy nodes and dummy edges induced by the
collapsed/expanded states of the graph's nodes.
|
static void |
validateFoldingState(Graph graph,
ViewStateCreator viewStateCreator)
|
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Method Detail |
public static NodeViewState getNodeViewState(Graph graph,
DummyNodeId dummyNodeId)
graph - A folded graph that has a data provider registered for the
FoldedGraphKeys.NODE_VIEW_STATES_DPKEY.dummyNodeId - A dummy node id that identifies the collapsed state of
a group node.
null, if no dummy node state
is available for the provided node id.FoldedGraphKeys.NODE_VIEW_STATES_DPKEY
public static void setNodeViewState(Graph graph,
DummyNodeId dummyNodeId,
NodeViewState nodeViewState)
graph - A folded graph that has a data provider registered for the
FoldedGraphKeys.NODE_VIEW_STATES_DPKEY.dummyNodeId - A dummy node id that identifies the collapsed state of
a group node.nodeViewState - The node view state that describes the appearance
of the collapsed group node.
public static EdgeViewState getEdgeViewState(Graph graph,
DummyEdgeId dummyEdgeId)
graph - A folded graph that has a data provider registered for the
FoldedGraphKeys.EDGE_VIEW_STATES_DPKEY.dummyEdgeId - A dummy edge id that identifies a dummy state of
a master edge in a folded graph.
null, if no dummy edge state
is available for the provided edge id.FoldedGraphKeys.EDGE_VIEW_STATES_DPKEY
public static void setEdgeViewState(Graph graph,
DummyEdgeId dummyEdgeId,
EdgeViewState edgeViewState)
graph - A folded graph that has a data provider registered for the
FoldedGraphKeys.EDGE_VIEW_STATES_DPKEY.dummyEdgeId - A dummy edge id that identifies a dummy state of
a master edge in a folded graph.edgeViewState - The edge view state that describes the visual
appearance of the dummy edge.
public static boolean isExpanded(Graph graph,
Node node)
graph - A folded graph that has a data provider registered for the
FoldedGraphKeys.NODE_VIEW_STATES_DPKEY.
public static void setExpanded(Graph graph,
Node node,
boolean expanded)
graph - A folded graph that has a data provider registered for the
FoldedGraphKeys.NODE_VIEW_STATES_DPKEY.expanded - If false, the node will be considered
collapsed, i.e. the node's descendants will not be visible in the
folded graph view defined by the provided graph instance.
public static void setLocalRoot(Graph graph,
Node node)
graph - A folded graph that has a data provider registered for the
FoldedGraphKeys.LOCAL_ROOT_DPKEY.node - A non-leaf node that will be considered the virtual root node.public static Node getLocalRoot(Graph graph)
graph - A folded graph that has a data provider registered for the
FoldedGraphKeys.LOCAL_ROOT_DPKEY.
null, if no local root has been set.public static void validateFoldingState(Graph graph)
NodeViewState and EdgeViewState
instances available for all dummy nodes and dummy edges induced by the
collapsed/expanded states of the graph's nodes.
If a NodeViewState or EdgeViewState instance is
missing and the graph instance implements the ViewStateCreator
interface, the factory methods of this interface are used to create the
missing instances. Otherwise, default instances will be created.
ViewStateCreator
public static void validateFoldingState(Graph graph,
ViewStateCreator viewStateCreator)
protected static java.lang.Object getPortOwner(DummyEdgeId dummyEdgeId,
boolean source)
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||