y.layout.tree
Class LeftRightPlacer.LeftRightDataProvider
java.lang.Object
y.util.DataProviderAdapter
y.layout.tree.LeftRightPlacer.LeftRightDataProvider
- All Implemented Interfaces:
- DataProvider
- Enclosing class:
- LeftRightPlacer
public static final class LeftRightPlacer.LeftRightDataProvider
- extends DataProviderAdapter
Utility class providing a method to determine if a given node
is aligned left (true) or right (false) to the parent node.
Method Summary |
boolean |
getBool(Object dataHolder)
Determines if the given node is "left" of its parent node. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
LeftRightPlacer.LeftRightDataProvider
public LeftRightPlacer.LeftRightDataProvider(DataProvider nodePlacerMap)
- Constructs a new data provider for the LeftRightPlacer.
The nodePlacerMap is a reference to the map where the node placer for each node in the graph is stored.
The node placer of a node holds its modification matrix which can be used to determine
the alignment of the node to its parent (if its "left").
getBool
public boolean getBool(Object dataHolder)
- Determines if the given node is "left" of its parent node. Left is considered as
a lower x coordinate when the alignment of the nodes is vertical (north or south) and
a lower y coordinate when the alignment of the nodes is horizontal (east or west).
- Specified by:
getBool
in interface DataProvider
- Overrides:
getBool
in class DataProviderAdapter
- Parameters:
dataHolder
- a node to check the placement to its parent node.
- Returns:
true
if the given node is left of its parent node.