Docjar: A Java Source and Docuemnt Enginecom.*    java.*    javax.*    org.*    all    new    plug-in

Quick Search    Search Deep

javatools.swing.tree
Class AbstractTreeExpansionDispatcher  view AbstractTreeExpansionDispatcher download AbstractTreeExpansionDispatcher.java

java.lang.Object
  extended byjava.lang.Thread
      extended byjavatools.swing.tree.AbstractTreeExpansionDispatcher
All Implemented Interfaces:
java.lang.Runnable

public abstract class AbstractTreeExpansionDispatcher
extends java.lang.Thread

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();

Version:
0.1.7

Nested Class Summary
 
Nested classes inherited from class java.lang.Thread
java.lang.Thread.UncaughtExceptionHandler
 
Field Summary
private  javatools.util.JQueue nodeQueue
           
private  boolean processing
           
protected  javatools.swing.StatusLabelSync statusSync
          The status label sync to be used to display messages.
private  boolean stoppedExternally
           
 
Fields inherited from class java.lang.Thread
MAX_PRIORITY, MIN_PRIORITY, NORM_PRIORITY
 
Constructor Summary
AbstractTreeExpansionDispatcher()
          Creates a new instance of AbstractTreeExpansionDispatcher
 
Method Summary
private  void doDispatch()
           
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.
private  void restartDispatch()
           
 void run()
          Thread's run method.
 void setStatusLabelSync(javatools.swing.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, getDefaultUncaughtExceptionHandler, getId, getName, getPriority, getThreadGroup, getUncaughtExceptionHandler, holdsLock, interrupt, interrupted, isAlive, isDaemon, isInterrupted, join, join, join, resume, setContextClassLoader, setDaemon, setDefaultUncaughtExceptionHandler, setName, setPriority, setUncaughtExceptionHandler, 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

statusSync

protected javatools.swing.StatusLabelSync statusSync
The status label sync to be used to display messages.


nodeQueue

private javatools.util.JQueue nodeQueue

stoppedExternally

private boolean stoppedExternally

processing

private boolean processing
Constructor Detail

AbstractTreeExpansionDispatcher

public AbstractTreeExpansionDispatcher()
Creates a new instance of AbstractTreeExpansionDispatcher

Method Detail

setStatusLabelSync

public void setStatusLabelSync(javatools.swing.StatusLabelSync sync)
Sets the status label sync to use.


run

public void run()
Thread's run method.


stopAll

public void stopAll()
Stops the thread.


expand

public void expand(javax.swing.JTree tree,
                   javax.swing.tree.TreePath path)
Expands a node.


doDispatchOne

protected abstract void doDispatchOne(javax.swing.JTree tree,
                                      javax.swing.tree.TreePath path)
Inherit it to make your own operations.


doDispatch

private void doDispatch()

restartDispatch

private void restartDispatch()