Package org.gvsig.utils.swing.threads
Class DefaultCancellableMonitorable
java.lang.Object
org.gvsig.utils.swing.threads.DefaultCancellableMonitorable
- All Implemented Interfaces:
org.gvsig.tools.task.Cancellable,CancellableMonitorable,Monitorable
- Direct Known Subclasses:
AbstractMonitorableTask
Default very easy implementation of
CancellableMonitorable
- Author:
- azabala
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionintReturn the number of steps processedintintbooleanbooleanTells if the process is monitoring is definedvoidReport to monitor that an individual step was processed.voidreset()Sets initial default monitorization valuesvoidsetCanceled(boolean canceled) voidsetCurrentStep(int currentStep) Allows to modify current step.voidsetDeterminatedProcess(boolean determinated) Reports to the monitor that the process is monitoring is (or not) a defined process.voidsetFinalStep(int step) report monitor what number has the final step of the process is monitoring (no apply to undefined process)voidsetInitialStep(int step) report monitor what number has the initial step of the process is monitoring
-
Constructor Details
-
DefaultCancellableMonitorable
public DefaultCancellableMonitorable()
-
-
Method Details
-
isCanceled
public boolean isCanceled()- Specified by:
isCanceledin interfaceorg.gvsig.tools.task.Cancellable
-
reportStep
public void reportStep()Description copied from interface:MonitorableReport to monitor that an individual step was processed.- Specified by:
reportStepin interfaceMonitorable
-
getCurrentStep
public int getCurrentStep()Description copied from interface:MonitorableReturn the number of steps processed- Specified by:
getCurrentStepin interfaceMonitorable- Returns:
-
setInitialStep
public void setInitialStep(int step) Description copied from interface:Monitorablereport monitor what number has the initial step of the process is monitoring- Specified by:
setInitialStepin interfaceMonitorable- Parameters:
step-
-
setFinalStep
public void setFinalStep(int step) Description copied from interface:Monitorablereport monitor what number has the final step of the process is monitoring (no apply to undefined process)- Specified by:
setFinalStepin interfaceMonitorable- Parameters:
step-
-
setDeterminatedProcess
public void setDeterminatedProcess(boolean determinated) Description copied from interface:MonitorableReports to the monitor that the process is monitoring is (or not) a defined process. A defined process is a process whose number of step is predefined (in front of not defined process, which may run in an unknown number of steps)- Specified by:
setDeterminatedProcessin interfaceMonitorable- Parameters:
determinated-
-
isDeterminatedProcess
public boolean isDeterminatedProcess()Description copied from interface:MonitorableTells if the process is monitoring is defined- Specified by:
isDeterminatedProcessin interfaceMonitorable- Returns:
-
setCanceled
public void setCanceled(boolean canceled) - Specified by:
setCanceledin interfaceorg.gvsig.tools.task.Cancellable
-
reset
public void reset()Description copied from interface:MonitorableSets initial default monitorization values- Specified by:
resetin interfaceMonitorable
-
getInitialStep
public int getInitialStep()- Specified by:
getInitialStepin interfaceMonitorable
-
getFinalStep
public int getFinalStep()- Specified by:
getFinalStepin interfaceMonitorable
-
setCurrentStep
public void setCurrentStep(int currentStep) Description copied from interface:MonitorableAllows to modify current step.- Specified by:
setCurrentStepin interfaceMonitorable
-