edu.cs.ai.kreator.ui.gui.components.controller
Class OutlineWorker

java.lang.Object
  extended by javax.swing.SwingWorker<T,KreatorWorker.Status>
      extended by edu.cs.ai.kreator.control.KreatorWorker<java.lang.Void>
          extended by edu.cs.ai.kreator.control.EventKreatorWorker
              extended by edu.cs.ai.kreator.ui.gui.components.controller.OutlineWorker
All Implemented Interfaces:
java.lang.Runnable, java.util.concurrent.Future<java.lang.Void>, java.util.concurrent.RunnableFuture<java.lang.Void>
Direct Known Subclasses:
OutlineKnowledgebaseWorker, OutlineSamplecollectionWorker

public class OutlineWorker
extends EventKreatorWorker

Default outline worker class. Returns an outline tree with a root node which does not contain any text See OutlineSamplecollectionWorker or OutlineKnowledgebaseWorker for a full example. Provides default functionality for sub classes.

Author:
Tim Janus

Nested Class Summary
 
Nested classes/interfaces inherited from class edu.cs.ai.kreator.control.EventKreatorWorker
EventKreatorWorker.WorkerDispatcher
 
Nested classes/interfaces inherited from class edu.cs.ai.kreator.control.KreatorWorker
KreatorWorker.Status
 
Nested classes/interfaces inherited from class javax.swing.SwingWorker
javax.swing.SwingWorker.StateValue
 
Field Summary
protected  ParsingErrorInfo lastParsingException
          reference to structure with information about parsing failures.
protected  javax.swing.tree.DefaultTreeModel treeModel
          reference to the tree model which represent the outline tree
 
Fields inherited from class edu.cs.ai.kreator.control.KreatorWorker
LOG
 
Constructor Summary
OutlineWorker(EventKreatorWorker.WorkerDispatcher dispatcher)
           
 
Method Summary
 javax.swing.tree.DefaultTreeModel getTreeModel()
           
protected  java.lang.Void myDoInBackground()
          Default Outline worker does nothing and returns outline tree with a root node containing no text.
protected  void showParsingError()
          Helper method: Writes a parsing error into the outline tree.
 
Methods inherited from class edu.cs.ai.kreator.control.EventKreatorWorker
done
 
Methods inherited from class edu.cs.ai.kreator.control.KreatorWorker
doInBackground, forceKill, forceResume, forceSuspend, getConsole, getStatus, myDone, pleaseAbort, pleaseWait, process, publish, resetShouldAbort, resume, shouldAbort, shouldWait
 
Methods inherited from class javax.swing.SwingWorker
addPropertyChangeListener, cancel, execute, firePropertyChange, get, get, getProgress, getPropertyChangeSupport, getState, isCancelled, isDone, publish, removePropertyChangeListener, run, setProgress
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

treeModel

protected javax.swing.tree.DefaultTreeModel treeModel
reference to the tree model which represent the outline tree


lastParsingException

protected ParsingErrorInfo lastParsingException
reference to structure with information about parsing failures.

Constructor Detail

OutlineWorker

public OutlineWorker(EventKreatorWorker.WorkerDispatcher dispatcher)
Method Detail

myDoInBackground

protected java.lang.Void myDoInBackground()
                                   throws AbortedExecutionException
Default Outline worker does nothing and returns outline tree with a root node containing no text.

Specified by:
myDoInBackground in class KreatorWorker<java.lang.Void>
Returns:
Throws:
AbortedExecutionException

showParsingError

protected void showParsingError()
Helper method: Writes a parsing error into the outline tree.


getTreeModel

public javax.swing.tree.DefaultTreeModel getTreeModel()