|
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.GivenCoordinatesStage
public class GivenCoordinatesStage
GivenCoordinatesStage
changes node locations and sizes as well as edge paths to user-specified values
before invoking the
core layout algorithm
.
Use DataProvider
-key NODE_LOCATION_DPKEY
to
specify the locations (top-left coordinate) of nodes,
DataProvider
-key NODE_SIZE_DPKEY
to
specify the size of nodes and
DataProvider
-key EDGE_PATH_DPKEY
to specify
the path of edges (i.e. the port locations and the bends of edges).
A possible application for this stage are animated incremental layouts
where the position of non-incremental elements should be changed/restored without affecting the
start position of theses elements in the animation.
Therefore, this stage could also be used together with PlaceNodesAtBarycenterStage
.
core layout algorithm
may change these positions.PlaceNodesAtBarycenterStage
Field Summary | |
---|---|
static java.lang.Object |
EDGE_PATH_DPKEY
A DataProvider key for specifying the initial path of edges
Each edge can be mapped to an instance of YPointPath . |
static java.lang.Object |
NODE_LOCATION_DPKEY
A DataProvider key for specifying the initial location of nodes
Each node can be mapped to an instance of YPoint . |
static java.lang.Object |
NODE_SIZE_DPKEY
A DataProvider key for specifying the size of nodes
Each node can be mapped to an instance of YDimension . |
Fields inherited from interface y.layout.Layouter |
---|
EDGE_ID_DPKEY, NODE_ID_DPKEY, NODE_TYPE_DPKEY, SELECTED_EDGES, SELECTED_NODES |
Constructor Summary | |
---|---|
GivenCoordinatesStage()
Creates a new GivenCoordinatesStage instance with default settings. |
|
GivenCoordinatesStage(Layouter coreLayouter)
Creates a new GivenCoordinatesStage instance using the given core layout
algorithm . |
Method Summary | |
---|---|
boolean |
canLayout(LayoutGraph graph)
Accepts all graphs that can be handled by the core layout algorithm . |
void |
doLayout(LayoutGraph graph)
Changes node locations and edge paths to user-specified values and then invokes the core layout algorithm. |
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 NODE_LOCATION_DPKEY
DataProvider
key for specifying the initial location of nodes
Each node can be mapped to an instance of YPoint
. Before calling the
core layout algorithm
, this
stage places the top-left coordinate of each node on the associated YPoint
.
The location of nodes without associated
value isn't changed by this stage (but may be changed by the core layout algorithm).
public static final java.lang.Object NODE_SIZE_DPKEY
DataProvider
key for specifying the size of nodes
Each node can be mapped to an instance of YDimension
. Before calling the
core layout algorithm
, this stage sets the size of each node to the specified
size
. The size of nodes without associated value isn't changed by this stage.
public static final java.lang.Object EDGE_PATH_DPKEY
DataProvider
key for specifying the initial path of edges
Each edge can be mapped to an instance of YPointPath
. Before calling the core layout algorithm
, this stage sets the path of each edge to the associated YPointPath
.
The path must contain the source port location, followed by the bends (if any), followed by the target port location.
If an empty path is specified, the current path will be reset: all bends are cleared and the current source/target port locations are kept. The path of edges without associated value isn't changed by this stage (but may be changed by the core layout algorithm).
Constructor Detail |
---|
public GivenCoordinatesStage()
GivenCoordinatesStage
instance with default settings.
public GivenCoordinatesStage(Layouter coreLayouter)
GivenCoordinatesStage
instance using the given core layout
algorithm
.
coreLayouter
- the core layout algorithmMethod Detail |
---|
public boolean canLayout(LayoutGraph graph)
core layout algorithm
.
If there is no core layout algorithm
, all graphs are accepted.
graph
- the input graph
true
if there is no core layout algorithm or the core layout algorithm accepts the graph,
false
otherwiseLayouter.doLayout(LayoutGraph)
public void doLayout(LayoutGraph graph)
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 |