Search this API

y.layout.tree
Class LeftRightPlacer.LeftRightDataProvider

java.lang.Object
  extended by y.util.DataProviderAdapter
      extended by 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.


Constructor Summary
LeftRightPlacer.LeftRightDataProvider(DataProvider nodePlacerMap)
          Constructs a new data provider for the LeftRightPlacer.
 
Method Summary
 boolean getBool(Object dataHolder)
          Determines if 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

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").

Method Detail

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.

© Copyright 2000-2013,
yWorks GmbH.
All rights reserved.