SPT Core API

com.sptci.epng
Class Tree

java.lang.Object
  extended by nextapp.echo2.app.Component
      extended by echopointng.ComponentEx
          extended by echopointng.AbleComponent
              extended by echopointng.Tree
                  extended by com.sptci.epng.Tree
All Implemented Interfaces:
View, AccessKeyable, Attributeable, Borderable, Delegateable, Heightable, Insetable, MouseCursorable, Sizeable, ToolTipable, Widthable, Serializable, RenderIdSupport

public class Tree
extends Tree
implements View

A sub-class of Tree that uses the SPT standard icons.

Copyright 2007 Sans Pareil Technologies, Inc.

Version:
$Id: Tree.java 4553 2008-12-24 10:34:16Z rakesh $
Author:
Rakesh Vidyadharan 2007-09-27
See Also:
Serialized Form

Nested Class Summary
 
Nested classes/interfaces inherited from class echopointng.Tree
Tree.TreeModelHandler, Tree.TreeRowMapper, Tree.TreeSelectionForwarder
 
Field Summary
 
Fields inherited from class echopointng.Tree
DEFAULT_STYLE, INPUT_SELECT, INPUT_TOGGLE, MODEL_STRUCTURE_CHANGED_PROPERTY, NODE_CHANGED_PROPERTY, PROPERTY_ACTION_COMMAND, PROPERTY_CELL_RENDERER, PROPERTY_CELL_WIDTH_CONTRAINED, PROPERTY_LINES_DRAWN, PROPERTY_MODEL, PROPERTY_NULL_ACTION_COMMANDS_RAISE_EVENTS, PROPERTY_PARTIAL_UPDATE_SUPPORT, PROPERTY_ROOT_AUTO_EXPANDED, PROPERTY_ROOT_VISIBLE, PROPERTY_ROW_HEIGHT, PROPERTY_SCROLL_INTO_VIEW_USED, PROPERTY_SELECTION_INCLUDES_ICON, PROPERTY_SELECTION_MODEL, PROPERTY_SHOWS_ROOT_HANDLES, PROPERTY_TREE_ICONS
 
Fields inherited from class echopointng.ComponentEx
PROPERTY_HIDDEN
 
Fields inherited from class nextapp.echo2.app.Component
CHILDREN_CHANGED_PROPERTY, ENABLED_CHANGED_PROPERTY, FOCUS_TRAVERSAL_INDEX_CHANGED_PROPERTY, FOCUS_TRAVERSAL_PARTICIPANT_CHANGED_PROPERTY, LAYOUT_DIRECTION_CHANGED_PROPERTY, LOCALE_CHANGED_PROPERTY, PROPERTY_BACKGROUND, PROPERTY_FONT, PROPERTY_FOREGROUND, PROPERTY_LAYOUT_DATA, STYLE_CHANGED_PROPERTY, STYLE_NAME_CHANGED_PROPERTY, VISIBLE_CHANGED_PROPERTY
 
Fields inherited from interface echopointng.able.AccessKeyable
PROPERTY_ACCESS_KEY
 
Fields inherited from interface echopointng.able.Borderable
PROPERTY_BORDER
 
Fields inherited from interface echopointng.able.MouseCursorable
CURSOR_AUTO, CURSOR_CROSSHAIR, CURSOR_CUSTOM_URI, CURSOR_DEFAULT, CURSOR_E_RESIZE, CURSOR_HELP, CURSOR_MOVE, CURSOR_N_RESIZE, CURSOR_NE_RESIZE, CURSOR_NW_RESIZE, CURSOR_POINTER, CURSOR_S_RESIZE, CURSOR_SE_RESIZE, CURSOR_SW_RESIZE, CURSOR_TEXT, CURSOR_W_RESIZE, CURSOR_WAIT, PROPERTY_MOUSE_CURSOR, PROPERTY_MOUSE_CURSOR_URI
 
Fields inherited from interface echopointng.able.Insetable
DEFAULT_INSETS, DEFAULT_OUTSETS, PROPERTY_INSETS, PROPERTY_OUTSETS
 
Fields inherited from interface echopointng.able.Widthable
PROPERTY_WIDTH
 
Fields inherited from interface echopointng.able.Heightable
PROPERTY_HEIGHT
 
Fields inherited from interface echopointng.able.ToolTipable
PROPERTY_TOOL_TIP_TEXT
 
Constructor Summary
Tree()
          Create a Tree with a DefaultMutableTreeNode as its root, which displays the root node.
Tree(TreeModel model)
          Create a new tree using the specified TreeModel
Tree(TreeNode root)
          Create a tree with the specified TreeNode as its root, which displays the root node.
Tree(TreeNode root, boolean asksAllowsChildren)
          Create a tree with the specified TreeNode as its root, which displays the root node and which decides whether a node is a leaf node in the specified manner.
 
Method Summary
protected  void setDefaults()
          Set defaults for the newly constructed component.
 
