Package 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
Rendererinterface to customize the appearance of items in a TreeView.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description voidrender(java.lang.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.java.lang.StringtoString(java.lang.Object node)Converts a tree node to a string representation.-
Methods inherited from interface org.apache.pivot.wtk.ConstrainedVisual
getBaseline, getPreferredHeight, getPreferredSize, getPreferredWidth, setSize, setSize
-
-
-
-
Method Detail
-
render
void render(java.lang.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, ornullif called to calculate preferred height for skins that assume a fixed renderer height.path- The path to the node being rendered, ornullifnodeisnull.rowIndex- The row index of the node being rendered, as seen in the current visible nodes list, or-1ifnodeisnull.treeView- The host component.expanded-trueif the node is expanded;falseotherwise.selected-trueif the node is selected;falseotherwise.checkState- The node's check state.highlighted-trueif the node is highlighted;falseotherwise.disabled-trueif the node is disabled;falseotherwise.
-
toString
java.lang.String toString(java.lang.Object node)
Converts a tree node to a string representation.- Parameters:
node- The actual tree node data object.- Returns:
- The node's string representation, or
nullif 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.
-
-