|
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.grouping.GroupNodeHider
public class GroupNodeHider
A layout stage that hides the group nodes of hierarchically grouped graphs.
This stage removes all group nodes and adjacent edges from the graph before passing it to the
core layout algorithm. After the core layout algorithm has arranged the graph,
the hidden elements will be reinserted.
This stage is used by layout algorithms that cannot handle grouped graphs.
![]() |
![]() |
| Field Summary |
|---|
| Fields inherited from interface y.layout.Layouter |
|---|
EDGE_ID_DPKEY, NODE_ID_DPKEY, NODE_TYPE_DPKEY, SELECTED_EDGES, SELECTED_NODES |
| Constructor Summary | |
|---|---|
GroupNodeHider()
Creates an instance of GroupNodeHider with default settings. |
|
GroupNodeHider(Layouter coreLayouter)
Creates an instance of GroupNodeHider with a specific core layout algorithm. |
|
| Method Summary | |
|---|---|
boolean |
canLayout(LayoutGraph graph)
Accepts all graphs that are accepted by the core layout algorithm after this stage has finished preparing the graph. |
void |
doLayout(LayoutGraph graph)
Calculates the layout based on the given core layout algorithm. |
GroupBoundsCalculator |
getGroupBoundsCalculator()
Returns the GroupBoundsCalculator instance for calculating the sizes of group nodes. |
void |
hideGroupNodes(LayoutGraph graph)
Hides the group nodes and their incident edges of the input graph. |
boolean |
isEdgePathResettingEnabled()
Returns whether or not this stage resets the paths of edges incident to group nodes. |
boolean |
isHidingEmptyGroupNodes()
Returns whether or not empty group nodes, i.e., group nodes without children, will be hidden by this stage. |
void |
setEdgePathResettingEnabled(boolean edgePathResettingEnabled)
Specifies whether or not this stage resets the paths of edges incident to group nodes. |
void |
setGroupBoundsCalculator(GroupBoundsCalculator groupBoundsCalculator)
Specifies the GroupBoundsCalculator instance for calculating the sizes of group nodes. |
void |
setHidingEmptyGroupNodes(boolean hidingEmptyGroupNodes)
Specifies whether or not empty group nodes, i.e., group nodes without children, will be hidden by this stage. |
void |
unhideGroupNodes(LayoutGraph graph)
Un-hides the group nodes and their incident edges of the input graph that were previously hidden using method hideGroupNodes(LayoutGraph). |
| 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 |
| Constructor Detail |
|---|
public GroupNodeHider()
GroupNodeHider with default settings.
public GroupNodeHider(Layouter coreLayouter)
GroupNodeHider with a specific core layout algorithm.
coreLayouter - the core layout algorithm| Method Detail |
|---|
public boolean isEdgePathResettingEnabled()
setGroupBoundsCalculator(GroupBoundsCalculator)),
keeping the original edge paths often produces weird routes for edges at group nodes.true if this stage resets the path of edges incident to group nodes,
false otherwisesetEdgePathResettingEnabled(boolean)public void setEdgePathResettingEnabled(boolean edgePathResettingEnabled)
setGroupBoundsCalculator(GroupBoundsCalculator)),
keeping the original edge paths often produces weird routes for edges at group nodes.edgePathResettingEnabled - true if this stage resets the path of edges incident to group nodes,
false otherwisepublic boolean isHidingEmptyGroupNodes()
true if all group nodes will be hidden,
false if only group nodes with children will be hiddensetHidingEmptyGroupNodes(boolean)public void setHidingEmptyGroupNodes(boolean hidingEmptyGroupNodes)
hidingEmptyGroupNodes - true if all group nodes should be hidden,
false if only group nodes with children should be hiddenpublic void hideGroupNodes(LayoutGraph graph)
Furthermore, this method removes all grouping-related DataProviders from the input graph.
graph - the input graphGroupingKeys.NODE_ID_DPKEY,
GroupingKeys.PARENT_NODE_ID_DPKEY,
GroupingKeys.GROUP_DPKEY,
unhideGroupNodes(LayoutGraph)public void unhideGroupNodes(LayoutGraph graph)
hideGroupNodes(LayoutGraph).
Furthermore, this method restores all previously removed grouping related DataProviders on the input
graph.
graph - the given graphGroupingKeys.NODE_ID_DPKEY,
GroupingKeys.PARENT_NODE_ID_DPKEY,
GroupingKeys.GROUP_DPKEY,
hideGroupNodes(LayoutGraph)public void setGroupBoundsCalculator(GroupBoundsCalculator groupBoundsCalculator)
GroupBoundsCalculator instance for calculating the sizes of group nodes.
For every group which is in its open state, the GroupBoundsCalculator will be asked to calculate the
bounds for the group's child nodes. The resulting size will be used during the ongoing layout calculation.
MinimumSizeGroupBoundsCalculatorgroupBoundsCalculator - the GroupBoundsCalculator instancepublic GroupBoundsCalculator getGroupBoundsCalculator()
GroupBoundsCalculator instance for calculating the sizes of group nodes.
For every group which is in its open state, the GroupBoundsCalculator will be asked to calculate the
bounds for the group's child nodes. The resulting size will be used during the ongoing layout calculation.
GroupBoundsCalculator instancesetGroupBoundsCalculator(GroupBoundsCalculator)public boolean canLayout(LayoutGraph graph)
core layout algorithm after this stage has finished preparing the graph.
graph - the input graph
true if the core layout algorithm accepts the prepared graph or is null,
false otherwise.Layouter.doLayout(LayoutGraph)public void doLayout(LayoutGraph graph)
Before calling the core layout algorithm, group nodes and their adjacent edges will be hidden.
After the layout has been calculated, GroupNodeHider will restore the graph.
graph - the input graphLayouter.canLayout(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 | ||||||||