javax.swing.plaf.basic
Class BasicTreeUI.NodeDimensionsHandler

java.lang.Object
  extended by javax.swing.tree.AbstractLayoutCache.NodeDimensions
      extended by javax.swing.plaf.basic.BasicTreeUI.NodeDimensionsHandler
Enclosing class:
BasicTreeUI

public class BasicTreeUI.NodeDimensionsHandler
extends AbstractLayoutCache.NodeDimensions

Class responsible for getting size of node, method is forwarded to BasicTreeUI method. X location does not include insets, that is handled in getPathBounds.


Constructor Summary
BasicTreeUI.NodeDimensionsHandler()
          Constructor
 
Method Summary
 Rectangle getNodeDimensions(Object cell, int row, int depth, boolean expanded, Rectangle size)
          Returns, by reference in bounds, the size and x origin to place value at.
protected  int getRowX(int row, int depth)
          Returns the amount to indent the given row
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

BasicTreeUI.NodeDimensionsHandler

public BasicTreeUI.NodeDimensionsHandler()
Constructor

Method Detail

getNodeDimensions

public Rectangle getNodeDimensions(Object cell,
                                   int row,
                                   int depth,
                                   boolean expanded,
                                   Rectangle size)
Returns, by reference in bounds, the size and x origin to place value at. The calling method is responsible for determining the Y location. If bounds is null, a newly created Rectangle should be returned, otherwise the value should be placed in bounds and returned.

Specified by:
getNodeDimensions in class AbstractLayoutCache.NodeDimensions
Parameters:
cell - the value to be represented
row - row being queried
depth - the depth of the row
expanded - true if row is expanded
size - a Rectangle containing the size needed to represent value
Returns:
containing the node dimensions, or null if node has no dimension

getRowX

protected int getRowX(int row,
                      int depth)
Returns the amount to indent the given row

Returns:
amount to indent the given row.