org.apache.pivot.wtk
Interface TreeView.NodeRenderer

All Superinterfaces:
ConstrainedVisual, Renderer, Visual
All Known Implementing Classes:
TreeViewNodeRenderer
Enclosing class:
TreeView

public static interface TreeView.NodeRenderer
extends Renderer

Renderer interface to customize the appearance of items in a TreeView.


Method Summary
 void render(Object node, Sequence.Tree.Path path, int rowIndex, TreeView treeView, boolean expanded, boolean selected, TreeView.NodeCheckState checkState, boolean highlighted, boolean disabled)
          Prepares the renderer for layout or paint.
 String toString(Object node)
          Converts a tree node to a string representation.
 
Methods inherited from interface org.apache.pivot.wtk.Renderer
getStyles
 
Methods inherited from interface org.apache.pivot.wtk.ConstrainedVisual
getBaseline, getPreferredHeight, getPreferredSize, getPreferredWidth, setSize
 
Methods inherited from interface org.apache.pivot.wtk.Visual
getBaseline, getHeight, getWidth, paint
 

Method Detail

render

void render(Object node,
            Sequence.Tree.Path path,
            int rowIndex,
            TreeView treeView,
            boolean expanded,
            boolean selected,
            TreeView.NodeCheckState checkState,
            boolean highlighted,
            boolean disabled)
Prepares the renderer for layout or paint.

Parameters:
node - The node value to render, or null if called to calculate preferred height for skins that assume a fixed renderer height.
path - The path to the node being rendered, or null if node is null.
rowIndex - The row index of the node being rendered, as seen in the current visible nodes list, or -1 if node is null.
treeView - The host component.
expanded - true if the node is expanded; false otherwise.
selected - true if the node is selected; false otherwise.
checkState - The node's check state.
highlighted - true if the node is highlighted; false otherwise.
disabled - true if the node is disabled; false otherwise.

toString

String toString(Object node)
Converts a tree node to a string representation.

Parameters:
node -
Returns:
The node's string representation, or null if the node does not have a string representation.

Note that this method may be called often during keyboard navigation, so implementations should avoid unnecessary string allocations.