Top Description Fields Constructors Methods
javafx.scene.control

public Class ProgressBar

extends ProgressIndicator
Class Inheritance
Imports
javafx.scene.control.skin.ProgressBarSkin, javafx.css.StyleableProperty, javafx.scene.AccessibleAttribute, javafx.geometry.Orientation

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();
p2.setProgress(0.25F);
Image of the ProgressBar control
Since
JavaFX 2.0

Field Summary

Modifier and TypeField and Description
private static final String
DEFAULT_STYLE_CLASS

Hides javafx.scene.control.ProgressIndicator.DEFAULT_STYLE_CLASS.

Initialize the style class to 'progress-bar'.
Inherited from javafx.scene.control.ProgressIndicator:
INDETERMINATE_PROGRESS

Constructor Summary

AccessConstructor and Description
public
ProgressBar()

Creates a new indeterminate ProgressBar.

public
ProgressBar(double
the progress, represented as a value between 0 and 1
progress
)

Creates a new ProgressBar with the given progress value.

Method Summary

Modifier and TypeMethod and Description
protected Skin<?>
createDefaultSkin()

Overrides javafx.scene.control.ProgressIndicator.createDefaultSkin.

Create a new instance of the default skin for this control.

protected Boolean
getInitialFocusTraversable()

Overrides javafx.scene.control.ProgressIndicator.getInitialFocusTraversable.

Returns the initial focus traversable state of this control, for use by the JavaFX CSS engine to correctly set its initial value.

public Object
queryAccessibleAttribute(AccessibleAttribute
the requested attribute
attribute
,
Object...
optional list of parameters
parameters
)

Overrides javafx.scene.control.ProgressIndicator.queryAccessibleAttribute.

This method is called by the assistive technology to request the value for an attribute.

Inherited from javafx.scene.control.ProgressIndicator:
getProgressindeterminatePropertyisIndeterminateprogressPropertysetProgress

Field Detail

DEFAULT_STYLE_CLASSback to summary
private static final String DEFAULT_STYLE_CLASS

Hides javafx.scene.control.ProgressIndicator.DEFAULT_STYLE_CLASS.

Initialize the style class to 'progress-bar'. This is the selector class from which CSS can be used to style this control.

Constructor Detail

ProgressBarback to summary
public ProgressBar()

Creates a new indeterminate ProgressBar.

ProgressBarback to summary
public ProgressBar(double progress)

Creates a new ProgressBar with the given progress value.

Parameters
progress:double

the progress, represented as a value between 0 and 1

Method Detail

createDefaultSkinback to summary
protected Skin<?> createDefaultSkin()

Overrides javafx.scene.control.ProgressIndicator.createDefaultSkin.

Doc from javafx.scene.control.ProgressIndicator.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(...).

Returns:Skin<?>

Doc from javafx.scene.control.Control.createDefaultSkin.

new instance of default skin for this control. If null then the control will have no skin unless one is provided by css.

Annotations
@Override
getInitialFocusTraversableback to summary
protected Boolean getInitialFocusTraversable()

Overrides javafx.scene.control.ProgressIndicator.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.

Returns:Boolean

Doc from javafx.scene.control.Control.getInitialFocusTraversable.

the initial focus traversable state of this control

Annotations
@Override
Since
9
queryAccessibleAttributeback to summary
public Object queryAccessibleAttribute(AccessibleAttribute attribute, Object... parameters)

Overrides javafx.scene.control.ProgressIndicator.queryAccessibleAttribute.

Doc from javafx.scene.control.ProgressIndicator.queryAccessibleAttribute.

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.

Parameters
attribute:AccessibleAttribute

Doc from javafx.scene.Node.queryAccessibleAttribute.

the requested attribute

parameters:Object[]

Doc from javafx.scene.Node.queryAccessibleAttribute.

optional list of parameters

Returns:Object

Doc from javafx.scene.Node.queryAccessibleAttribute.

the value for the requested attribute

Annotations
@Override