|
Diamond Control Suite 3.0 | ||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectjava.awt.Component
java.awt.Container
javax.swing.JComponent
javax.swing.JTree
diamondedge.swing.DsTree
public class DsTree
DsTree is a drop-in replacement for JTree. It displays a hierarchical list of DsTreeNode objects, each of which consists of a label and an optional icon. The class extends JTree with more formatting and styles on individual TreeNodes and sorting.
| Nested Class Summary |
|---|
| Nested classes/interfaces inherited from class javax.swing.JTree |
|---|
JTree.AccessibleJTree, JTree.DropLocation, JTree.DynamicUtilTreeNode, JTree.EmptySelectionModel, JTree.TreeModelHandler, JTree.TreeSelectionRedirector |
| Nested classes/interfaces inherited from class javax.swing.JComponent |
|---|
JComponent.AccessibleJComponent |
| Nested classes/interfaces inherited from class java.awt.Container |
|---|
Container.AccessibleAWTContainer |
| Nested classes/interfaces inherited from class java.awt.Component |
|---|
Component.AccessibleAWTComponent, Component.BaselineResizeBehavior, Component.BltBufferStrategy, Component.FlipBufferStrategy |
| Field Summary | |
|---|---|
static short |
CHILD
|
static int |
CLOSED_ICON
|
static short |
FIRST
|
protected IconList |
iconlist
|
static short |
LAST
|
protected DsTreeNode |
lastNodeEdited
|
static int |
LEAF_ICON
|
static short |
NEXT
|
static int |
OPENED_ICON
|
static short |
PREVIOUS
|
static int |
SELECTED_ICON
|
static int |
TOGGLE_ICON
|
static int |
TOGGLE_SEL_ICON
|
| Fields inherited from class javax.swing.JComponent |
|---|
accessibleContext, listenerList, TOOL_TIP_TEXT_KEY, ui, UNDEFINED_CONDITION, WHEN_ANCESTOR_OF_FOCUSED_COMPONENT, WHEN_FOCUSED, WHEN_IN_FOCUSED_WINDOW |
| Fields inherited from class java.awt.Component |
|---|
BOTTOM_ALIGNMENT, CENTER_ALIGNMENT, LEFT_ALIGNMENT, RIGHT_ALIGNMENT, TOP_ALIGNMENT |
| Fields inherited from interface java.awt.image.ImageObserver |
|---|
ABORT, ALLBITS, ERROR, FRAMEBITS, HEIGHT, PROPERTIES, SOMEBITS, WIDTH |
| Constructor Summary | |
|---|---|
DsTree()
|
|
DsTree(DsTreeModel model)
|
|
DsTree(DsTreeNode root)
|
|
| Method Summary | |
|---|---|
void |
addItemListener(ItemListener l)
Adds an ItemListener to monitor the state of the checkbox. |
void |
editingCanceled(ChangeEvent e)
This tells the listeners the editor has canceled editing |
void |
editingStopped(ChangeEvent e)
This tells the listeners the editor has ended editing |
protected static DsTreeNode |
getDefaultTree()
Creates and returns a sample tree of nodes. |
Icon |
getIcon(int i)
|
IconList |
getIconList()
Returns the IconList control to be used. |
DsTreeNode |
getNode(int index)
Returns a specific DsTreeNode in the tree by position. |
DsTreeNode |
getNode(String key)
Returns a specific DsTreeNode in the tree by key. |
DsTreeModel |
getNodes()
Returns the model which is a collection of DsTreeNode objects. |
String |
getPathSeparator()
Returns the delimiter string used for the path returned by the FullPath property. |
int |
getSelectedIndex()
Returns the index to the currently selected node. |
DsTreeNode |
getSelectedNode()
Returns the currently selected node. |
Object[] |
getSelectedObjects()
Returns an array (length 1) containing the last ListItem edited or null. |
boolean |
isIconVisible()
Returns a value that determines whether an icon is displayed next to each item in the tree. |
boolean |
isShowingCheckBoxes()
Returns a value which determines if the control displays a checkbox next to each item in the tree. |
boolean |
isSorted()
Indicates whether the children of this node are automatically sorted alphabetically. |
void |
removeItemListener(ItemListener l)
Removes an ItemListener from the button. |
void |
setIcon(int i,
Object icon)
|
void |
setIconList(IconList i)
Sets the IconList control to be used. |
void |
setIconVisible(boolean val)
a value that determines whether an icon is displayed next to each item in the tree. |
void |
setModel(TreeModel newModel)
|
void |
setSelectedIndex(int index)
Sets the currently selected node by index. |
void |
setSelectedNode(DsTreeNode n)
Sets the currently selected node. |
void |
setShowingCheckBoxes(boolean val)
Sets a value which determines if the control displays a checkbox next to each item in the tree. |
void |
setSorted(boolean sort)
Indicates whether the children of this node are automatically sorted alphabetically. |
void |
updateUI()
|
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, |