Methods inherited from class echopointng.Tree
addActionListener, addSelectionPath, addSelectionPaths, addTreeExpansionListener, addTreeSelectionListener, addTreeWillExpandListener, clearToggledPaths, collapseAll, collapsePath, collapseRow, createTreeModelListener, expandAll, expandPath, expandRow, fireActionPerformed, fireTreeCollapsed, fireTreeExpanded, fireTreeWillCollapse, fireTreeWillExpand, fireValueChanged, getActionCommand, getCellRenderer, getComponent, getDescendantToggledPaths, getDirtyPaths, getExpandedDescendants, getLastExpandedPaths, getLastSelectedPathComponent, getLeadSelectionPath, getModel, getPartialUpdateSupport, getPathForRow, getRowCount, getRowForPath, getRowHeight, getRowsForPaths, getSelectionCount, getSelectionModel, getSelectionPath, getSelectionPaths, getShowsRootHandles, getTreeIcons, hasEverBeenExpanded, invalidate, isCellWidthConstrained, isCollapsed, isCollapsed, isExpanded, isExpanded, isLinesDrawn, isNullActionCommandsRaiseEvents, isPathSelected, isRootAutoExpanded, isRootVisible, isScrollIntoViewUsed, isSelectionEmpty, isSelectionIncludesIcon, isVisible, makeVisible, processInput, removeActionListener, removeDescendantToggledPaths, removeSelectionPath, removeSelectionPaths, removeTreeExpansionListener, removeTreeSelectionListener, removeTreeWillExpandListener, setActionCommand, setCellRenderer, setCellWidthConstrained, setEnabled, setExpandedState, setLinesDrawn, setModel, setNullActionCommandsRaiseEvents, setPartialUpdateSupport, setRootAutoExpanded, setRootVisible, setRowHeight, setScrollIntoViewUsed, setSelectionIncludesIcon, setSelectionModel, setSelectionPath, setSelectionPaths, setShowsRootHandles, setTreeIcons, setVisible, toggleAllNodes, validate
 
Methods inherited from class echopointng.AbleComponent
getAccessKey, getBorder, getHeight, getInsets, getMouseCursor, getMouseCursorUri, getOutsets, getToolTipText, getWidth, setAccessKey, setBorder, setHeight, setInsets, setMouseCursor, setMouseCursorUri, setOutsets, setToolTipText, setWidth
 
Methods inherited from class echopointng.ComponentEx
getAttribute, getAttributeNames, getProperty, getProperty, getProperty, getProperty, getProperty, getProperty, getProperty, getProperty, getProperty, getProperty, getProperty, getProperty, getProperty, getProperty, getProperty, getProperty, getProperty, getRenderProperty, getRenderProperty, getRenderProperty, getRenderProperty, getRenderProperty, getRenderProperty, getRenderProperty, getRenderProperty, getRenderProperty, getRenderProperty, getRenderProperty, getRenderProperty, getRenderProperty, getRenderProperty, getRenderProperty, getRenderProperty, getRenderProperty, getRenderProperty, isHidden, setAttribute, setHidden, setProperty, setProperty, setProperty, setProperty, setProperty, setProperty, setProperty, setProperty, setProperty, setProperty, setProperty, setProperty, setProperty, setProperty, setProperty, setProperty, setProperty
 
Methods inherited from class nextapp.echo2.app.Component
add, add, addPropertyChangeListener, addPropertyChangeListener, dispose, firePropertyChange, getApplicationInstance, getBackground, getComponent, getComponent, getComponentCount, getComponents, getEventListenerList, getFocusTraversalIndex, getFont, getForeground, getId, getIndexedProperty, getLayoutData, getLayoutDirection, getLocale, getParent, getProperty, getRenderId, getRenderIndexedProperty, getRenderIndexedProperty, getRenderLayoutDirection, getRenderLocale, getRenderProperty, getRenderProperty, getStyle, getStyleName, getVisibleComponent, getVisibleComponentCount, getVisibleComponents, hasEventListenerList, indexOf, init, isAncestorOf, isEnabled, isFocusTraversalParticipant, isRegistered, isRenderEnabled, isRenderVisible, isValidChild, isValidParent, isVisible, remove, remove, removeAll, removePropertyChangeListener, removePropertyChangeListener, setBackground, setFocusTraversalIndex, setFocusTraversalParticipant, setFont, setForeground, setId, setIndexedProperty, setLayoutData, setLayoutDirection, setLocale, setProperty, setRenderId, setStyle, setStyleName, verifyInput, visibleIndexOf
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface echopointng.able.Delegateable
getRenderProperty, getRenderProperty
 
Methods inherited from interface echopointng.able.Delegateable
getRenderProperty, getRenderProperty
 
Methods inherited from interface echopointng.able.Delegateable
getRenderProperty, getRenderProperty
 
Methods inherited from interface echopointng.able.Delegateable
getRenderProperty, getRenderProperty
 
Methods inherited from interface echopointng.able.Delegateable
getRenderProperty, getRenderProperty
 
Methods inherited from interface echopointng.able.Delegateable
getRenderProperty, getRenderProperty
 

Constructor Detail

Tree

public Tree()
Create a Tree with a DefaultMutableTreeNode as its root, which displays the root node.

See Also:
setDefaults(), Tree.Tree()

Tree

public Tree(TreeModel model)
Create a new tree using the specified TreeModel

Parameters:
model - The tree model to use for the tree.
See Also:
setDefaults(), Tree.Tree( TreeModel )

Tree

public Tree(TreeNode root)
Create a tree with the specified TreeNode as its root, which displays the root node.

Parameters:
root - The root tree node for the tree.
See Also:
setDefaults(), Tree.Tree( TreeNode )

Tree

public Tree(TreeNode root,
            boolean asksAllowsChildren)
Create a tree with the specified TreeNode as its root, which displays the root node and which decides whether a node is a leaf node in the specified manner.

Parameters:
root - The root tree node for the tree.
asksAllowsChildren - A flag indicating whether nodes are determined as having children by querying the node or not.
See Also:
setDefaults(), Tree.Tree( TreeNode, boolean )
Method Detail

setDefaults

protected void setDefaults()
Set defaults for the newly constructed component. We have to use this since it is not possible to configure Tree.PROPERTY_SELECTION_MODEL since the TreeSelectionModel is too tightly coupled with the Tree source code.


SPT Core API