www.RoboHobby.com - Java ME/SE robotics project

com.robohobby.jsr296
Class LongTask

java.lang.Object
  extended by org.jdesktop.swingworker.SwingWorker<T,V>
      extended by org.jdesktop.application.Task<java.lang.Void,java.lang.Void>
          extended by com.robohobby.jsr296.LongTask
All Implemented Interfaces:
java.lang.Runnable, java.util.concurrent.Future<java.lang.Void>

public class LongTask
extends org.jdesktop.application.Task<java.lang.Void,java.lang.Void>

Author:
Oleg


Nested Class Summary
 
Nested classes/interfaces inherited from class org.jdesktop.application.Task
org.jdesktop.application.Task.BlockingScope, org.jdesktop.application.Task.InputBlocker
 
Nested classes/interfaces inherited from class org.jdesktop.swingworker.SwingWorker
org.jdesktop.swingworker.SwingWorker.StateValue
 
Method Summary
protected  java.lang.Void doInBackground()
          Main method, where you should place your long task It is just simple example.
 int getMaxStep()
           
 long getMsecDelay()
           
 java.lang.String getTaskName()
           
 void setMaxStep(int maxStep)
           
 void setMsecDelay(long msecDelay)
           
 void setTaskName(java.lang.String taskName)
           
 
Methods inherited from class org.jdesktop.application.Task
addTaskListener, cancelled, done, failed, finished, getApplication, getContext, getDescription, getExecutionDuration, getInputBlocker, getMessage, getMessageDuration, getResourceMap, getTaskListeners, getTaskService, getTitle, getUserCanCancel, interrupted, isPending, isProgressPropertyValid, isStarted, message, process, removeTaskListener, resourceName, setDescription, setInputBlocker, setMessage, setProgress, setProgress, setProgress, setTitle, setUserCanCancel, succeeded
 
Methods inherited from class org.jdesktop.swingworker.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
 

Method Detail

getTaskName

public java.lang.String getTaskName()

setTaskName

public void setTaskName(java.lang.String taskName)

getMaxStep

public int getMaxStep()

setMaxStep

public void setMaxStep(int maxStep)

getMsecDelay

public long getMsecDelay()

setMsecDelay

public void setMsecDelay(long msecDelay)

doInBackground

protected java.lang.Void doInBackground()
                                 throws java.lang.Exception
Main method, where you should place your long task It is just simple example. Real task should be much more complicated.

Specified by:
doInBackground in class org.jdesktop.swingworker.SwingWorker<java.lang.Void,java.lang.Void>
Returns:
Throws:
java.lang.Exception

Copyright © 2009 OLeg Lyubchenko. All Rights Reserved.