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:

 ProgressBar p1 = new ProgressBar();
Image of the indeterminate progress ProgressBar control

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

 ProgressBar p2 = new ProgressBar();
Image of the ProgressBar control
JavaFX 2.0
  • Constructor Details

    • 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 Details

    • 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