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 aTaskMonitorwhen 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 voidcheckCanceled()Check to see if this monitor has been canceledvoidincrementProgress(long incrementAmount)A convenience method to increment the current progress by the given valuebooleanisCancelled()Returns true if the user has cancelled the operationvoidsetMessage(java.lang.String message)Sets the message displayed on the task monitorvoidsetProgress(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:TaskMonitorSets the message displayed on the task monitor- Specified by:
setMessagein interfaceTaskMonitor- Overrides:
setMessagein classTaskMonitorAdapter- Parameters:
message- the message to display
-
setProgress
public void setProgress(long value)
Description copied from interface:TaskMonitorSets the current progress value- Specified by:
setProgressin interfaceTaskMonitor- Overrides:
setProgressin classTaskMonitorAdapter- Parameters:
value- progress value
-
incrementProgress
public void incrementProgress(long incrementAmount)
Description copied from interface:TaskMonitorA convenience method to increment the current progress by the given value- Specified by:
incrementProgressin interfaceTaskMonitor- Overrides:
incrementProgressin classTaskMonitorAdapter- Parameters:
incrementAmount- The amount by which to increment the progress
-
isCancelled
public boolean isCancelled()
Description copied from interface:TaskMonitorReturns true if the user has cancelled the operation- Specified by:
isCancelledin interfaceTaskMonitor- Overrides:
isCancelledin classTaskMonitorAdapter- Returns:
- true if the user has cancelled the operation
-
checkCanceled
public void checkCanceled() throws CancelledExceptionDescription copied from interface:TaskMonitorCheck to see if this monitor has been canceled- Specified by:
checkCanceledin interfaceTaskMonitor- Overrides:
checkCanceledin classTaskMonitorAdapter- Throws:
CancelledException- if monitor has been cancelled
-
-