|
Search this API | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object y.layout.AbstractLayoutStage y.layout.hierarchic.incremental.TopLevelGroupToSwimlaneStage
public class TopLevelGroupToSwimlaneStage
This layout stage
can be used for automatically assigning
SwimLaneDescriptor
instances to nodes by treating top-level group nodes as
swimlanes.
This stage will modify the hierarchy by temporarily removing the top-level group nodes and assigning corresponding descriptors to
the remaining nodes. After running the core layout, the top-level group nodes will be arranged to function as swimlanes. This
class allows using the current coordinates of the group nodes to arrange the swimlanes from sketch
. Also, the spacing
between swimlanes may be specified.
This stage can be appended
to the
IncrementalHierarchicLayouter
.
IncrementalHierarchicLayouter
,
SwimLaneDescriptor
,
GroupingKeys
Field Summary |
---|
Fields inherited from interface y.layout.Layouter |
---|
EDGE_ID_DPKEY, NODE_ID_DPKEY, NODE_TYPE_DPKEY, SELECTED_EDGES, SELECTED_NODES |
Constructor Summary | |
---|---|
TopLevelGroupToSwimlaneStage()
Creates a new instance of TopLevelGroupToSwimlaneStage with the default settings. |
Method Summary | |
---|---|
boolean |
canLayout(LayoutGraph graph)
Checks whether or not the given graph can be arranged by this layout algorithm. |
void |
doLayout(LayoutGraph graph)
Calculates the layout by automatically assigning SwimLaneDescriptor
instances to nodes and treating top-level group nodes as swimlanes. |
double |
getSpacing()
Returns the spacing between the swimlanes. |
boolean |
isFromSketchSwimlaneOrderingEnabled()
Returns whether or not the order of the swimlanes should be determined based on the current sketch. |
void |
setFromSketchSwimlaneOrderingEnabled(boolean fromSketchSwimlaneOrderingEnabled)
Specifies whether or not the order of the swimlanes should be determined based on the current sketch. |
void |
setSpacing(double spacing)
Specifies the spacing between the swimlanes. |
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 TopLevelGroupToSwimlaneStage()
TopLevelGroupToSwimlaneStage
with the default settings.
Method Detail |
---|
public double getSpacing()
The spacing should be greater than 0
.
setSpacing(double)
public void setSpacing(double spacing)
The spacing should be greater than 0
.
public boolean isFromSketchSwimlaneOrderingEnabled()
true
if the order of the swimlanes is determined from
the current sketch, false
otherwisesetFromSketchSwimlaneOrderingEnabled(boolean)
public void setFromSketchSwimlaneOrderingEnabled(boolean fromSketchSwimlaneOrderingEnabled)
public boolean canLayout(LayoutGraph graph)
Layouter
main layout routine
on this graph will only succeed if this method returns
true
.
graph
- the input graph
true
if this layout algorithm can handle the input graph, false
otherwiseLayouter.doLayout(LayoutGraph)
public void doLayout(LayoutGraph graph)
SwimLaneDescriptor
instances to nodes and treating top-level group nodes as swimlanes.
graph
- the input graphLayouter.canLayout(LayoutGraph)
|
© Copyright 2000-2022, yWorks GmbH. All rights reserved. |
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |