com.creamtec.ajaxswing.support
Interface TreeSupport


public interface TreeSupport

JTree subclasses can implement this interface to provide additional information to AjaxSwing


Field Summary
static java.lang.String[] DEFAULT_NODE_IMAGE_NAMES
           
static int IMG_BLANK
           
static int IMG_FOLDER_COLLAPSED
           
static int IMG_FOLDER_EXPANDED
           
static int IMG_ITEM
           
static int IMG_LAST_FOLDER_COLLAPSED
           
static int IMG_LAST_FOLDER_EXPANDED
           
static int IMG_LAST_ITEM
           
static int IMG_LINE
           
static int IMG_ROOT_FOLDER_COLLAPSED
           
static int IMG_ROOT_FOLDER_EXPANDED
           
static int IMG_ROOT_LAST_FOLDER_COLLAPSED
           
static int IMG_ROOT_LAST_FOLDER_EXPANDED
           
 
Method Summary
 javax.swing.JPopupMenu getNodeContextMenu(javax.swing.tree.TreeNode node)
          Returns context menu associated with the given row
 java.lang.String getNodeImageBundleName(javax.swing.tree.TreeNode node)
          Returns the name of the image bundle that will be used in rendering of the node
 java.lang.String getNodeImagePath(javax.swing.tree.TreeNode node, int imageIndex)
          Returns the relative path to the theme docs URL of the image that should be used for the node
 

Field Detail

IMG_BLANK

static final int IMG_BLANK
See Also:
Constant Field Values

IMG_LINE

static final int IMG_LINE
See Also:
Constant Field Values

IMG_ITEM

static final int IMG_ITEM
See Also:
Constant Field Values

IMG_LAST_ITEM

static final int IMG_LAST_ITEM
See Also:
Constant Field Values

IMG_FOLDER_EXPANDED

static final int IMG_FOLDER_EXPANDED
See Also:
Constant Field Values

IMG_FOLDER_COLLAPSED

static final int IMG_FOLDER_COLLAPSED
See Also:
Constant Field Values

IMG_LAST_FOLDER_EXPANDED

static final int IMG_LAST_FOLDER_EXPANDED
See Also:
Constant Field Values

IMG_LAST_FOLDER_COLLAPSED

static final int IMG_LAST_FOLDER_COLLAPSED
See Also:
Constant Field Values

IMG_ROOT_FOLDER_EXPANDED

static final int IMG_ROOT_FOLDER_EXPANDED
See Also:
Constant Field Values

IMG_ROOT_FOLDER_COLLAPSED

static final int IMG_ROOT_FOLDER_COLLAPSED
See Also:
Constant Field Values

IMG_ROOT_LAST_FOLDER_EXPANDED

static final int IMG_ROOT_LAST_FOLDER_EXPANDED
See Also:
Constant Field Values

IMG_ROOT_LAST_FOLDER_COLLAPSED

static final int IMG_ROOT_LAST_FOLDER_COLLAPSED
See Also:
Constant Field Values

DEFAULT_NODE_IMAGE_NAMES

static final java.lang.String[] DEFAULT_NODE_IMAGE_NAMES
Method Detail

getNodeContextMenu

javax.swing.JPopupMenu getNodeContextMenu(javax.swing.tree.TreeNode node)
Returns context menu associated with the given row

Parameters:
node - node being rendered
Returns:
context menu to display when the user clicks right mouse button

getNodeImageBundleName

java.lang.String getNodeImageBundleName(javax.swing.tree.TreeNode node)
Returns the name of the image bundle that will be used in rendering of the node

Parameters:
node - node being rendered
Returns:
tree image bundle name (default is used if null is returned)

getNodeImagePath

java.lang.String getNodeImagePath(javax.swing.tree.TreeNode node,
                                  int imageIndex)
Returns the relative path to the theme docs URL of the image that should be used for the node

Parameters:
node - node being rendered
Returns:
path such as "/images/ajaxswing/tree/FolderOpen.gif"


Copyright © 2000-2008 CreamTec LLC. All Rights Reserved.