public class ProgressIndicator extends Control
ProgressIndicator sets focusTraversable to false.
This first example creates a ProgressIndicator with an indeterminate value :
import javafx.scene.control.ProgressIndicator;
ProgressIndicator p1 = new ProgressIndicator();
This next example creates a ProgressIndicator which is 25% complete :
import javafx.scene.control.ProgressIndicator;
ProgressIndicator p2 = new ProgressIndicator();
p2.setProgress(0.25F);
Implementation of ProgressIndicator According to JavaFX UI Control API SpecificationType | Property and Description |
---|---|
ReadOnlyBooleanProperty |
indeterminate
A flag indicating whether it is possible to determine the progress
of the ProgressIndicator.
|
DoubleProperty |
progress
The actual progress of the ProgressIndicator.
|
contextMenuProperty, skinClassNameProperty, skinProperty, tooltipProperty
Modifier and Type | Field and Description |
---|---|
private static java.lang.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.
|
static double |
INDETERMINATE_PROGRESS
Value for progress indicating that the progress is indeterminate.
|
private DoubleProperty |
progress
The actual progress of the ProgressIndicator.
|
private static PseudoClass |
PSEUDO_CLASS_DETERMINATE
Pseudoclass indicating this is a determinate (i.e., progress can be
determined) progress indicator.
|
private static PseudoClass |
PSEUDO_CLASS_INDETERMINATE
Pseudoclass indicating this is an indeterminate (i.e., progress cannot
be determined) progress indicator.
|
Constructor and Description |
---|
ProgressIndicator()
Creates a new indeterminate ProgressIndicator.
|
ProgressIndicator(double progress)
Creates a new ProgressIndicator with the given progress value.
|
Modifier and Type | Method and Description |
---|---|
protected Skin<?> |
createDefaultSkin()
Create a new instance of the default skin for this control.
|
protected java.lang.Boolean |
getInitialFocusTraversable()
Returns the initial focus traversable state of this control, for use
by the JavaFX CSS engine to correctly set its initial value.
|
double |
getProgress()
Gets the value of the property progress.
|
ReadOnlyBooleanProperty |
indeterminateProperty()
A flag indicating whether it is possible to determine the progress
of the ProgressIndicator.
|
private ReadOnlyBooleanWrapper |
indeterminatePropertyImpl() |
boolean |
isIndeterminate()
Gets the value of the property indeterminate.
|
DoubleProperty |
progressProperty()
The actual progress of the ProgressIndicator.
|
java.lang.Object |
queryAccessibleAttribute(AccessibleAttribute attribute,
java.lang.Object... parameters) |
private void |
setIndeterminate(boolean value) |
void |
setProgress(double value)
Sets the value of the property progress.
|
computeMaxHeight, computeMaxWidth, computeMinHeight, computeMinWidth, computePrefHeight, computePrefWidth, contextMenuProperty, executeAccessibleAction, getBaselineOffset, getClassCssMetaData, getContextMenu, getControlChildren, getControlCssMetaData, getCssMetaData, getSkin, getTooltip, isResizable, layoutChildren, loadSkinClass, setContextMenu, setSkin, setTooltip, skinClassNameProperty, skinProperty, tooltipProperty
public final ReadOnlyBooleanProperty indeterminateProperty
isIndeterminate()
public final DoubleProperty progressProperty
getProgress()
,
setProgress(double)
public static final double INDETERMINATE_PROGRESS
setProgress(double)
,
Constant Field Valuesprivate ReadOnlyBooleanWrapper indeterminate
private DoubleProperty progress
private static final java.lang.String DEFAULT_STYLE_CLASS
private static final PseudoClass PSEUDO_CLASS_DETERMINATE
private static final PseudoClass PSEUDO_CLASS_INDETERMINATE
public ProgressIndicator()
public ProgressIndicator(double progress)
progress
- the progress, represented as a value between 0 and 1private void setIndeterminate(boolean value)
public final boolean isIndeterminate()
public final ReadOnlyBooleanProperty indeterminateProperty()
isIndeterminate()
private ReadOnlyBooleanWrapper indeterminatePropertyImpl()
public final void setProgress(double value)
public final double getProgress()
public final DoubleProperty progressProperty()
getProgress()
,
setProgress(double)
protected Skin<?> createDefaultSkin()
-fx-skin
or set explicitly in a sub-class with setSkin(...)
.createDefaultSkin
in class Control
protected java.lang.Boolean getInitialFocusTraversable()
getInitialFocusTraversable
in class Control
public java.lang.Object queryAccessibleAttribute(AccessibleAttribute attribute, java.lang.Object... parameters)
queryAccessibleAttribute
in class Control