Class DummyProgressMonitor
- java.lang.Object
-
- org.hortonmachine.gears.libs.monitor.DummyProgressMonitor
-
- All Implemented Interfaces:
IHMProgressMonitor
public class DummyProgressMonitor extends Object implements IHMProgressMonitor
As the name says.- Author:
- Andrea Antonello (www.hydrologis.com)
-
-
Field Summary
-
Fields inherited from interface org.hortonmachine.gears.libs.monitor.IHMProgressMonitor
UNKNOWN
-
-
Constructor Summary
Constructors Constructor Description DummyProgressMonitor()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description <T> Tadapt(Class<T> adaptee)Adapts the monitor to a given class.voidbeginTask(String name)voidbeginTask(String name, int totalWork)Notifies that the main task is beginning.voiddone()Notifies that the work is done; that is, either the main task is completed or the user canceled it.voiderrorMessage(String message)Sends out an error message.voidexceptionThrown(String message)Method to be called in case of exception.voidinternalWorked(double work)Internal method to handle scaling correctly.booleanisCanceled()Returns whether cancellation of current operation has been requested.voidmessage(String message)Sends out a message.voidonModuleExit()Method to call on module finalization.voidsetCanceled(boolean value)Sets the cancel state to the given value.voidsetTaskName(String name)Sets the task name to the given value.voidsubTask(String name)Notifies that a subtask of the main task is beginning.voidworked(int work)Notifies that a given number of work unit of the main task has been completed.
-
-
-
Method Detail
-
beginTask
public void beginTask(String name, int totalWork)
Description copied from interface:IHMProgressMonitorNotifies that the main task is beginning.- Specified by:
beginTaskin interfaceIHMProgressMonitor
-
beginTask
public void beginTask(String name)
-
done
public void done()
Description copied from interface:IHMProgressMonitorNotifies that the work is done; that is, either the main task is completed or the user canceled it.- Specified by:
donein interfaceIHMProgressMonitor
-
internalWorked
public void internalWorked(double work)
Description copied from interface:IHMProgressMonitorInternal method to handle scaling correctly.- Specified by:
internalWorkedin interfaceIHMProgressMonitor
-
isCanceled
public boolean isCanceled()
Description copied from interface:IHMProgressMonitorReturns whether cancellation of current operation has been requested.- Specified by:
isCanceledin interfaceIHMProgressMonitor- Returns:
-
setCanceled
public void setCanceled(boolean value)
Description copied from interface:IHMProgressMonitorSets the cancel state to the given value.- Specified by:
setCanceledin interfaceIHMProgressMonitor
-
setTaskName
public void setTaskName(String name)
Description copied from interface:IHMProgressMonitorSets the task name to the given value.- Specified by:
setTaskNamein interfaceIHMProgressMonitor
-
subTask
public void subTask(String name)
Description copied from interface:IHMProgressMonitorNotifies that a subtask of the main task is beginning.- Specified by:
subTaskin interfaceIHMProgressMonitor
-
worked
public void worked(int work)
Description copied from interface:IHMProgressMonitorNotifies that a given number of work unit of the main task has been completed.- Specified by:
workedin interfaceIHMProgressMonitor
-
adapt
public <T> T adapt(Class<T> adaptee)
Description copied from interface:IHMProgressMonitorAdapts the monitor to a given class.- Specified by:
adaptin interfaceIHMProgressMonitor- Parameters:
adaptee- the class to which to adapt to.- Returns:
- the adapted object or null, if it is not assignable.
-
errorMessage
public void errorMessage(String message)
Description copied from interface:IHMProgressMonitorSends out an error message.- Specified by:
errorMessagein interfaceIHMProgressMonitor- Parameters:
message- the error message to send out.
-
message
public void message(String message)
Description copied from interface:IHMProgressMonitorSends out a message.- Specified by:
messagein interfaceIHMProgressMonitor- Parameters:
message- the message to send out.
-
exceptionThrown
public void exceptionThrown(String message)
Description copied from interface:IHMProgressMonitorMethod to be called in case of exception.- Specified by:
exceptionThrownin interfaceIHMProgressMonitor- Parameters:
message- the error message to send out.
-
onModuleExit
public void onModuleExit()
Description copied from interface:IHMProgressMonitorMethod to call on module finalization.- Specified by:
onModuleExitin interfaceIHMProgressMonitor
-
-