insensa.view.dialogs.helper
Class ViewCommandWorker

java.lang.Object
  extended by javax.swing.SwingWorker<java.lang.Object,java.lang.Object>
      extended by insensa.view.dialogs.helper.ViewCommandWorker
All Implemented Interfaces:
java.lang.Runnable, java.util.concurrent.Future<java.lang.Object>, java.util.concurrent.RunnableFuture<java.lang.Object>

public class ViewCommandWorker
extends javax.swing.SwingWorker<java.lang.Object,java.lang.Object>


Nested Class Summary
 
Nested classes/interfaces inherited from class javax.swing.SwingWorker
javax.swing.SwingWorker.StateValue
 
Field Summary
private  IProcessFinishedListener listener
           
private  java.awt.Component parentComponent
           
 
Constructor Summary
ViewCommandWorker(java.awt.Component parentComponent, IProcessFinishedListener listener)
           
 
Method Summary
protected  java.lang.Object doInBackground()
           
protected  void done()
           
 void executeCommands(java.awt.Component parentComponent, IProcessFinishedListener listener)
          this method will be executed in a background process.
 void undoCommands(java.awt.Component parentComponent, IProcessFinishedListener listener)
           
 
Methods inherited from class javax.swing.SwingWorker
addPropertyChangeListener, cancel, execute, firePropertyChange, get, get, getProgress, getPropertyChangeSupport, getState, isCancelled, isDone, process, publish, removePropertyChangeListener, run, setProgress
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

listener

private IProcessFinishedListener listener

parentComponent

private java.awt.Component parentComponent
Constructor Detail

ViewCommandWorker

public ViewCommandWorker(java.awt.Component parentComponent,
                         IProcessFinishedListener listener)
Parameters:
parentComponent -
listener -
Method Detail

doInBackground

protected java.lang.Object doInBackground()
                                   throws java.lang.Exception
Specified by:
doInBackground in class javax.swing.SwingWorker<java.lang.Object,java.lang.Object>
Throws:
java.lang.Exception
See Also:
SwingWorker.doInBackground()

done

protected void done()
Overrides:
done in class javax.swing.SwingWorker<java.lang.Object,java.lang.Object>
See Also:
SwingWorker.done()

executeCommands

public void executeCommands(java.awt.Component parentComponent,
                            IProcessFinishedListener listener)
                     throws java.lang.Exception
this method will be executed in a background process. It is responsible for executing ModelCommand commands

Parameters:
parentComponent -
listener -
Throws:
java.lang.Exception

undoCommands

public void undoCommands(java.awt.Component parentComponent,
                         IProcessFinishedListener listener)
                  throws java.lang.Exception
Parameters:
parentComponent -
listener -
Throws:
java.lang.Exception