jaxx.runtime.swing.application
Class ActionWorker<R,P>

java.lang.Object
  extended by javax.swing.SwingWorker<R,P>
      extended by jaxx.runtime.swing.application.ActionWorker<R,P>
All Implemented Interfaces:
Runnable, Future<R>, RunnableFuture<R>

public class ActionWorker<R,P>
extends SwingWorker<R,P>

Action worker to execute a incoming action.

Since:
2.1
Author:
tchemit

Nested Class Summary
static class ActionWorker.ActionStatus
          State of a running action
 
Nested classes/interfaces inherited from class javax.swing.SwingWorker
SwingWorker.StateValue
 
Field Summary
protected  String actionLabel
           
protected  long endTime
           
protected  Exception error
           
protected  long startTime
           
protected  ActionWorker.ActionStatus status
           
protected  Runnable target
           
 
Constructor Summary
ActionWorker(String actionLabel)
           
ActionWorker(String actionLabel, Runnable target)
           
 
Method Summary
protected  R doInBackground()
           
protected  void done()
           
 String getActionLabel()
           
 long getEndTime()
           
 Exception getError()
           
 long getStartTime()
           
 ActionWorker.ActionStatus getStatus()
           
 Runnable getTarget()
           
 String getTime()
           
 boolean isFailed()
           
 void setTarget(Runnable target)
           
 
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

actionLabel

protected final String actionLabel

target

protected Runnable target

status

protected ActionWorker.ActionStatus status

error

protected Exception error

startTime

protected long startTime

endTime

protected long endTime
Constructor Detail

ActionWorker

public ActionWorker(String actionLabel)

ActionWorker

public ActionWorker(String actionLabel,
                    Runnable target)
Method Detail

getTarget

public Runnable getTarget()

setTarget

public void setTarget(Runnable target)

doInBackground

protected R doInBackground()
                    throws Exception
Specified by:
doInBackground in class SwingWorker<R,P>
Throws:
Exception

isFailed

public boolean isFailed()

getError

public Exception getError()

getStatus

public ActionWorker.ActionStatus getStatus()

getActionLabel

public String getActionLabel()

done

protected void done()
Overrides:
done in class SwingWorker<R,P>

getTime

public String getTime()

getStartTime

public long getStartTime()

getEndTime

public long getEndTime()


Copyright © 2008-2011 CodeLutin. All Rights Reserved.