|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.jdesktop.swingx.treetable.TreeModelSupport
public final class TreeModelSupport
Support for change notification, usable by TreeModel
s.
The changed/inserted/removed is expressed in terms of a TreePath
,
it's up to the client model to build it as appropriate.
This is inspired by AbstractTreeModel
from Christian Kaufhold,
www.chka.de.
Field Summary | |
---|---|
protected EventListenerList |
listeners
|
Constructor Summary | |
---|---|
TreeModelSupport(TreeModel model)
Creates the support class for the given TreeModel . |
Method Summary | |
---|---|
void |
addTreeModelListener(TreeModelListener l)
|
void |
fireChildAdded(TreePath parentPath,
int index,
Object child)
|
void |
fireChildChanged(TreePath parentPath,
int index,
Object child)
|
void |
fireChildRemoved(TreePath parentPath,
int index,
Object child)
|
void |
fireChildrenAdded(TreePath parentPath,
int[] indices,
Object[] children)
|
void |
fireChildrenChanged(TreePath parentPath,
int[] indices,
Object[] children)
|
void |
fireChildrenRemoved(TreePath parentPath,
int[] indices,
Object[] children)
|
void |
fireNewRoot()
Call when there is a new root, which may be null, i.e. |
void |
firePathChanged(TreePath path)
Call when the path itself has changed, but no structure changes have occurred. |
void |
firePathLeafStateChanged(TreePath path)
Call when a node has changed its leaf state. |
void |
fireStructureChanged()
Call when everything but the root has changed. |
void |
fireTreeStructureChanged(TreePath parentPath)
Call when the tree structure below the path has completely changed. |
TreeModelListener[] |
getTreeModelListeners()
|
void |
removeTreeModelListener(TreeModelListener l)
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
protected EventListenerList listeners
Constructor Detail |
---|
public TreeModelSupport(TreeModel model)
TreeModel
.
model
- the model to support
NullPointerException
- if model
is null
Method Detail |
---|
public void fireNewRoot()
public void fireStructureChanged()
public void firePathLeafStateChanged(TreePath path)
path
- a path ending in the (old) leafpublic void fireTreeStructureChanged(TreePath parentPath)
parentPath
- the path to the node that changedpublic void firePathChanged(TreePath path)
public void fireChildAdded(TreePath parentPath, int index, Object child)
public void fireChildChanged(TreePath parentPath, int index, Object child)
public void fireChildRemoved(TreePath parentPath, int index, Object child)
public void fireChildrenAdded(TreePath parentPath, int[] indices, Object[] children)
public void fireChildrenChanged(TreePath parentPath, int[] indices, Object[] children)
public void fireChildrenRemoved(TreePath parentPath, int[] indices, Object[] children)
public void addTreeModelListener(TreeModelListener l)
public TreeModelListener[] getTreeModelListeners()
public void removeTreeModelListener(TreeModelListener l)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |