Interface IHMProgressMonitor
-
- All Known Implementing Classes:
DummyProgressMonitor,GeotoolsProgressMonitorAdapter,LogProgressMonitor,PrintStreamProgressMonitor
public interface IHMProgressMonitorThe Main Progress Monitor.This is done in order to be able to use the monitor outside of the eclipse environment.
- Author:
- Andrea Antonello (www.hydrologis.com)
-
-
Field Summary
Fields Modifier and Type Field Description static intUNKNOWNConstant indicating an unknown amount of work.
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description <T> Tadapt(Class<T> adaptee)Adapts the monitor to a given class.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.
-
-
-
Field Detail
-
UNKNOWN
static final int UNKNOWN
Constant indicating an unknown amount of work.- See Also:
- Constant Field Values
-
-
Method Detail
-
beginTask
void beginTask(String name, int totalWork)
Notifies that the main task is beginning.- Parameters:
name-totalWork-
-
message
void message(String message)
Sends out a message.- Parameters:
message- the message to send out.
-
errorMessage
void errorMessage(String message)
Sends out an error message.- Parameters:
message- the error message to send out.
-
exceptionThrown
void exceptionThrown(String message)
Method to be called in case of exception.- Parameters:
message- the error message to send out.
-
done
void done()
Notifies that the work is done; that is, either the main task is completed or the user canceled it.
-
internalWorked
void internalWorked(double work)
Internal method to handle scaling correctly.- Parameters:
work-
-
isCanceled
boolean isCanceled()
Returns whether cancellation of current operation has been requested.- Returns:
-
setCanceled
void setCanceled(boolean value)
Sets the cancel state to the given value.- Parameters:
value-
-
setTaskName
void setTaskName(String name)
Sets the task name to the given value.- Parameters:
name-
-
subTask
void subTask(String name)
Notifies that a subtask of the main task is beginning.- Parameters:
name-
-
worked
void worked(int work)
Notifies that a given number of work unit of the main task has been completed.- Parameters:
work-
-
adapt
<T> T adapt(Class<T> adaptee)
Adapts the monitor to a given class.- Parameters:
adaptee- the class to which to adapt to.- Returns:
- the adapted object or null, if it is not assignable.
-
onModuleExit
void onModuleExit()
Method to call on module finalization.
-
-