Class CompoundProgressRangeModel
- java.lang.Object
- 
- javax.swing.DefaultBoundedRangeModel
- 
- com.inductiveautomation.ignition.client.util.gui.CompoundProgressRangeModel
 
 
- 
- All Implemented Interfaces:
- java.io.Serializable,- javax.swing.BoundedRangeModel
 
 public class CompoundProgressRangeModel extends javax.swing.DefaultBoundedRangeModelProvides the ability to create ProgressListeners that get coalesced into a single BoundedRangeModel. Each progress listener contributes proportionally to the overall progress, with indefinite listeners not contributing.This class goes beyond the basic BoundedRangeModel adding in support for the current "note" provided by the progress listener. When a progress listener gets its first value update, it updates the current note and fires a change event. This model also makes sure to call events in the EDT, so it is not necessary to worry about which thread is updating values. - See Also:
- Serialized Form
 
- 
- 
Nested Class SummaryNested Classes Modifier and Type Class Description protected classCompoundProgressRangeModel.InternalProgressListenerprotected classCompoundProgressRangeModel.ValueUpdater
 - 
Field SummaryFields Modifier and Type Field Description protected java.lang.StringcurrentNoteprotected intcurrentValueprotected booleanopCanceledprotected java.util.List<CompoundProgressRangeModel.InternalProgressListener>progressesprotected intresolution
 - 
Constructor SummaryConstructors Constructor Description CompoundProgressRangeModel()
 - 
Method SummaryAll Methods Instance Methods Concrete Methods Modifier and Type Method Description voidcancelOperations()Sets the canceled flag that will propagate to the running TaskProgressListeners.TaskProgressListenercreateNewTaskListener()Creates a new progress listener that will contribute to the overall progress.protected intgetCurrentValue()intgetMaxValue()protected voidrefreshProgress()voidreset()Resets the compound model, clearing out any internal progress listeners contributing to the value.protected voidupdateCurrentNote(java.lang.String value)- 
Methods inherited from class javax.swing.DefaultBoundedRangeModeladdChangeListener, fireStateChanged, getChangeListeners, getExtent, getListeners, getMaximum, getMinimum, getValue, getValueIsAdjusting, removeChangeListener, setExtent, setMaximum, setMinimum, setRangeProperties, setValue, setValueIsAdjusting, toString
 
- 
 
- 
- 
- 
Field Detail- 
resolutionprotected int resolution 
 - 
progressesprotected java.util.List<CompoundProgressRangeModel.InternalProgressListener> progresses 
 - 
currentNoteprotected java.lang.String currentNote 
 - 
currentValueprotected int currentValue 
 - 
opCanceledprotected boolean opCanceled 
 
- 
 - 
Method Detail- 
getMaxValuepublic int getMaxValue() 
 - 
createNewTaskListenerpublic TaskProgressListener createNewTaskListener() Creates a new progress listener that will contribute to the overall progress.It is basically a normal ProgressListener, except that its note will only be (potentially) display when the first non-0 value is set on setProgress. If it is an indeterminate progress listener, the owner can call setProgress(-1) to indicate that it has started. 
 - 
resetpublic void reset() Resets the compound model, clearing out any internal progress listeners contributing to the value.
 - 
refreshProgressprotected void refreshProgress() 
 - 
getCurrentValueprotected int getCurrentValue() 
 - 
updateCurrentNoteprotected void updateCurrentNote(java.lang.String value) 
 - 
cancelOperationspublic void cancelOperations() Sets the canceled flag that will propagate to the running TaskProgressListeners.
 
- 
 
-