- java.lang.Object
-
- org.arakhne.afc.progress.DefaultProgression
-
- org.arakhne.afc.progress.SubProgressionModel
-
- All Implemented Interfaces:
Progression
class SubProgressionModel extends DefaultProgression
An object that permits to indicates the progression of a task.- Version:
- 17.0 2020-01-04 14:41:38
- Author:
- Stéphane GALLAND
- Maven Group Id:
- org.arakhne.afc.core
- Maven Artifact Id:
- util
-
-
Field Summary
-
Fields inherited from class org.arakhne.afc.progress.DefaultProgression
listeners
-
-
Constructor Summary
Constructors Constructor Description SubProgressionModel(DefaultProgression parent, double minPValue, double maxPValue, boolean isIndeterminate, boolean adjusting, boolean overwriteComment)Create a progress model with the specified determinate state.SubProgressionModel(DefaultProgression parent, double minPValue, double maxPValue, int minValue, int maxValue, boolean isIndeterminate, boolean adjusting, boolean overwriteComment)Create a progress model with the specified determinate state.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description (package private) voiddisconnect()Set the parent value and disconnect this subtask from its parent.voidend()Force this progression task to end its indicator.protected voidfireValueChange()Notify listeners about value change.doublegetMaxInParent()Returns the maximal value of this task progression in its parent.doublegetMinInParent()Returns the minimal value of this task progression in its parent.protected DefaultProgressiongetParent()Returns the parent task.ProgressiongetSuperTask()Replies the super task of this task model.intgetTaskDepth()Replies the depth level of this task.booleanisRootModel()Replies if is task model is a root model.-
Methods inherited from class org.arakhne.afc.progress.DefaultProgression
addProgressionListener, disconnectSubTask, ensureNoSubTask, fireStateChange, getComment, getFloatValue, getMaximum, getMinimum, getPercent, getProgressionFactor, getSubTask, getValue, increment, increment, increment, increment, isAdjusting, isIndeterminate, removeProgressionListener, setAdjusting, setComment, setIndeterminate, setMaximum, setMinimum, setProperties, setProperties, setValue, setValue, setValue, subTask, subTask, subTask, subTask
-
-
-
-
Constructor Detail
-
SubProgressionModel
SubProgressionModel(DefaultProgression parent, double minPValue, double maxPValue, int minValue, int maxValue, boolean isIndeterminate, boolean adjusting, boolean overwriteComment)
Create a progress model with the specified determinate state.- Parameters:
parent- is the parent modelminPValue- is the value at which this sub-model is starting in its parent.maxPValue- is the value at which this sub-model is ending in its parent.minValue- is the minimum value of this progression model.maxValue- is the maximum value of this progression model.isIndeterminate- indicates if this model is under progression.adjusting- indicates if this model is adjusting its value.overwriteComment- indicates if the comment of this subtask may overwrite the comment of its parent when it is disconnected.
-
SubProgressionModel
SubProgressionModel(DefaultProgression parent, double minPValue, double maxPValue, boolean isIndeterminate, boolean adjusting, boolean overwriteComment)
Create a progress model with the specified determinate state.- Parameters:
parent- is the parent modelminPValue- is the value at which this sub-model is starting in its parent.maxPValue- is the value at which this sub-model is ending in its parent.isIndeterminate- indicates if this model is under progression.adjusting- indicates if this model is adjusting its value.overwriteComment- indicates if the comment of this subtask may overwrite the comment of its parent when it is disconnected.
-
-
Method Detail
-
disconnect
void disconnect()
Set the parent value and disconnect this subtask from its parent.
-
getMinInParent
public double getMinInParent()
Returns the minimal value of this task progression in its parent.- Returns:
- the value at which this model is supposed to start in its parent.
-
getMaxInParent
public double getMaxInParent()
Returns the maximal value of this task progression in its parent.- Returns:
- the value at which this model is supposed to end in its parent.
-
getParent
protected DefaultProgression getParent()
Returns the parent task.- Returns:
- the parent task.
-
end
public void end()
Description copied from interface:ProgressionForce this progression task to end its indicator.- Specified by:
endin interfaceProgression- Overrides:
endin classDefaultProgression
-
fireValueChange
protected void fireValueChange()
Description copied from class:DefaultProgressionNotify listeners about value change.- Overrides:
fireValueChangein classDefaultProgression
-
isRootModel
public boolean isRootModel()
Description copied from interface:ProgressionReplies if is task model is a root model.isRootMode() == (getTaskDepth()==0)- Specified by:
isRootModelin interfaceProgression- Overrides:
isRootModelin classDefaultProgression- Returns:
trueif this model is a root model, otherwisefalse
-
getSuperTask
public Progression getSuperTask()
Description copied from interface:ProgressionReplies the super task of this task model.- Specified by:
getSuperTaskin interfaceProgression- Overrides:
getSuperTaskin classDefaultProgression- Returns:
- the super task or
nullthis task was not a decomposition of a super task.
-
getTaskDepth
public int getTaskDepth()
Description copied from interface:ProgressionReplies the depth level of this task. The root task (ie. a task without parent task) has always a depth of0. A subtask of the root task has a depth of1. A subtask of this subtask has a depth of2, etc.isRootMode() == (getTaskDepth()==0)- Specified by:
getTaskDepthin interfaceProgression- Overrides:
getTaskDepthin classDefaultProgression- Returns:
- the depth of the task.
-
-