Package moa.tasks
Class NullMonitor
- java.lang.Object
-
- moa.tasks.NullMonitor
-
- All Implemented Interfaces:
TaskMonitor
public class NullMonitor extends Object implements TaskMonitor
Class that represents a null monitor.- Version:
- $Revision: 7 $
- Author:
- Richard Kirkby (rkirkby@cs.waikato.ac.nz)
-
-
Constructor Summary
Constructors Constructor Description NullMonitor()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description String
getCurrentActivityDescription()
Gets the description of the current activity.double
getCurrentActivityFractionComplete()
Gets the percentage done of the current activityObject
getLatestResultPreview()
Gets the current result to previewboolean
isCancelled()
Gets whether the task monitored is cancelled.boolean
isPaused()
Gets whether the task monitored is paused.void
requestCancel()
Requests the task monitored to cancel.void
requestPause()
Requests the task monitored to pause.void
requestResultPreview()
Requests to preview the task result.void
requestResultPreview(ResultPreviewListener toInform)
Requests to preview the task result.void
requestResume()
Requests the task monitored to resume.boolean
resultPreviewRequested()
Gets whether there is a request for preview the task result.void
setCurrentActivity(String activityDescription, double fracComplete)
Sets the description and the percentage done of the current activity.void
setCurrentActivityDescription(String activity)
Sets the description of the current activity.void
setCurrentActivityFractionComplete(double fracComplete)
Sets the percentage done of the current activityvoid
setLatestResultPreview(Object latestPreview)
Sets the current result to previewboolean
taskShouldAbort()
Gets whether the task should abort.
-
-
-
Method Detail
-
setCurrentActivity
public void setCurrentActivity(String activityDescription, double fracComplete)
Description copied from interface:TaskMonitor
Sets the description and the percentage done of the current activity.- Specified by:
setCurrentActivity
in interfaceTaskMonitor
- Parameters:
activityDescription
- the description of the current activityfracComplete
- the percentage done of the current activity
-
setCurrentActivityDescription
public void setCurrentActivityDescription(String activity)
Description copied from interface:TaskMonitor
Sets the description of the current activity.- Specified by:
setCurrentActivityDescription
in interfaceTaskMonitor
- Parameters:
activity
- the description of the current activity
-
setCurrentActivityFractionComplete
public void setCurrentActivityFractionComplete(double fracComplete)
Description copied from interface:TaskMonitor
Sets the percentage done of the current activity- Specified by:
setCurrentActivityFractionComplete
in interfaceTaskMonitor
- Parameters:
fracComplete
- the percentage done of the current activity
-
taskShouldAbort
public boolean taskShouldAbort()
Description copied from interface:TaskMonitor
Gets whether the task should abort.- Specified by:
taskShouldAbort
in interfaceTaskMonitor
- Returns:
- true if the task should abort
-
getCurrentActivityDescription
public String getCurrentActivityDescription()
Description copied from interface:TaskMonitor
Gets the description of the current activity.- Specified by:
getCurrentActivityDescription
in interfaceTaskMonitor
- Returns:
- the description of the current activity
-
getCurrentActivityFractionComplete
public double getCurrentActivityFractionComplete()
Description copied from interface:TaskMonitor
Gets the percentage done of the current activity- Specified by:
getCurrentActivityFractionComplete
in interfaceTaskMonitor
- Returns:
- the percentage done of the current activity
-
isPaused
public boolean isPaused()
Description copied from interface:TaskMonitor
Gets whether the task monitored is paused.- Specified by:
isPaused
in interfaceTaskMonitor
- Returns:
- true if the task is paused
-
isCancelled
public boolean isCancelled()
Description copied from interface:TaskMonitor
Gets whether the task monitored is cancelled.- Specified by:
isCancelled
in interfaceTaskMonitor
- Returns:
- true if the task is cancelled
-
requestCancel
public void requestCancel()
Description copied from interface:TaskMonitor
Requests the task monitored to cancel.- Specified by:
requestCancel
in interfaceTaskMonitor
-
requestPause
public void requestPause()
Description copied from interface:TaskMonitor
Requests the task monitored to pause.- Specified by:
requestPause
in interfaceTaskMonitor
-
requestResume
public void requestResume()
Description copied from interface:TaskMonitor
Requests the task monitored to resume.- Specified by:
requestResume
in interfaceTaskMonitor
-
getLatestResultPreview
public Object getLatestResultPreview()
Description copied from interface:TaskMonitor
Gets the current result to preview- Specified by:
getLatestResultPreview
in interfaceTaskMonitor
- Returns:
- the result to preview
-
requestResultPreview
public void requestResultPreview()
Description copied from interface:TaskMonitor
Requests to preview the task result.- Specified by:
requestResultPreview
in interfaceTaskMonitor
-
resultPreviewRequested
public boolean resultPreviewRequested()
Description copied from interface:TaskMonitor
Gets whether there is a request for preview the task result.- Specified by:
resultPreviewRequested
in interfaceTaskMonitor
- Returns:
- true if there is a request for preview the task result
-
setLatestResultPreview
public void setLatestResultPreview(Object latestPreview)
Description copied from interface:TaskMonitor
Sets the current result to preview- Specified by:
setLatestResultPreview
in interfaceTaskMonitor
- Parameters:
latestPreview
- the result to preview
-
requestResultPreview
public void requestResultPreview(ResultPreviewListener toInform)
Description copied from interface:TaskMonitor
Requests to preview the task result.- Specified by:
requestResultPreview
in interfaceTaskMonitor
- Parameters:
toInform
- the listener of the changes in the preview of the result
-
-