|
Search this API | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object y.util.DataProviderAdapter y.layout.tree.LeftRightPlacer.LeftRightDataProvider
public static final class LeftRightPlacer.LeftRightDataProvider
A special DataProvider
that determines whether a given node is placed left or right of the parent node.
This DataProvider
can be registered with the graph with key LeftRightPlacer.LEFT_RIGHT_DPKEY
. It calculates the
side with respect to the initial coordinates of the nodes in the graph, considering the orientation of the
subtree.
If a node is assigned to the left side, this DataProvider
will return true
. For the right
side, it will return false
.
LeftRightPlacer.LeftRightDataProvider
provides a convenient way to determine the side of a node from the initial
graph.NodePlacer
,
LeftRightPlacer.LeftRightDataProvider
demands a DataProvider
containing the NodePlacer
instances
that are used for the layout calculation.Constructor Summary | |
---|---|
LeftRightPlacer.LeftRightDataProvider(DataProvider nodePlacerMap)
Creates a new LeftRightPlacer.LeftRightDataProvider instance. |
Method Summary | |
---|---|
boolean |
getBool(java.lang.Object dataHolder)
Determines whether or not the given node is left of its parent node. |
Methods inherited from class y.util.DataProviderAdapter |
---|
defined, get, getDouble, getInt |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public LeftRightPlacer.LeftRightDataProvider(DataProvider nodePlacerMap)
LeftRightPlacer.LeftRightDataProvider
instance.
The given DataProvider
is a reference to the one that specifies the NodePlacer
s for each node
in the graph. These NodePlacer
s are used for retrieving their
orientation
, which is necessary to determine the side (left/right) for the node.
nodePlacerMap
- a DataProvider
containing the corresponding NodePlacer
s for the nodeMethod Detail |
---|
public boolean getBool(java.lang.Object dataHolder)
The side for the node is retrieved according to the current orientation
.
For vertical subtree directions, the x-coordinates are compared. The y-coordinates are considered in the case
of a horizontal orientation.
getBool
in interface DataProvider
getBool
in class DataProviderAdapter
AbstractRotatableNodePlacer
instances.
If another NodePlacer
is assigned to a node, this node is assigned to the right of its parent.dataHolder
- the node
true
if the given node is left of its parent node, false
otherwise
|
© Copyright 2000-2022, yWorks GmbH. All rights reserved. |
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |