pivot.wtk
Interface TreeView.Skin

All Known Implementing Classes:
TerraTreeViewSkin
Enclosing class:
TreeView

public static interface TreeView.Skin

Tree view skin interface. Tree view skins must implement this.

Author:
tvolkert

Method Summary
 Sequence<java.lang.Integer> getNodeAt(int y)
          Gets the path to the node found at the specified y-coordinate (relative to the tree view).
 Bounds getNodeBounds(Sequence<java.lang.Integer> path)
          Gets the bounds of the node at the specified path relative to the tree view.
 int getNodeIndent(int depth)
          Gets the pixel indent of nodes at the specified depth.
 

Method Detail

getNodeAt

Sequence<java.lang.Integer> getNodeAt(int y)
Gets the path to the node found at the specified y-coordinate (relative to the tree view).

Parameters:
y - The y-coordinate in pixels.
Returns:
The path to the node, or null if there is no node being painted at the specified y-coordinate.

getNodeBounds

Bounds getNodeBounds(Sequence<java.lang.Integer> path)
Gets the bounds of the node at the specified path relative to the tree view. Note that all nodes are left aligned with the tree; to get the pixel value of a node's indent, use getNodeIndent(int).

Parameters:
path - The path to the node.
Returns:
The bounds, or null if the node is not currently visible.

getNodeIndent

int getNodeIndent(int depth)
Gets the pixel indent of nodes at the specified depth. Depth is measured in generations away from the tree view's "root" node, which is represented by the tree data.

Parameters:
depth - The depth, where the first child of the root has depth 1, the child of that branch has depth 2, etc.
Returns:
The indent in pixels.