Class TaskProgressState
- java.lang.Object
-
- com.inductiveautomation.ignition.common.gui.progress.TaskProgressState
-
- All Implemented Interfaces:
ProgressListener,java.io.Serializable
public class TaskProgressState extends java.lang.Object implements java.io.Serializable, ProgressListener
Provides the current state of a progress operation.- See Also:
- Serialized Form
-
-
Constructor Summary
Constructors Constructor Description TaskProgressState(java.lang.String uid)TaskProgressState(java.lang.String taskId, boolean indeterminant, int max, int value, java.lang.String note)TaskProgressState(java.lang.String taskId, java.lang.Object result)Finished constructor - sets result, and sets finished to true.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidapplyTo(TaskProgressListener listener)Copies the values of this task progress listener to another.java.lang.StringgetNote()intgetProgress()intgetProgressMax()java.lang.ObjectgetResult()java.lang.StringgetTaskUID()booleanisFinished()booleanisIndeterminant()voidsetFinished(boolean finished)voidsetIndeterminate(boolean indeterminant)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 value)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.voidsetResult(java.lang.Object result)java.lang.StringtoString()
-
-
-
Constructor Detail
-
TaskProgressState
public TaskProgressState(java.lang.String uid)
-
TaskProgressState
public TaskProgressState(java.lang.String taskId, boolean indeterminant, int max, int value, java.lang.String note)
-
TaskProgressState
public TaskProgressState(java.lang.String taskId, java.lang.Object result)Finished constructor - sets result, and sets finished to true.
-
-
Method Detail
-
isFinished
public boolean isFinished()
-
setFinished
public void setFinished(boolean finished)
-
getResult
public java.lang.Object getResult()
-
setResult
public void setResult(java.lang.Object result)
-
getTaskUID
public java.lang.String getTaskUID()
-
isIndeterminant
public boolean isIndeterminant()
-
setIndeterminate
public void setIndeterminate(boolean indeterminant)
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
-
getProgressMax
public int getProgressMax()
-
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
-
getProgress
public int getProgress()
-
setProgress
public void setProgress(int value)
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
-
getNote
public java.lang.String getNote()
-
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
-
applyTo
public void applyTo(TaskProgressListener listener)
Copies the values of this task progress listener to another.
-
toString
public java.lang.String toString()
- Overrides:
toStringin classjava.lang.Object
-
-