Top Description Fields Constructors Methods
javafx.scene.control

public Class ProgressIndicator

extends Control
Class Inheritance
Known Direct Subclasses
javafx.scene.control.ProgressBar
Imports
javafx.css.PseudoClass, .StyleableProperty, javafx.scene.control.skin.ProgressIndicatorSkin, javafx.beans.property.DoubleProperty, .DoublePropertyBase, .ReadOnlyBooleanProperty, .ReadOnlyBooleanWrapper, javafx.scene.AccessibleAttribute, .AccessibleRole

A circular control which is used for indicating progress, either infinite (aka indeterminate) or finite. Often used with the Task API for representing progress of background Tasks.

ProgressIndicator sets focusTraversable to false.

This first example creates a ProgressIndicator with an indeterminate value:

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

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

 ProgressIndicator p2 = new ProgressIndicator();
p2.setProgress(0.25F);
Image of the ProgressIndicator control
Since
JavaFX 2.0

Field Summary

Modifier and TypeField and Description
private static final String
DEFAULT_STYLE_CLASS

Initialize the style class to 'progress-indicator'.

private ReadOnlyBooleanWrapper
indeterminate

A flag indicating whether it is possible to determine the progress of the ProgressIndicator.

public static final double
INDETERMINATE_PROGRESS

Value for progress indicating that the progress is indeterminate.

private DoubleProperty
progress

The actual progress of the ProgressIndicator.

private static final PseudoClass
PSEUDO_CLASS_DETERMINATE

Pseudoclass indicating this is a determinate (i.e., progress can be determined) progress indicator.

private static final PseudoClass
PSEUDO_CLASS_INDETERMINATE

Pseudoclass indicating this is an indeterminate (i.e., progress cannot be determined) progress indicator.

Constructor Summary

AccessConstructor and Description
public
ProgressIndicator()

Creates a new indeterminate ProgressIndicator.

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

Creates a new ProgressIndicator with the given progress value.

Method Summary

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

Overrides javafx.scene.control.Control.createDefaultSkin.

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

protected Boolean
getInitialFocusTraversable()

Overrides javafx.scene.control.Control.getInitialFocusTraversable.

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

public final double
public final ReadOnlyBooleanProperty
private ReadOnlyBooleanWrapper
public final boolean
public final DoubleProperty
public Object
queryAccessibleAttribute(AccessibleAttribute attribute, Object... parameters)

Overrides javafx.scene.control.Control.queryAccessibleAttribute.

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

private void
setIndeterminate(boolean value)

public final void
setProgress(double value)

Inherited from javafx.scene.control.Control:
computeMaxHeightcomputeMaxWidthcomputeMinHeightcomputeMinWidthcomputePrefHeightcomputePrefWidthcontextMenuPropertyexecuteAccessibleActiongetBaselineOffsetgetClassCssMetaDatagetContextMenugetControlChildrengetControlCssMetaDatagetCssMetaDatagetSkingetTooltipisResizablelayoutChildrenloadSkinClasssetContextMenusetSkinsetTooltipskinClassNamePropertyskinPropertytooltipProperty

Field Detail

DEFAULT_STYLE_CLASSback to summary
private static final String DEFAULT_STYLE_CLASS

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

indeterminateback to summary
private ReadOnlyBooleanWrapper indeterminate

A flag indicating whether it is possible to determine the progress of the ProgressIndicator. Typically indeterminate progress bars are rendered with some form of animation indicating potentially "infinite" progress.

INDETERMINATE_PROGRESSback to summary
public static final double INDETERMINATE_PROGRESS

Value for progress indicating that the progress is indeterminate.

See Also
setProgress
progressback to summary
private DoubleProperty progress

The actual progress of the ProgressIndicator. A negative value for progress indicates that the progress is indeterminate. A positive value between 0 and 1 indicates the percentage of progress where 0 is 0% and 1 is 100%. Any value greater than 1 is interpreted as 100%.

PSEUDO_CLASS_DETERMINATEback to summary
private static final PseudoClass PSEUDO_CLASS_DETERMINATE

Pseudoclass indicating this is a determinate (i.e., progress can be determined) progress indicator.

PSEUDO_CLASS_INDETERMINATEback to summary
private static final PseudoClass PSEUDO_CLASS_INDETERMINATE

Pseudoclass indicating this is an indeterminate (i.e., progress cannot be determined) progress indicator.

Constructor Detail

ProgressIndicatorback to summary
public ProgressIndicator()

Creates a new indeterminate ProgressIndicator.

ProgressIndicatorback to summary
public ProgressIndicator(double progress)

Creates a new ProgressIndicator 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.Control.createDefaultSkin.

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

Annotations
@Override
getInitialFocusTraversableback to summary
protected Boolean getInitialFocusTraversable()

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

Annotations
@Override
Since
9
getProgressback to summary
public final double getProgress()
indeterminatePropertyback to summary
public final ReadOnlyBooleanProperty indeterminateProperty()
indeterminatePropertyImplback to summary
private ReadOnlyBooleanWrapper indeterminatePropertyImpl()
isIndeterminateback to summary
public final boolean isIndeterminate()
progressPropertyback to summary
public final DoubleProperty progressProperty()
queryAccessibleAttributeback to summary
public Object queryAccessibleAttribute(AccessibleAttribute attribute, Object... parameters)

Overrides javafx.scene.control.Control.queryAccessibleAttribute.

Doc from javafx.scene.control.Control.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.

Annotations
@Override
setIndeterminateback to summary
private void setIndeterminate(boolean value)
setProgressback to summary
public final void setProgress(double value)