Class 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
    • 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 model
        minPValue - 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 model
        minPValue - 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.
      • isRootModel

        public boolean isRootModel()
        Description copied from interface: Progression
        Replies if is task model is a root model.

        isRootMode() == (getTaskDepth()==0)

        Specified by:
        isRootModel in interface Progression
        Overrides:
        isRootModel in class DefaultProgression
        Returns:
        true if this model is a root model, otherwise false
      • getTaskDepth

        public int getTaskDepth()
        Description copied from interface: Progression
        Replies the depth level of this task. The root task (ie. a task without parent task) has always a depth of 0. A subtask of the root task has a depth of 1. A subtask of this subtask has a depth of 2, etc.

        isRootMode() == (getTaskDepth()==0)

        Specified by:
        getTaskDepth in interface Progression
        Overrides:
        getTaskDepth in class DefaultProgression
        Returns:
        the depth of the task.