|
Search this API | ||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objecty.layout.AbstractLayoutStage
y.layout.SubgraphLayouter
public class SubgraphLayouter
A SubgraphLayouter is a LayoutStage that filters out all graph elements that are not part of a
specific subgraph.
The nodes that induce this subgraph are marked using a DataProvider registered with a
specific subgraph nodes key. They will be arranged by the
core layout algorithm.
Optionally, the edges that are included in the subgraph can explicitly be marked as well by registering
a DataProvider with the subgraph edges key. This feature is useful
to exclude specific edges from being handled by the core layout.
If no provider is registered, all edges are included.

| Field Summary | |
|---|---|
static java.lang.Object |
SUBGRAPH_EDGES_DPKEY
A DataProvider key for marking edges that are included in the subgraph, thus, visible during the core layout
|
| Fields inherited from interface y.layout.Layouter |
|---|
EDGE_ID_DPKEY, NODE_ID_DPKEY, NODE_TYPE_DPKEY, SELECTED_EDGES, SELECTED_NODES |
| Constructor Summary | |
|---|---|
SubgraphLayouter()
Creates a new SubgraphLayouter instance with default settings. |
|
SubgraphLayouter(Layouter coreLayouter)
Creates a new SubgraphLayouter instance using the given core layout algorithm. |
|
| Method Summary | |
|---|---|
boolean |
canLayout(LayoutGraph graph)
Accepts all graphs whose specified subgraph can be handled by the
core layout algorithm. |
void |
doLayout(LayoutGraph graph)
Delegates the arrangement of the specified subgraph of the given graph
to the core layout algorithm. |
java.lang.Object |
getSubgraphEdgesDpKey()
Returns the key to register a DataProvider which marks the edges that are included in the subgraph,
thus, visible during the core layout. |
java.lang.Object |
getSubgraphNodesDpKey()
Returns the key to register a DataProvider which marks the nodes that induce the subgraph to be arranged. |
void |
setSubgraphEdgesDpKey(java.lang.Object key)
Specifies the key to register a DataProvider which marks the edges that are included in the subgraph,
thus, visible during the core layout. |
void |
setSubgraphNodesDpKey(java.lang.Object key)
Specifies the key to register a DataProvider which marks the nodes that induce the subgraph to be arranged. |
| Methods inherited from class y.layout.AbstractLayoutStage |
|---|
canLayoutCore, doLayoutCore, getCoreLayouter, setCoreLayouter |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public static final java.lang.Object SUBGRAPH_EDGES_DPKEY
DataProvider key for marking edges that are included in the subgraph, thus, visible during the core layout
DataProvider is registered with the key, all edges will be included, except those
that are excluded because their source or target node is excluded.setSubgraphEdgesDpKey(Object). If a custom key
is required, specify it as that properties value and register the DataProvider with the custom key.
This may be useful if running multiple instances of this layout stage within a larger layout pipeline and
the instances must include/exclude different edges.| Constructor Detail |
|---|
public SubgraphLayouter(Layouter coreLayouter)
SubgraphLayouter instance using the given core layout algorithm.
coreLayouter - the core layout routinepublic SubgraphLayouter()
SubgraphLayouter instance with default settings.
| Method Detail |
|---|
public java.lang.Object getSubgraphNodesDpKey()
DataProvider which marks the nodes that induce the subgraph to be arranged.
If no DataProvider is registered with the specified key, all nodes will be included.
DataProvider keysetSubgraphNodesDpKey(Object)public void setSubgraphNodesDpKey(java.lang.Object key)
DataProvider which marks the nodes that induce the subgraph to be arranged.
If no DataProvider is registered with the specified key, all nodes will be included.
Layouter.SELECTED_NODESkey - the DataProvider key
java.lang.IllegalArgumentException - if the specified key is nullpublic java.lang.Object getSubgraphEdgesDpKey()
DataProvider which marks the edges that are included in the subgraph,
thus, visible during the core layout.
If no DataProvider is registered with the specified key, all edges will be included, except those
that are already excluded because their source or target node is excluded.
DataProvider key
java.lang.IllegalArgumentException - if the specified key is nullSUBGRAPH_EDGES_DPKEY,
setSubgraphEdgesDpKey(Object)public void setSubgraphEdgesDpKey(java.lang.Object key)
DataProvider which marks the edges that are included in the subgraph,
thus, visible during the core layout.
If no DataProvider is registered with the specified key, all edges will be included, except those
that are already excluded because their source or target node is excluded.
SUBGRAPH_EDGES_DPKEYkey - the DataProvider key
java.lang.IllegalArgumentException - if the specified key is nullSUBGRAPH_EDGES_DPKEYpublic void doLayout(LayoutGraph graph)
specified subgraph of the given graph
to the core layout algorithm.
graph - the input graphLayouter.canLayout(LayoutGraph)public boolean canLayout(LayoutGraph graph)
specified subgraph can be handled by the
core layout algorithm.
graph - the input graph
true if the core layout algorithm is null or accepts
the subgraph of the input graph, false otherwiseLayouter.doLayout(LayoutGraph)
|
© Copyright 2000-2025, yWorks GmbH. All rights reserved. |
||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||