pivot.wtk.content
Class TreeViewFileRenderer

java.lang.Object
  extended by pivot.wtk.Component
      extended by pivot.wtk.Container
          extended by pivot.wtk.FlowPane
              extended by pivot.wtk.content.TreeViewFileRenderer
All Implemented Interfaces:
Iterable<Component>, Sequence<Component>, ConstrainedVisual, Renderer, TreeView.NodeRenderer, Visual

public class TreeViewFileRenderer
extends FlowPane
implements TreeView.NodeRenderer

Tree view renderer for displaying file system contents.

Author:
gbrown

Nested Class Summary
 
Nested classes/interfaces inherited from class pivot.wtk.Component
Component.Attributes, Component.ComponentDictionary, Component.DecoratorSequence, Component.StyleDictionary, Component.UserDataDictionary
 
Nested classes/interfaces inherited from interface pivot.collections.Sequence
Sequence.Search, Sequence.Sort, Sequence.Tree
 
Field Summary
static int ICON_HEIGHT
           
static int ICON_WIDTH
           
 
Constructor Summary
TreeViewFileRenderer()
           
 
Method Summary
 int getPreferredHeight(int width)
          Returns the component's constrained preferred height.
 void render(Object node, TreeView treeView, boolean expanded, boolean selected, TreeView.NodeCheckState checkState, boolean highlighted, boolean disabled)
           
 void setSize(int width, int height)
          NOTE This method should only be called during layout.
 
Methods inherited from class pivot.wtk.FlowPane
getFlowPaneListeners, getOrientation, setOrientation, setOrientation
 
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, 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
 
Methods inherited from class java.lang.Object
clone, equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface pivot.wtk.Renderer
getStyles
 
Methods inherited from interface pivot.wtk.ConstrainedVisual
getPreferredSize, getPreferredWidth
 
Methods inherited from interface pivot.wtk.Visual
getHeight, getWidth, paint
 

Field Detail

ICON_WIDTH

public static final int ICON_WIDTH
See Also:
Constant Field Values

ICON_HEIGHT

public static final int ICON_HEIGHT
See Also:
Constant Field Values
Constructor Detail

TreeViewFileRenderer

public TreeViewFileRenderer()
Method Detail

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

getPreferredHeight

public int getPreferredHeight(int width)
Description copied from class: Component
Returns the component's constrained preferred height.

Specified by:
getPreferredHeight in interface ConstrainedVisual
Overrides:
getPreferredHeight in class Component
Parameters:
width - The width value by which the preferred height should be constrained, or -1 for no constraint.
Returns:
The constrained preferred height.

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