Class TaskProgressUpdater
- java.lang.Object
-
- com.inductiveautomation.ignition.common.gui.progress.TaskProgressUpdater
-
- All Implemented Interfaces:
ProgressListener,TaskProgressListener
public class TaskProgressUpdater extends java.lang.Object implements TaskProgressListener
This is a helper wrapper class that simply adds an increment() function around the ProgressListener, and tracks the current progress internally. It actually implements TaskProgressListener, and will return isCanceled if the internal listener is also of that type, otherwise it will just return false.
-
-
Constructor Summary
Constructors Constructor Description TaskProgressUpdater(ProgressListener listener)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidincrement()booleanisCanceled()Indicates to the running task that it has been canceled and should stop as soon as possible.voidsetIndeterminate(boolean bool)Allows the object performing the action to indicate that it won't be able to report back progress information.voidsetNote(java.lang.String note)Sets some sort of note or information about the current position.voidsetProgress(int val)Used to update the current progress value, should be between 0 and the value sent to setProgressMax.voidsetProgressMax(int max)Used to indicate the upper bound of value that will be passed to setProgress.
-
-
-
Constructor Detail
-
TaskProgressUpdater
public TaskProgressUpdater(ProgressListener listener)
-
-
Method Detail
-
increment
public void increment()
-
isCanceled
public boolean isCanceled()
Description copied from interface:TaskProgressListenerIndicates to the running task that it has been canceled and should stop as soon as possible.- Specified by:
isCanceledin interfaceTaskProgressListener
-
setProgressMax
public void setProgressMax(int max)
Description copied from interface:ProgressListenerUsed to indicate the upper bound of value that will be passed to setProgress.- Specified by:
setProgressMaxin interfaceProgressListener
-
setProgress
public void setProgress(int val)
Description copied from interface:ProgressListenerUsed to update the current progress value, should be between 0 and the value sent to setProgressMax.- Specified by:
setProgressin interfaceProgressListener
-
setNote
public void setNote(java.lang.String note)
Description copied from interface:ProgressListenerSets some sort of note or information about the current position.- Specified by:
setNotein interfaceProgressListener
-
setIndeterminate
public void setIndeterminate(boolean bool)
Description copied from interface:ProgressListenerAllows the object performing the action to indicate that it won't be able to report back progress information.- Specified by:
setIndeterminatein interfaceProgressListener
-
-