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

      • createDefaultSkin

        protected Skin<?> createDefaultSkin()
        Create a new instance of the default skin for this control. This is called to create a skin for the control if no skin is provided via CSS -fx-skin or set explicitly in a sub-class with setSkin(...).
        createDefaultSkin in class ProgressIndicator
        new instance of default skin for this control. If null then the control will have no skin unless one is provided by css.
      • 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
      • queryAccessibleAttribute

        public Object queryAccessibleAttribute​(AccessibleAttribute attribute,
                                               Object... parameters)
        This method is called by the assistive technology to request the value for an attribute.

        This method is commonly overridden by subclasses to implement attributes that are required for a specific role.
        If a particular attribute is not handled, the superclass implementation must be called.

        queryAccessibleAttribute in class ProgressIndicator
        attribute - the requested attribute
        parameters - optional list of parameters
        the value for the requested attribute
        See Also: