Class ProgressIndicator

All Implemented Interfaces:
LayoutMeasurable, LayoutMeasurableMixin, HasBackgroundProperty, HasBlendModeProperty, HasBorderProperty, HasClipProperty, HasEffectProperty, HasHeightProperty, HasLayoutXProperty, HasLayoutYProperty, HasManagedProperty, HasMaxHeightProperty, HasMaxWidthProperty, HasMinHeightProperty, HasMinWidthProperty, HasMouseTransparentProperty, HasOnMouseClickedProperty, HasOpacityProperty, HasPaddingProperty, HasParentProperty, HasPrefHeightProperty, HasPrefWidthProperty, HasSnapToPixelProperty, HasVisibleProperty, HasWidthProperty, Styleable, EventTarget, Skinnable, INode, PreferenceResizableNode
Direct Known Subclasses:
ProgressBar

public class ProgressIndicator extends Control
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
  • Property Details

    • indeterminate

      public final ReadOnlyBooleanProperty indeterminateProperty
      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.
      See Also:
    • progress

      public final DoubleProperty progressProperty
      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%.
      See Also:
  • Field Details

  • Constructor Details

    • ProgressIndicator

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

      public ProgressIndicator(double progress)
      Creates a new ProgressIndicator with the given progress value.
      Parameters:
      progress - the progress, represented as a value between 0 and 1
  • Method Details

    • isIndeterminate

      public final boolean isIndeterminate()
      Gets the value of the indeterminate property.
      Property description:
      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.
      Returns:
      the value of the indeterminate property
      See Also:
    • indeterminateProperty

      public final ReadOnlyBooleanProperty indeterminateProperty()
      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.
      Returns:
      the indeterminate property
      See Also:
    • setProgress

      public final void setProgress(double value)
      Sets the value of the progress property.
      Property description:
      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%.
      Parameters:
      value - the value for the progress property
      See Also:
    • getProgress

      public final double getProgress()
      Gets the value of the progress property.
      Property description:
      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%.
      Returns:
      the value of the progress property
      See Also:
    • progressProperty

      public final DoubleProperty progressProperty()
      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%.
      Returns:
      the progress property
      See Also:
    • 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(...).
      Overrides:
      createDefaultSkin in class Control
      Returns:
      new instance of default skin for this control. If null then the control will have no skin unless one is provided by css.