|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objecty.layout.AbstractLayoutStage
y.layout.SelfLoopLayouter
public class SelfLoopLayouter
A layout algorithm that routes the self-loops (reflexive edges) of a graph. By default this layouter routes self-loops in an orthogonal fashion. It places the self-loop in the least crowded quadrant around a node.
A core layout algorithm can be specified for this class. In that case the performed layout process of this class is subdivided into four stages:
![]() |
![]() |
| Field Summary | |
|---|---|
static Object |
KEEP_SELF_LOOP_LAYOUT_DPKEY
This DataProvider key can be used to register a DataProvider
with the graph to be laid out. |
| Fields inherited from interface y.layout.Layouter |
|---|
EDGE_ID_DPKEY, NODE_ID_DPKEY, SELECTED_EDGES, SELECTED_NODES |
| Constructor Summary | |
|---|---|
SelfLoopLayouter()
Instantiates a new SelfLoopLayouter. |
|
SelfLoopLayouter(Layouter coreLayouter)
Instantiates a new SelfLoopLayouter. the core layout routine will be delegated to the given layouter. |
|
| Method Summary | |
|---|---|
boolean |
canLayout(LayoutGraph graph)
Whether or not this layouter can layout the given graph. |
void |
doLayout(LayoutGraph graph)
Lays out the given graph. |
boolean |
isKeepAllSelfloopLayoutsEnabled()
Returns whether this algorithm should keep all self loops. |
protected void |
layoutSelfLoops(LayoutGraph graph)
Lays out the self-loops of the given graph. |
void |
setKeepAllSelfloopLayoutsEnabled(boolean keepAllSelfloopLayouts)
Sets whether this algorithm should keep all self loops. |
| 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 Object KEEP_SELF_LOOP_LAYOUT_DPKEY
DataProvider key can be used to register a DataProvider
with the graph to be laid out. This algorithm will query for each self loop
the boolean value from the DataProvider to determine whether the current layout
of the self-loop should be kept. I.e. if the DataProvider instance
obtained from the graph using this key returns true for a self-loop,
that self loop will not be laid out by this stage but the bends will be moved
by that stage according to the movement of their node.
setKeepAllSelfloopLayoutsEnabled(boolean)| Constructor Detail |
|---|
public SelfLoopLayouter()
public SelfLoopLayouter(Layouter coreLayouter)
| Method Detail |
|---|
public void doLayout(LayoutGraph graph)
public boolean canLayout(LayoutGraph graph)
protected void layoutSelfLoops(LayoutGraph graph)
public boolean isKeepAllSelfloopLayoutsEnabled()
KEEP_SELF_LOOP_LAYOUT_DPKEY
DataProvider will be ignored.
The default is false.
public void setKeepAllSelfloopLayoutsEnabled(boolean keepAllSelfloopLayouts)
KEEP_SELF_LOOP_LAYOUT_DPKEY
DataProvider will be ignored.
keepAllSelfloopLayouts - whether all self loops should be kept
|
© Copyright 2000-2008, yWorks GmbH. All rights reserved. |
||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||