Package org.gvsig.utils.swing.threads
Class MonitorableDecoratorMainFirst
java.lang.Object
org.gvsig.utils.swing.threads.MonitorableDecoratorMainFirst
- All Implemented Interfaces:
ICancelableTask,ICancelMonitor,IMonitorableTask,ITask
Task that wraps a main task, executing it and doing some preprocess
stuff after main task, by executing a secondary task
- Author:
- azabala
-
Constructor Summary
ConstructorsConstructorDescriptionMonitorableDecoratorMainFirst(IMonitorableTask mainTask, IMonitorableTask secondaryTask) Constructor -
Method Summary
Modifier and TypeMethodDescriptionvoidcancel()voidfinished()This method is executed from the Event Dispatch Thread when the background task finishes.intintintgetNote()booleanbooleanbooleanbooleanMakes some preprocess steps, and return a boolean flag that indicates if this task can be launched.voidrun()
-
Constructor Details
-
MonitorableDecoratorMainFirst
Constructor- Parameters:
mainTask-secondaryTask-
-
-
Method Details
-
preprocess
public boolean preprocess()Makes some preprocess steps, and return a boolean flag that indicates if this task can be launched.- Returns:
-
getInitialStep
public int getInitialStep()- Specified by:
getInitialStepin interfaceIMonitorableTask
-
getFinishStep
public int getFinishStep()- Specified by:
getFinishStepin interfaceIMonitorableTask
-
getCurrentStep
public int getCurrentStep()- Specified by:
getCurrentStepin interfaceIMonitorableTask
-
getStatusMessage
- Specified by:
getStatusMessagein interfaceIMonitorableTask
-
getNote
- Specified by:
getNotein interfaceIMonitorableTask
-
isDefined
public boolean isDefined()- Specified by:
isDefinedin interfaceIMonitorableTask
-
cancel
public void cancel()- Specified by:
cancelin interfaceICancelableTask
-
run
-
isCanceled
public boolean isCanceled()- Specified by:
isCanceledin interfaceICancelMonitor
-
isFinished
public boolean isFinished()- Specified by:
isFinishedin interfaceICancelMonitor
-
finished
public void finished()Description copied from interface:IMonitorableTaskThis method is executed from the Event Dispatch Thread when the background task finishes. Any interaction with SWing objects should be placed here.- Specified by:
finishedin interfaceIMonitorableTask
-