Class ProgressBar

  • All Implemented Interfaces:
    Styleable, EventTarget, Skinnable

    public class ProgressBar
    extends ProgressIndicator
    A specialization of the ProgressIndicator which is represented as a horizontal bar.

    ProgressBar sets focusTraversable to false.

    This first example creates a ProgressBar with an indeterminate value :

     import javafx.scene.control.ProgressBar;
     ProgressBar p1 = new ProgressBar();

    This next example creates a ProgressBar which is 25% complete :

     import javafx.scene.control.ProgressBar;
     ProgressBar p2 = new ProgressBar();
    Implementation of ProgressBar According to JavaFX UI Control API Specification
    JavaFX 2.0
    • Constructor Detail

      • ProgressBar

        public ProgressBar()
        Creates a new indeterminate ProgressBar.
      • ProgressBar

        public ProgressBar​(double progress)
        Creates a new ProgressBar with the given progress value.
        progress - the progress, represented as a value between 0 and 1
    • Method Detail

      • getInitialFocusTraversable

        protected Boolean getInitialFocusTraversable()
        Returns the initial focus traversable state of this control, for use by the JavaFX CSS engine to correctly set its initial value. This method is overridden as by default UI controls have focus traversable set to true, but that is not appropriate for this control.
        getInitialFocusTraversable in class ProgressIndicator
        the initial focus traversable state of this control