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 void
applyTo(TaskProgressListener listener)
Copies the values of this task progress listener to another.java.lang.String
getNote()
int
getProgress()
int
getProgressMax()
java.lang.Object
getResult()
java.lang.String
getTaskUID()
boolean
isFinished()
boolean
isIndeterminant()
void
setFinished(boolean finished)
void
setIndeterminate(boolean indeterminant)
Allows the object performing the action to indicate that it won't be able to report back progress information.void
setNote(java.lang.String note)
Sets some sort of note or information about the current position.void
setProgress(int value)
Used to update the current progress value, should be between 0 and the value sent to setProgressMax.void
setProgressMax(int max)
Used to indicate the upper bound of value that will be passed to setProgress.void
setResult(java.lang.Object result)
java.lang.String
toString()
-
-
-
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:ProgressListener
Allows the object performing the action to indicate that it won't be able to report back progress information.- Specified by:
setIndeterminate
in interfaceProgressListener
-
getProgressMax
public int getProgressMax()
-
setProgressMax
public void setProgressMax(int max)
Description copied from interface:ProgressListener
Used to indicate the upper bound of value that will be passed to setProgress.- Specified by:
setProgressMax
in interfaceProgressListener
-
getProgress
public int getProgress()
-
setProgress
public void setProgress(int value)
Description copied from interface:ProgressListener
Used to update the current progress value, should be between 0 and the value sent to setProgressMax.- Specified by:
setProgress
in interfaceProgressListener
-
getNote
public java.lang.String getNote()
-
setNote
public void setNote(java.lang.String note)
Description copied from interface:ProgressListener
Sets some sort of note or information about the current position.- Specified by:
setNote
in interfaceProgressListener
-
applyTo
public void applyTo(TaskProgressListener listener)
Copies the values of this task progress listener to another.
-
toString
public java.lang.String toString()
- Overrides:
toString
in classjava.lang.Object
-
-