pivot.wtk.content
Class TreeViewNodeRenderer
java.lang.Object
pivot.wtk.Component
pivot.wtk.Container
pivot.wtk.FlowPane
pivot.wtk.content.TreeViewNodeRenderer
- All Implemented Interfaces:
- Iterable<Component>, Sequence<Component>, ConstrainedVisual, Renderer, TreeView.NodeRenderer, Visual
public class TreeViewNodeRenderer
- extends FlowPane
- implements TreeView.NodeRenderer
Default tree node renderer, which knows how to render instances of
TreeNode
and Image
. Anything else will be rendered as a
string (by calling node.toString().
- Author:
- gbrown
Methods inherited from class pivot.wtk.Container |
add, containsFocus, get, getComponentAt, getContainerListeners, getContainerMouseListeners, getContextKey, getDescendantAt, getFocusTraversalPolicy, getLength, indexOf, insert, isAncestor, isFocusable, iterator, load, mouseClick, mouseDown, mouseMove, mouseOut, mouseUp, mouseWheel, move, paint, remove, remove, removeAll, requestFocus, setContextKey, setEnabled, setFocusTraversalPolicy, setParent, setTooltip, setVisible, store, update, validate |
Methods inherited from class pivot.wtk.Component |
clearFocus, clearFocus, finalize, getAttributes, getBounds, getComponentClassListeners, getComponentDataListeners, getComponentDecoratorListeners, getComponentDragDropListeners, getComponentKeyListeners, getComponentLayoutListeners, getComponentListeners, getComponentMouseButtonListeners, getComponentMouseListeners, getComponentMouseWheelListeners, getComponents, getComponentStateListeners, getCursor, getDecoratedBounds, getDecorators, getDisplay, getDragSource, getDropTarget, getFocusedComponent, getGraphics, getHandle, getHeight, getLocation, getParent, getPreferredHeight, getPreferredHeight, getPreferredSize, getPreferredWidth, getPreferredWidth, getSize, getSkin, getStyles, getTooltipText, getUserData, getVisibleArea, getVisibleArea, getVisibleArea, getWidth, getWindow, getX, getY, installSkin, invalidate, isBlocked, isDisplayable, isEnabled, isFocused, isMouseOver, isOpaque, isPreferredHeightSet, isPreferredSizeSet, isPreferredWidthSet, isShowing, isValid, isVisible, keyPressed, keyReleased, keyTyped, load, mapPointFromAncestor, mapPointToAncestor, mouseOver, repaint, repaint, repaint, repaint, repaint, repaint, requestFocus, scrollAreaToVisible, scrollAreaToVisible, setAttributes, setCursor, setCursor, setDisplayable, setDragSource, setDropTarget, setFocused, setHeight, setLocation, setLocation, setPreferredHeight, setPreferredSize, setPreferredSize, setPreferredWidth, setSize, setSkin, setStyles, setStyles, setStyles, setTooltipText, setWidth, setX, setY, store, toString, transferFocus |
imageView
protected ImageView imageView
label
protected Label label
DEFAULT_ICON_WIDTH
public static final int DEFAULT_ICON_WIDTH
- See Also:
- Constant Field Values
DEFAULT_ICON_HEIGHT
public static final int DEFAULT_ICON_HEIGHT
- See Also:
- Constant Field Values
DEFAULT_SHOW_ICON
public static boolean DEFAULT_SHOW_ICON
TreeViewNodeRenderer
public TreeViewNodeRenderer()
setSize
public void setSize(int width,
int height)
- Description copied from class:
Component
- NOTE This method should only be called during layout. Callers should
use
Component.setPreferredSize(int, int)
.
- Specified by:
setSize
in interface ConstrainedVisual
- Overrides:
setSize
in class Component
render
public void render(Object node,
TreeView treeView,
boolean expanded,
boolean selected,
TreeView.NodeCheckState checkState,
boolean highlighted,
boolean disabled)
- Specified by:
render
in interface TreeView.NodeRenderer
getIconWidth
public int getIconWidth()
setIconWidth
public void setIconWidth(int iconWidth)
getIconHeight
public int getIconHeight()
setIconHeight
public void setIconHeight(int iconHeight)
getShowIcon
public boolean getShowIcon()
setShowIcon
public void setShowIcon(boolean showIcon)
getTextBounds
public Bounds getTextBounds()
- Gets the bounds of the text that is rendered by this renderer.
- Returns:
- The bounds of the rendered text, or null if this renderer did
not render any text.