|
Search this API | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object y.layout.BendConverter
public class BendConverter
This layout stage replaces bends with dummy nodes, calls the core layout
algorithm and recreates the bends. Note that not all data provider values
bound to the edges will be automatically adopted be the replacement edges.
The adopted values must be provided by data providers registered with one of
the following known keys:
PortConstraintKeys.SOURCE_GROUPID_KEY
,
PortConstraintKeys.TARGET_GROUPID_KEY
,
PortConstraintKeys.SOURCE_PORT_CONSTRAINT_KEY
,
PortConstraintKeys.TARGET_PORT_CONSTRAINT_KEY
.
Field Summary | |
---|---|
static Object |
SCOPE_DPKEY
DataProvider key used to specify the set of edges for which this stage will replace bends by nodes. |
Fields inherited from interface y.layout.Layouter |
---|
EDGE_ID_DPKEY, NODE_ID_DPKEY, SELECTED_EDGES, SELECTED_NODES |
Constructor Summary | |
---|---|
BendConverter()
Creates a new instance of BendConverter |
|
BendConverter(double size)
Creates a new instance of BendConverter using the given size as the width and height for the dummy nodes. |
Method Summary | |
---|---|
protected void |
addedPathForEdge(LayoutGraph graph,
Edge e,
NodeList dummyNodes)
Callback method that will be invoked after new elements for the given edge have been added to the given graph. |
boolean |
canLayout(LayoutGraph graph)
Returns true iff the given graph can be laid
out by this algorithm. |
void |
doLayout(LayoutGraph graph)
Main layout routine that assigns new layout information to the given graph. |
Layouter |
getCoreLayouter()
Returns the core layouter. |
Object |
getSelectedEdgesDpKey()
Returns the DataProvider key to identify edges as
selected. |
boolean |
isAdoptEdgeGroupsEnabled()
Returns whether or not the edge group values of the original edge should be adopted by its replacement edges. |
boolean |
isAdoptPortConstraintsEnabled()
Returns whether or not the port constraint values of the original edge should be adopted by its replacement edges. |
boolean |
isAdoptSelectionEnabled()
Returns whether or not the selection state of the original edge should be adopted by its replacement edges. |
protected void |
prepare(LayoutGraph graph)
Prepares the graph before calling the core layouter |
void |
setAdoptEdgeGroupsEnabled(boolean adoptEdgeGroupsEnabled)
Sets whether or not the edge group values of the original edge should be adopted by its replacement edges. |
void |
setAdoptPortConstraintsEnabled(boolean adoptPortConstraintsEnabled)
Sets whether or not the port constraint values of the original edge should be adopted by its replacement edges. |
void |
setAdoptSelectionEnabled(boolean adoptSelectionEnabled)
Sets whether or not the selection state of the original edge should be adopted by its replacement edges. |
void |
setCoreLayouter(Layouter l)
Sets the core layouter. |
void |
setSelectedEdgesDpKey(Object key)
Specifies the DataProvider key to identify edges as
selected. |
protected void |
unprepare(LayoutGraph graph)
Undoes the graph changes performed by prepare(LayoutGraph) after the
core layouter has finished. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final Object SCOPE_DPKEY
Constructor Detail |
---|
public BendConverter()
public BendConverter(double size)
Method Detail |
---|
public boolean canLayout(LayoutGraph graph)
Layouter
true
iff the given graph can be laid
out by this algorithm. Calling doLayout
with
the given graph as its argument will only success if
this method returns true
.
canLayout
in interface Layouter
public void doLayout(LayoutGraph graph)
Layouter
doLayout
in interface Layouter
protected void prepare(LayoutGraph graph)
protected void unprepare(LayoutGraph graph)
prepare(LayoutGraph)
after the
core layouter has finished.
public Layouter getCoreLayouter()
getCoreLayouter
in interface LayoutStage
public void setCoreLayouter(Layouter l)
setCoreLayouter
in interface LayoutStage
public boolean isAdoptEdgeGroupsEnabled()
public void setAdoptEdgeGroupsEnabled(boolean adoptEdgeGroupsEnabled)
PortConstraintKeys.SOURCE_GROUPID_KEY
and
PortConstraintKeys.TARGET_GROUPID_KEY
.
public boolean isAdoptPortConstraintsEnabled()
public void setAdoptPortConstraintsEnabled(boolean adoptPortConstraintsEnabled)
PortConstraintKeys.SOURCE_PORT_CONSTRAINT_KEY
and
PortConstraintKeys.TARGET_PORT_CONSTRAINT_KEY
.
public boolean isAdoptSelectionEnabled()
setAdoptSelectionEnabled(boolean)
public void setAdoptSelectionEnabled(boolean adoptSelectionEnabled)
getSelectedEdgesDpKey()
.
isAdoptSelectionEnabled()
,
getSelectedEdgesDpKey()
,
setSelectedEdgesDpKey(Object)
protected void addedPathForEdge(LayoutGraph graph, Edge e, NodeList dummyNodes)
public Object getSelectedEdgesDpKey()
DataProvider
key to identify edges as
selected.
By default, Layouter.SELECTED_EDGES
is used.
DataProvider
key to mark edges as selected.setSelectedEdgesDpKey(Object)
,
isAdoptSelectionEnabled()
,
setAdoptSelectionEnabled(boolean)
public void setSelectedEdgesDpKey(Object key)
DataProvider
key to identify edges as
selected.
By default, Layouter.SELECTED_EDGES
is used.
IllegalArgumentException
- if the specified key is null
.key
- DataProvider
key.getSelectedEdgesDpKey()
,
isAdoptSelectionEnabled()
,
setAdoptSelectionEnabled(boolean)
|
© Copyright 2000-2013, yWorks GmbH. All rights reserved. |
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |