- java.lang.Object
-
- java.util.EventObject
-
- org.arakhne.afc.progress.ProgressionEvent
-
- All Implemented Interfaces:
Serializable
public class ProgressionEvent extends EventObject
Task progression event.- Version:
- 17.0 2020-01-04 14:41:38
- Author:
- Stéphane GALLAND
- See Also:
- Serialized Form
- Maven Group Id:
- org.arakhne.afc.core
- Maven Artifact Id:
- util
-
-
Field Summary
-
Fields inherited from class java.util.EventObject
source
-
-
Constructor Summary
Constructors Constructor Description ProgressionEvent(Progression source, boolean isRoot)
Constructor.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description String
getComment()
Returns the model's current comment.int
getMaximum()
Returns the model's maximum.int
getMinimum()
Returns the minimum acceptable value.double
getPercent()
Returns the model's current value in percent of pregression.Progression
getProgression()
Replies the task progression which generate this event.double
getProgressionFactor()
Returns the model's current value in percent of pregression.int
getValue()
Returns the model's current value.boolean
isFinished()
Replies if the associated task was marked as finished, ie the current value is greater or equal to the maximum value AND the associated task progression object is a root task.boolean
isIndeterminate()
Returns the value of theindeterminate
property.boolean
isRoot()
Replies if this event was fired by an task progression source which is a root source.-
Methods inherited from class java.util.EventObject
getSource, toString
-
-
-
-
Constructor Detail
-
ProgressionEvent
ProgressionEvent(Progression source, boolean isRoot)
Constructor.- Parameters:
source
- is the model that was thrown the event.isRoot
- indicates if this event was fired by a root task progression source.
-
-
Method Detail
-
isRoot
public boolean isRoot()
Replies if this event was fired by an task progression source which is a root source.- Returns:
true
if the task progression is a root, otherwisefalse
.
-
isFinished
public boolean isFinished()
Replies if the associated task was marked as finished, ie the current value is greater or equal to the maximum value AND the associated task progression object is a root task.- Returns:
true
if the task was finished, otherwisefalse
.
-
getProgression
public Progression getProgression()
Replies the task progression which generate this event.- Returns:
- the model.
-
getMinimum
public int getMinimum()
Returns the minimum acceptable value.- Returns:
- the minimal value.
-
getMaximum
public int getMaximum()
Returns the model's maximum.- Returns:
- the maximal value.
-
getValue
public int getValue()
Returns the model's current value. Note that the upper limit on the model's value ismaximum
and the lower limit isminimum
.- Returns:
- the current value.
-
getPercent
public double getPercent()
Returns the model's current value in percent of pregression.- Returns:
- the model's value between 0 and 100
- See Also:
getValue()
,getProgressionFactor()
-
getProgressionFactor
public double getProgressionFactor()
Returns the model's current value in percent of pregression.- Returns:
- the model's value between 0 and 1
- See Also:
getValue()
,getPercent()
-
getComment
public String getComment()
Returns the model's current comment.- Returns:
- the current comment or
null
.
-
isIndeterminate
public boolean isIndeterminate()
Returns the value of theindeterminate
property.- Returns:
- the value of the
indeterminate
property
-
-