|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--java.lang.Thread | +--javatools.swing.tree.AbstractTreeExpansionDispatcher
It is an "event dispatcher" for tree expansions, i.e. it manages in a separate
thread tree expansions.
You have only to inherit this method:
doDispatchOne
: what you have to do when you are expanding a node.
Once created your own class, use this sequence of commands:
AbstractTreeExpansioDispatcher disp = new YourClass();
disp.setStatusLabelSync(myStatusLabelSync);
disp.start();
disp.expand(myTree, mySelectionPath);
disp.stopAll();
Field Summary | |
protected StatusLabelSync |
statusSync
The status label sync to be used to display messages. |
Fields inherited from class java.lang.Thread |
MAX_PRIORITY, MIN_PRIORITY, NORM_PRIORITY |
Constructor Summary | |
AbstractTreeExpansionDispatcher()
Creates a new instance of AbstractTreeExpansionDispatcher |
Method Summary | |
protected abstract void |
doDispatchOne(javax.swing.JTree tree,
javax.swing.tree.TreePath path)
Inherit it to make your own operations. |
void |
expand(javax.swing.JTree tree,
javax.swing.tree.TreePath path)
Expands a node. |
void |
run()
Thread's run method. |
void |
setStatusLabelSync(StatusLabelSync sync)
Sets the status label sync to use. |
void |
stopAll()
Stops the thread. |
Methods inherited from class java.lang.Thread |
activeCount, checkAccess, countStackFrames, currentThread, destroy, dumpStack, enumerate, getContextClassLoader, getName, getPriority, getThreadGroup, holdsLock, interrupt, interrupted, isAlive, isDaemon, isInterrupted, join, join, join, resume, setContextClassLoader, setDaemon, setName, setPriority, sleep, sleep, start, stop, stop, suspend, toString, yield |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
protected StatusLabelSync statusSync
Constructor Detail |
public AbstractTreeExpansionDispatcher()
Method Detail |
public void setStatusLabelSync(StatusLabelSync sync)
sync
- The sync to use.public void run()
run
in interface java.lang.Runnable
run
in class java.lang.Thread
public void stopAll()
public void expand(javax.swing.JTree tree, javax.swing.tree.TreePath path)
tree
- The tree that will be expanded.path
- The complete path of the node to be expanded.protected abstract void doDispatchOne(javax.swing.JTree tree, javax.swing.tree.TreePath path)
tree
- The tree that will be expanded.path
- The complete selection path.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |