Package jltk.gui

Class ProgressBar


  • public class ProgressBar
    extends Control
    A linear control which is used for indicating progress. Often used to indicate the progress of a task.
    Version:
    24.05.2022
    Author:
    ms
    • Field Detail

      • fxProgressBar

        protected javafx.scene.control.ProgressBar fxProgressBar
    • Constructor Detail

      • ProgressBar

        public ProgressBar​(double pLeft,
                           double pTop,
                           double pWidth,
                           double pHeight)
        Creates the progress bar on the specified postion. The minimal value is 0 and the maximal value is 1.
        Parameters:
        pLeft - The horizontal coordinate
        pTop - The vertical coordinate
        pWidth - The width of the progress bar
        pHeight - The height of the progress bar
      • ProgressBar

        public ProgressBar​(double pLeft,
                           double pTop,
                           double pWidth,
                           double pHeight,
                           double pMin,
                           double pMax)
        Creates the progress bar on the specified postion.
        Parameters:
        pLeft - The horizontal coordinate
        pTop - The vertical coordinate
        pWidth - The width of the progress bar
        pHeight - The height of the progress bar
        pMin - The minimal value of the progress bar
        pMax - The maximal value of the progress bar
      • ProgressBar

        public ProgressBar​(Window pWindow,
                           double pLeft,
                           double pTop,
                           double pWidth,
                           double pHeight,
                           double pMin,
                           double pMax)
        Creates the progress bar at the specified position
        Parameters:
        pLeft - The horizontal coordinate
        pTop - The vertical coordinate
        pWidth - The width of the progress bar
        pHeight - The height of the progress bar
        pWindow - The window, the progress bar should be placed
        pMin - The minimal value of the progress bar
        pMax - The maximal value of the progress bar
    • Method Detail

      • increment

        public void increment​(double pValue)
        Attempts to increment the progress bar by the given value
      • decrement

        public void decrement​(double pValue)
        Attempts to decrement the progress bar by the given value.
      • getValue

        public double getValue()
        Returns the current value of the progress bar
        Returns:
        the current value of the progress bar
      • setValue

        public void setValue​(double pValue)
        Sets the value of the progress bar to the specified value. The value mus between the minimal and maximal value of the progress bar. A value smaller than the minmal value is interpreted as minimal value. A value greater than the maximum value is interpreted as maximum value.
        Parameters:
        pValue - New value of the progress bar.
      • setMinValue

        public void setMinValue​(double pMin)
        Sets the minimum value represented by this progress bar
        Parameters:
        pMin - ProgressBar minium value
      • setMaxValue

        public void setMaxValue​(double pMax)
        Sets the maximal value represented by this progress bar
        Parameters:
        pMax - ProgressBar maximum value
      • getMinValue

        public double getMinValue()
        Gets the minimum value represented by this progress bar
        Returns:
        ProgressBar minimum value
      • getMaxValue

        public double getMaxValue()
        Gets the maximal value represented by this progress bar
        Returns:
        ProgressBar maximal value