|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.archiviststoolkit.swing.WorkSurfaceTreeModel
public class WorkSurfaceTreeModel
An important part of the Workbench gui is the tree which displays all accessible worksurfaces. This tree is supported by this the workbench tree model
Constructor Summary | |
---|---|
WorkSurfaceTreeModel()
Default constructor, currently does nothing. |
Method Summary | |
---|---|
void |
add(WorkSurface worksurface)
Add a new Item to the tree model. |
void |
addTreeModelListener(javax.swing.event.TreeModelListener listener)
Adds a listener for the TreeModelEvent posted after the tree changes. |
protected void |
fireTreeStructureChanged(java.lang.Object oldRoot)
Tell all the listeners that the tree has changed. |
java.lang.Object |
getChild(java.lang.Object parent,
int index)
Get the object which exists as a child at index of the parent. |
int |
getChildCount(java.lang.Object parent)
Get the number of children this parent supports. |
int |
getIndexOfChild(java.lang.Object parent,
java.lang.Object child)
Get the child index of the named object. |
java.lang.Object |
getRoot()
Get the root object. |
boolean |
isLeaf(java.lang.Object node)
Returns if this is a leaf object. |
void |
refresh()
Refresh any JTree components which are dependent on this model. |
void |
removeTreeModelListener(javax.swing.event.TreeModelListener listener)
Removes a listener previously added with addTreeModelListener(). |
void |
valueForPathChanged(javax.swing.tree.TreePath path,
java.lang.Object newVal)
Notifys the model that the value for the path has changed. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public WorkSurfaceTreeModel()
Method Detail |
---|
public final void add(WorkSurface worksurface)
worksurface
- the item to addpublic final void refresh()
protected final void fireTreeStructureChanged(java.lang.Object oldRoot)
oldRoot
- the root from which this has changedpublic final void addTreeModelListener(javax.swing.event.TreeModelListener listener)
addTreeModelListener
in interface javax.swing.tree.TreeModel
listener
- the listener to addpublic final void removeTreeModelListener(javax.swing.event.TreeModelListener listener)
removeTreeModelListener
in interface javax.swing.tree.TreeModel
listener
- the listener to removepublic final java.lang.Object getChild(java.lang.Object parent, int index)
getChild
in interface javax.swing.tree.TreeModel
parent
- the parent objectindex
- the index of the child
public final int getChildCount(java.lang.Object parent)
getChildCount
in interface javax.swing.tree.TreeModel
parent
- the parent for which we want the count
public final int getIndexOfChild(java.lang.Object parent, java.lang.Object child)
getIndexOfChild
in interface javax.swing.tree.TreeModel
parent
- the parent of the child were talking aboutchild
- the child which we are talking about
public final java.lang.Object getRoot()
getRoot
in interface javax.swing.tree.TreeModel
public final boolean isLeaf(java.lang.Object node)
isLeaf
in interface javax.swing.tree.TreeModel
node
- the node which we are testing
public final void valueForPathChanged(javax.swing.tree.TreePath path, java.lang.Object newVal)
valueForPathChanged
in interface javax.swing.tree.TreeModel
path
- the treepathnewVal
- the value for this node
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |