net.sf.doolin.gui.monitor
Class Task<T,V>

java.lang.Object
  extended by javax.swing.SwingWorker<T,V>
      extended by net.sf.doolin.gui.monitor.Task<T,V>
Type Parameters:
T - the result type returned by this SwingWorker's doInBackground and get methods
V - the type used for carrying out intermediate results by this SwingWorker's publish and process methods
All Implemented Interfaces:
Runnable, Future<T>, RunnableFuture<T>
Direct Known Subclasses:
CallableTask

public abstract class Task<T,V>
extends SwingWorker<T,V>

SwingWorker that has an access to a listener for the task monitoring.

Author:
Damien Coraboeuf

Nested Class Summary
 
Nested classes/interfaces inherited from class javax.swing.SwingWorker
SwingWorker.StateValue
 
Constructor Summary
Task()
           
 
Method Summary
protected  void fireTaskNote(String note)
          Posts a message to the task listener, which is used to display a progress message to the TaskMonitor.
 TaskListener<T,V> getListener()
          Gets the listener
 void setListener(TaskListener<T,V> listener)
          Sets the listener
 
Methods inherited from class javax.swing.SwingWorker
addPropertyChangeListener, cancel, doInBackground, done, 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
 

Constructor Detail

Task

public Task()
Method Detail

fireTaskNote

protected void fireTaskNote(String note)
Posts a message to the task listener, which is used to display a progress message to the TaskMonitor.

Parameters:
note - Note to display

getListener

public TaskListener<T,V> getListener()
Gets the listener

Returns:
Listener

setListener

public void setListener(TaskListener<T,V> listener)
Sets the listener

Parameters:
listener - Listener


Copyright © 2011. All Rights Reserved.