Package ghidra.util.task
Class UnknownProgressWrappingTaskMonitor
- java.lang.Object
-
- ghidra.util.task.TaskMonitorAdapter
-
- ghidra.util.task.UnknownProgressWrappingTaskMonitor
-
- All Implemented Interfaces:
TaskMonitor
public class UnknownProgressWrappingTaskMonitor extends TaskMonitorAdapter
A class that is meant to wrap aTaskMonitor
when you do not know the maximum value of the progress.
-
-
Field Summary
-
Fields inherited from class ghidra.util.task.TaskMonitorAdapter
DUMMY_MONITOR
-
Fields inherited from interface ghidra.util.task.TaskMonitor
DUMMY, NO_PROGRESS_VALUE
-
-
Constructor Summary
Constructors Constructor Description UnknownProgressWrappingTaskMonitor(TaskMonitor delegate, long startMaximum)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
checkCanceled()
Check to see if this monitor has been canceled.void
incrementProgress(long incrementAmount)
A convenience method to increment the current progress by the given value.boolean
isCancelled()
Returns true if the user has cancelled the operation.void
setMessage(java.lang.String message)
Sets a message giving additional information about the current progress.void
setProgress(long value)
Sets the current progress value.-
Methods inherited from class ghidra.util.task.TaskMonitorAdapter
addCancelledListener, addIssueListener, cancel, clearCanceled, getMaximum, getMinimum, getProgress, initialize, isCancelEnabled, notifyChangeListeners, removeCancelledListener, removeIssueListener, reportIssue, setCancelEnabled, setIndeterminate, setMaximum, setMinimum, setShowProgressValue
-
-
-
-
Constructor Detail
-
UnknownProgressWrappingTaskMonitor
public UnknownProgressWrappingTaskMonitor(TaskMonitor delegate, long startMaximum)
-
-
Method Detail
-
setMessage
public void setMessage(java.lang.String message)
Description copied from interface:TaskMonitor
Sets a message giving additional information about the current progress.- Specified by:
setMessage
in interfaceTaskMonitor
- Overrides:
setMessage
in classTaskMonitorAdapter
- Parameters:
message
- more information
-
setProgress
public void setProgress(long value)
Description copied from interface:TaskMonitor
Sets the current progress value.- Specified by:
setProgress
in interfaceTaskMonitor
- Overrides:
setProgress
in classTaskMonitorAdapter
- Parameters:
value
- progress value
-
incrementProgress
public void incrementProgress(long incrementAmount)
Description copied from interface:TaskMonitor
A convenience method to increment the current progress by the given value.- Specified by:
incrementProgress
in interfaceTaskMonitor
- Overrides:
incrementProgress
in classTaskMonitorAdapter
- Parameters:
incrementAmount
- The amount by which to increment the progress.
-
isCancelled
public boolean isCancelled()
Description copied from interface:TaskMonitor
Returns true if the user has cancelled the operation.- Specified by:
isCancelled
in interfaceTaskMonitor
- Overrides:
isCancelled
in classTaskMonitorAdapter
-
checkCanceled
public void checkCanceled() throws CancelledException
Description copied from interface:TaskMonitor
Check to see if this monitor has been canceled.- Specified by:
checkCanceled
in interfaceTaskMonitor
- Overrides:
checkCanceled
in classTaskMonitorAdapter
- Throws:
CancelledException
- if monitor has been cancelled.
-
-