JClass DesktopViews 6.3.0 API
Documentation

com.klg.jclass.util.treetable
Interface JCTreeIconRenderer

All Known Implementing Classes:
DefaultTreeIconRenderer

public interface JCTreeIconRenderer

Interface that represents a class that renders a tree icon. Although not a renderer in the strict definition of the word, this interface provides the icon to be rendered. It is not necessary to make this interface do the rendering since Icons know how to render themselves.

A default implementation of this class simply returns the plaf icon passed in.

The purpose of this mechanism is to allow a user to override the icons being drawn in a tree without a) having to figure out the plaf for the icons that they do not wish to override and b) overidding simple datatype editors.


Method Summary
 Icon getNodeIcon(TreeModel treemodel, Object node, Object value, Class object_class, boolean is_leaf, boolean is_expanded, Icon plaf_icon)
          Returns the icon to render to the right of the specified value.
 

Method Detail

getNodeIcon

public Icon getNodeIcon(TreeModel treemodel,
                        Object node,
                        Object value,
                        Class object_class,
                        boolean is_leaf,
                        boolean is_expanded,
                        Icon plaf_icon)
Returns the icon to render to the right of the specified value.

Parameters:
treemodel - the treemodel being rendered
node - the node of the treemodel being rendered
value - the value of the node being rendered
object_class - the class of the value being rendered if known; null otherwise
is_leaf - is the node a leaf or not
is_expanded - whether the node has been expanded or not
plaf_icon - the icon that the plaf would would like to draw
Returns:
icon to render

Copyright © 2004 Quest Software Inc..
All rights reserved.