javax.swing.plaf.basic

Class BasicTreeUI.NodeDimensionsHandler

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
NodeDimensionsHandler()
Constructor
Method Summary
RectanglegetNodeDimensions(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 intgetRowX(int row, int depth)
Returns the amount to indent the given row

Constructor Detail

NodeDimensionsHandler

public 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.

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.