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 canceledvoid
incrementProgress(long incrementAmount)
A convenience method to increment the current progress by the given valueboolean
isCancelled()
Returns true if the user has cancelled the operationvoid
setMessage(java.lang.String message)
Sets the message displayed on the task monitorvoid
setProgress(long value)
Sets the current progress value-
Methods inherited from class ghidra.util.task.TaskMonitorAdapter
addCancelledListener, cancel, clearCanceled, getMaximum, getMessage, getMinimum, getProgress, initialize, isCancelEnabled, isIndeterminate, notifyChangeListeners, removeCancelledListener, 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 the message displayed on the task monitor- Specified by:
setMessage
in interfaceTaskMonitor
- Overrides:
setMessage
in classTaskMonitorAdapter
- Parameters:
message
- the message to display
-
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
- Returns:
- true if the user has cancelled the operation
-
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
-
-