|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectjavax.swing.AbstractListModel
com.fullspan.util.swing.TreeNodeListModel
This class represents the child nodes of a TreeNode as elements in a ListModel.
In a user interface, it is common to have a left pane with a tree and a right pane with a list. When the user clicks on a node in the tree, the children of that node are shown as a list in the right pane. This class allows the children of the TreeNode to be easily represented as a ListModel.
| Field Summary |
| Fields inherited from class javax.swing.AbstractListModel |
listenerList |
| Constructor Summary | |
TreeNodeListModel(javax.swing.tree.TreeNode treeNode)
|
|
| Method Summary | |
void |
fireContentsChanged(java.lang.Object source,
int index0,
int index1)
Override base class to make this method public |
java.lang.Object |
getElementAt(int index)
Returns the value at the specified index. |
int |
getSize()
Returns the number of elements in the list. |
void |
setNode(javax.swing.tree.TreeNode treeNode)
Reset this ListModel to represent a new list of treeNode children. |
| Methods inherited from class javax.swing.AbstractListModel |
addListDataListener, fireIntervalAdded, fireIntervalRemoved, getListDataListeners, getListeners, removeListDataListener |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
public TreeNodeListModel(javax.swing.tree.TreeNode treeNode)
treeNode - the treeNode whose children will be represented
by this ListModel| Method Detail |
public void setNode(javax.swing.tree.TreeNode treeNode)
treeNode - the treeNode whose children will be represented
by this ListModelpublic int getSize()
public java.lang.Object getElementAt(int index)
index - the requested index
public void fireContentsChanged(java.lang.Object source,
int index0,
int index1)
AbstractListModel.fireContentsChanged(java.lang.Object, int, int)
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||