APIdia Launch Partner
Top Description Inners Fields Constructors Methods
javafx.scene.control.skin

public Class ProgressIndicatorSkin

extends SkinBase<ProgressIndicator>
Class Inheritance
Known Direct Subclasses
javafx.scene.control.skin.ProgressBarSkin
Imports
com.sun.javafx.scene.NodeHelper, .TreeShowingProperty, com.sun.javafx.scene.control.skin.Utils, java.util.ArrayList, .Collections, .List, javafx.animation.Animation, .KeyFrame, .KeyValue, .Timeline, javafx.beans.property.BooleanProperty, .IntegerProperty, .ObjectProperty, javafx.beans.value.WritableValue, javafx.collections.FXCollections, .ObservableList, javafx.geometry.NodeOrientation, .VPos, javafx.scene.Node, javafx.scene.control.Control, .ProgressIndicator, .SkinBase, javafx.scene.layout.Pane, .Region, .StackPane, javafx.scene.paint.Color, .Paint, javafx.scene.shape.Arc, .ArcType, .Circle, javafx.scene.text.Text, .TextBoundsType, javafx.scene.transform.Scale, javafx.util.Duration, javafx.css.CssMetaData, .StyleableObjectProperty, .StyleableProperty, .StyleableBooleanProperty, .StyleableIntegerProperty, .Styleable, javafx.css.converter.BooleanConverter, .PaintConverter, .SizeConverter, com.sun.javafx.scene.control.skin.resources.ControlResources

Default skin implementation for the ProgressIndicator control.
Since
9
See Also
ProgressIndicator

Nested and Inner Type Summary

Modifier and TypeClass and Description
private class
private class

Field Summary

Modifier and TypeField and Description
pack-priv final Duration
private ProgressIndicator
private ProgressIndicatorSkin.DeterminateIndicator
private final String
DONE

DONE string is just used to know the size of Done as that is the biggest text we need to allow for

private static final CssMetaData<ProgressIndicator, Number>
private IntegerProperty
indeterminateSegmentCount

The number of segments in the spinner.

pack-priv Animation
private static final CssMetaData<ProgressIndicator, Paint>
private ObjectProperty<Paint>
progressColor

The colour of the progress segment.

private static final CssMetaData<ProgressIndicator, Boolean>
private final BooleanProperty
spinEnabled

True if the progress indicator should rotate as well as animate opacity.

private ProgressIndicatorSkin.IndeterminateSpinner
private static final List<CssMetaData<? extends Styleable, ?>>
private TreeShowingProperty
pack-priv final Duration

Constructor Summary

AccessConstructor and Description
public
ProgressIndicatorSkin(ProgressIndicator
The control that this skin should be installed onto.
control
)

Creates a new ProgressIndicatorSkin instance, installing the necessary child nodes into the Control children list.

Method Summary

Modifier and TypeMethod and Description
protected double
computeMaxHeight(double width, double topInset, double rightInset, double bottomInset, double leftInset)

Overrides javafx.scene.control.SkinBase.computeMaxHeight.

Computes the maximum allowable height of the Skin, based on the provided width.

protected double
computeMaxWidth(double height, double topInset, double rightInset, double bottomInset, double leftInset)

Overrides javafx.scene.control.SkinBase.computeMaxWidth.

Computes the maximum allowable width of the Skin, based on the provided height.

protected double
computeMinHeight(double width, double topInset, double rightInset, double bottomInset, double leftInset)

Overrides javafx.scene.control.SkinBase.computeMinHeight.

Computes the minimum allowable height of the Skin, based on the provided width.

protected double
computeMinWidth(double height, double topInset, double rightInset, double bottomInset, double leftInset)

Overrides javafx.scene.control.SkinBase.computeMinWidth.

Computes the minimum allowable width of the Skin, based on the provided height.

protected double
computePrefHeight(double width, double topInset, double rightInset, double bottomInset, double leftInset)

Overrides javafx.scene.control.SkinBase.computePrefHeight.

Calculates the preferred height of this SkinBase.

protected double
computePrefWidth(double height, double topInset, double rightInset, double bottomInset, double leftInset)

Overrides javafx.scene.control.SkinBase.computePrefWidth.

Calculates the preferred width of this SkinBase.

pack-priv void
public void
dispose()

Overrides javafx.scene.control.SkinBase.dispose.

Implements javafx.scene.control.Skin.dispose.

Called when a previously installed skin is about to be removed from its associated control.

public static List<CssMetaData<? extends Styleable, ?>>

Returns:

the CssMetaData associated with this class, which may include the CssMetaData of its superclasses
getClassCssMetaData
()

Hides javafx.scene.control.SkinBase.getClassCssMetaData.

Returns the CssMetaData associated with this class, which may include the CssMetaData of its superclasses.

public List<CssMetaData<? extends Styleable, ?>>
getCssMetaData()

Overrides javafx.scene.control.SkinBase.getCssMetaData.

This method should delegate to Node#getClassCssMetaData() so that a Node's CssMetaData can be accessed without the need for reflection.

pack-priv Paint
pack-priv void
protected void
layoutChildren(final double x, final double y, final double w, final double h)

Overrides javafx.scene.control.SkinBase.layoutChildren.

Called during the layout pass of the scenegraph.

pack-priv void
pauseTimeline(boolean pause)

pack-priv void
pack-priv void
Inherited from javafx.scene.control.SkinBase:
computeBaselineOffsetconsumeMouseEventsexecuteAccessibleActiongetChildrengetNodegetSkinnablelayoutInArealayoutInArealayoutInAreapositionInAreapositionInAreapseudoClassStateChangedqueryAccessibleAttributeregisterChangeListenerregisterInvalidationListenerregisterListChangeListenersnappedBottomInsetsnappedLeftInsetsnappedRightInsetsnappedTopInsetsnapPositionsnapPositionXsnapPositionYsnapSizesnapSizeXsnapSizeYsnapSpacesnapSpaceXsnapSpaceYunregisterChangeListenersunregisterInvalidationListenersunregisterListChangeListeners

Field Detail

CLIPPED_DELAYback to summary
pack-priv final Duration CLIPPED_DELAY
controlback to summary
private ProgressIndicator control

Hides javafx.scene.control.SkinBase.control.

determinateIndicatorback to summary
private ProgressIndicatorSkin.DeterminateIndicator determinateIndicator
DONEback to summary
private final String DONE

DONE string is just used to know the size of Done as that is the biggest text we need to allow for

INDETERMINATE_SEGMENT_COUNTback to summary
private static final CssMetaData<ProgressIndicator, Number> INDETERMINATE_SEGMENT_COUNT
indeterminateSegmentCountback to summary
private IntegerProperty indeterminateSegmentCount

The number of segments in the spinner.

indeterminateTransitionback to summary
pack-priv Animation indeterminateTransition
PROGRESS_COLORback to summary
private static final CssMetaData<ProgressIndicator, Paint> PROGRESS_COLOR
progressColorback to summary
private ObjectProperty<Paint> progressColor

The colour of the progress segment.

SPIN_ENABLEDback to summary
private static final CssMetaData<ProgressIndicator, Boolean> SPIN_ENABLED
spinEnabledback to summary
private final BooleanProperty spinEnabled

True if the progress indicator should rotate as well as animate opacity.

spinnerback to summary
private ProgressIndicatorSkin.IndeterminateSpinner spinner
STYLEABLESback to summary
private static final List<CssMetaData<? extends Styleable, ?>> STYLEABLES
treeShowingPropertyback to summary
private TreeShowingProperty treeShowingProperty
UNCLIPPED_DELAYback to summary
pack-priv final Duration UNCLIPPED_DELAY

Constructor Detail

ProgressIndicatorSkinback to summary
public ProgressIndicatorSkin(ProgressIndicator control)

Creates a new ProgressIndicatorSkin instance, installing the necessary child nodes into the Control children list.

Parameters
control:ProgressIndicator

The control that this skin should be installed onto.

Method Detail

computeMaxHeightback to summary
protected double computeMaxHeight(double width, double topInset, double rightInset, double bottomInset, double leftInset)

Overrides javafx.scene.control.SkinBase.computeMaxHeight.

Doc from javafx.scene.control.SkinBase.computeMaxHeight.

Computes the maximum allowable height of the Skin, based on the provided width.

Annotations
@Override
computeMaxWidthback to summary
protected double computeMaxWidth(double height, double topInset, double rightInset, double bottomInset, double leftInset)

Overrides javafx.scene.control.SkinBase.computeMaxWidth.

Doc from javafx.scene.control.SkinBase.computeMaxWidth.

Computes the maximum allowable width of the Skin, based on the provided height.

Annotations
@Override
computeMinHeightback to summary
protected double computeMinHeight(double width, double topInset, double rightInset, double bottomInset, double leftInset)

Overrides javafx.scene.control.SkinBase.computeMinHeight.

Doc from javafx.scene.control.SkinBase.computeMinHeight.

Computes the minimum allowable height of the Skin, based on the provided width.

Annotations
@Override
computeMinWidthback to summary
protected double computeMinWidth(double height, double topInset, double rightInset, double bottomInset, double leftInset)

Overrides javafx.scene.control.SkinBase.computeMinWidth.

Doc from javafx.scene.control.SkinBase.computeMinWidth.

Computes the minimum allowable width of the Skin, based on the provided height.

Annotations
@Override
computePrefHeightback to summary
protected double computePrefHeight(double width, double topInset, double rightInset, double bottomInset, double leftInset)

Overrides javafx.scene.control.SkinBase.computePrefHeight.

Doc from javafx.scene.control.SkinBase.computePrefHeight.

Calculates the preferred height of this SkinBase. The default implementation calculates this height as the height of the area occupied by its managed children when they are positioned at their current positions at their preferred heights.

Annotations
@Override
computePrefWidthback to summary
protected double computePrefWidth(double height, double topInset, double rightInset, double bottomInset, double leftInset)

Overrides javafx.scene.control.SkinBase.computePrefWidth.

Doc from javafx.scene.control.SkinBase.computePrefWidth.

Calculates the preferred width of this SkinBase. The default implementation calculates this width as the width of the area occupied by its managed children when they are positioned at their current positions at their preferred widths.

Annotations
@Override
createIndeterminateTimelineback to summary
pack-priv void createIndeterminateTimeline()
disposeback to summary
public void dispose()

Overrides javafx.scene.control.SkinBase.dispose.

Implements javafx.scene.control.Skin.dispose.

Doc from javafx.scene.control.SkinBase.dispose.

Called when a previously installed skin is about to be removed from its associated control. This allows the skin to do clean up, like removing listeners and bindings, and undo any changes to the control's properties. After this method completes, getSkinnable() and getNode() should return null.

Calling dispose() more than once has no effect.

Annotations
@Override
getClassCssMetaDataback to summary
public static List<CssMetaData<? extends Styleable, ?>> getClassCssMetaData()

Hides javafx.scene.control.SkinBase.getClassCssMetaData.

Returns the CssMetaData associated with this class, which may include the CssMetaData of its superclasses.

Returns:List<CssMetaData<? extends Styleable, ?>>

the CssMetaData associated with this class, which may include the CssMetaData of its superclasses

getCssMetaDataback to summary
public List<CssMetaData<? extends Styleable, ?>> getCssMetaData()

Overrides javafx.scene.control.SkinBase.getCssMetaData.

Doc from javafx.scene.control.SkinBase.getCssMetaData.

This method should delegate to Node#getClassCssMetaData() so that a Node's CssMetaData can be accessed without the need for reflection.

Annotations
@Override
getProgressColorback to summary
pack-priv Paint getProgressColor()
initializeback to summary
pack-priv void initialize()
layoutChildrenback to summary
protected void layoutChildren(final double x, final double y, final double w, final double h)

Overrides javafx.scene.control.SkinBase.layoutChildren.

Doc from javafx.scene.control.SkinBase.layoutChildren.

Called during the layout pass of the scenegraph.

Annotations
@Override
pauseTimelineback to summary
pack-priv void pauseTimeline(boolean pause)
updateAnimationback to summary
pack-priv void updateAnimation()
updateProgressback to summary
pack-priv void updateProgress()
javafx.scene.control.skin back to summary

private final Class ProgressIndicatorSkin.DeterminateIndicator

extends Region
Class Inheritance

Field Summary

Modifier and TypeField and Description
private Arc
private int
private double
private double
private StackPane
private Circle
private int
private StackPane
private Text
private double
private StackPane
Inherited from javafx.scene.layout.Region:
USE_COMPUTED_SIZEUSE_PREF_SIZE

Constructor Summary

AccessConstructor and Description
public

Method Summary

Modifier and TypeMethod and Description
protected double
computeMaxHeight(double width)

Overrides javafx.scene.layout.Region.computeMaxHeight.

Computes the maximum height of this region.

protected double
computeMaxWidth(double height)

Overrides javafx.scene.layout.Region.computeMaxWidth.

Computes the maximum width for this region.

protected double
computePrefHeight(double width)

Overrides javafx.scene.layout.Region.computePrefHeight.

Computes the preferred height of this region for the given width; Region subclasses should override this method to return an appropriate value based on their content and layout strategy.

protected double
computePrefWidth(double height)

Overrides javafx.scene.layout.Region.computePrefWidth.

Computes the preferred width of this region for the given height.

protected void
layoutChildren()

Overrides javafx.scene.Parent.layoutChildren.

Invoked during the layout pass to layout the children in this Parent.

private void
setFillOverride(Paint fillOverride)

private void
private void
updateProgress(double progress)

public boolean
usesMirroring()

Overrides javafx.scene.Node.usesMirroring.

Determines whether a node should be mirrored when node orientation is right-to-left.

Inherited from javafx.scene.layout.Region:
backgroundPropertyborderPropertycacheShapePropertycenterShapePropertycomputeMinHeightcomputeMinWidthgetBackgroundgetBordergetClassCssMetaDatagetCssMetaDatagetHeightgetInsetsgetMaxHeightgetMaxWidthgetMinHeightgetMinWidthgetOpaqueInsetsgetPaddinggetPrefHeightgetPrefWidthgetShapegetUserAgentStylesheetgetWidthheightPropertyinsetsPropertyisCacheShapeisCenterShapeisResizableisScaleShapeisSnapToPixellayoutInArealayoutInArealayoutInArealayoutInAreamaxHeightmaxHeightPropertymaxWidthmaxWidthPropertyminHeightminHeightPropertyminWidthminWidthPropertyopaqueInsetsPropertypaddingPropertypositionInAreapositionInAreaprefHeightprefHeightPropertyprefWidthprefWidthPropertyresizescaleShapePropertysetBackgroundsetBordersetCacheShapesetCenterShapesetHeightsetMaxHeightsetMaxSizesetMaxWidthsetMinHeightsetMinSizesetMinWidthsetOpaqueInsetssetPaddingsetPrefHeightsetPrefSizesetPrefWidthsetScaleShapesetShapesetSnapToPixelsetWidthshapePropertysnappedBottomInsetsnappedLeftInsetsnappedRightInsetsnappedTopInsetsnapPositionsnapPositionXsnapPositionYsnapSizesnapSizeXsnapSizeYsnapSpacesnapSpaceXsnapSpaceYsnapToPixelPropertywidthProperty

Field Detail

arcShapeback to summary
private Arc arcShape
degProgressback to summary
private int degProgress
doneTextHeightback to summary
private double doneTextHeight
doneTextWidthback to summary
private double doneTextWidth
indicatorback to summary
private StackPane indicator
indicatorCircleback to summary
private Circle indicatorCircle
intProgressback to summary
private int intProgress
progressback to summary
private StackPane progress
textback to summary
private Text text
textGapback to summary
private double textGap
tickback to summary
private StackPane tick

Constructor Detail

DeterminateIndicatorback to summary
public DeterminateIndicator(ProgressIndicator control, ProgressIndicatorSkin s, Paint fillOverride)

Method Detail

computeMaxHeightback to summary
protected double computeMaxHeight(double width)

Overrides javafx.scene.layout.Region.computeMaxHeight.

Doc from javafx.scene.layout.Region.computeMaxHeight.

Computes the maximum height of this region. Returns Double.MAX_VALUE by default. Region subclasses may override this method to return a different value based on their content and layout strategy. If the subclass doesn't have a HORIZONTAL content bias, then the width parameter can be ignored.

Annotations
@Override
computeMaxWidthback to summary
protected double computeMaxWidth(double height)

Overrides javafx.scene.layout.Region.computeMaxWidth.

Doc from javafx.scene.layout.Region.computeMaxWidth.

Computes the maximum width for this region. Returns Double.MAX_VALUE by default. Region subclasses may override this method to return an different value based on their content and layout strategy. If the subclass doesn't have a VERTICAL content bias, then the height parameter can be ignored.

Annotations
@Override
computePrefHeightback to summary
protected double computePrefHeight(double width)

Overrides javafx.scene.layout.Region.computePrefHeight.

Doc from javafx.scene.layout.Region.computePrefHeight.

Computes the preferred height of this region for the given width; Region subclasses should override this method to return an appropriate value based on their content and layout strategy. If the subclass doesn't have a HORIZONTAL content bias, then the width parameter can be ignored.

Annotations
@Override
computePrefWidthback to summary
protected double computePrefWidth(double height)

Overrides javafx.scene.layout.Region.computePrefWidth.

Doc from javafx.scene.layout.Region.computePrefWidth.

Computes the preferred width of this region for the given height. Region subclasses should override this method to return an appropriate value based on their content and layout strategy. If the subclass doesn't have a VERTICAL content bias, then the height parameter can be ignored.

Annotations
@Override
layoutChildrenback to summary
protected void layoutChildren()

Overrides javafx.scene.Parent.layoutChildren.

Doc from javafx.scene.Parent.layoutChildren.

Invoked during the layout pass to layout the children in this Parent. By default it will only set the size of managed, resizable content to their preferred sizes and does not do any node positioning.

Subclasses should override this function to layout content as needed.

Annotations
@Override
setFillOverrideback to summary
private void setFillOverride(Paint fillOverride)
unregisterListenerback to summary
private void unregisterListener()
updateProgressback to summary
private void updateProgress(double progress)
usesMirroringback to summary
public boolean usesMirroring()

Overrides javafx.scene.Node.usesMirroring.

Doc from javafx.scene.Node.usesMirroring.

Determines whether a node should be mirrored when node orientation is right-to-left.

When a node is mirrored, the origin is automatically moved to the top right corner causing the node to layout children and draw from right to left using a mirroring transformation. Some nodes may wish to draw from right to left without using a transformation. These nodes will answer false and implement right-to-left orientation without using the automatic transformation.

Annotations
@Override
javafx.scene.control.skin back to summary

private final Class ProgressIndicatorSkin.IndeterminateSpinner

extends Region
Class Inheritance

Nested and Inner Type Summary

Modifier and TypeClass and Description
private class

Field Summary

Modifier and TypeField and Description
private Paint
private final List<Double>
private ProgressIndicatorSkin.IndeterminateSpinner.IndicatorPaths
private boolean
Inherited from javafx.scene.layout.Region:
USE_COMPUTED_SIZEUSE_PREF_SIZE

Constructor Summary

AccessConstructor and Description
private
IndeterminateSpinner(boolean spinEnabled, Paint fillOverride)

Method Summary

Modifier and TypeMethod and Description
protected void
layoutChildren()

Overrides javafx.scene.Parent.layoutChildren.

Invoked during the layout pass to layout the children in this Parent.

private void
private void
public void
setFillOverride(Paint fillOverride)

public void
setSpinEnabled(boolean spinEnabled)

private void
Inherited from javafx.scene.layout.Region:
backgroundPropertyborderPropertycacheShapePropertycenterShapePropertycomputeMaxHeightcomputeMaxWidthcomputeMinHeightcomputeMinWidthcomputePrefHeightcomputePrefWidthgetBackgroundgetBordergetClassCssMetaDatagetCssMetaDatagetHeightgetInsetsgetMaxHeightgetMaxWidthgetMinHeightgetMinWidthgetOpaqueInsetsgetPaddinggetPrefHeightgetPrefWidthgetShapegetUserAgentStylesheetgetWidthheightPropertyinsetsPropertyisCacheShapeisCenterShapeisResizableisScaleShapeisSnapToPixellayoutInArealayoutInArealayoutInArealayoutInAreamaxHeightmaxHeightPropertymaxWidthmaxWidthPropertyminHeightminHeightPropertyminWidthminWidthPropertyopaqueInsetsPropertypaddingPropertypositionInAreapositionInAreaprefHeightprefHeightPropertyprefWidthprefWidthPropertyresizescaleShapePropertysetBackgroundsetBordersetCacheShapesetCenterShapesetHeightsetMaxHeightsetMaxSizesetMaxWidthsetMinHeightsetMinSizesetMinWidthsetOpaqueInsetssetPaddingsetPrefHeightsetPrefSizesetPrefWidthsetScaleShapesetShapesetSnapToPixelsetWidthshapePropertysnappedBottomInsetsnappedLeftInsetsnappedRightInsetsnappedTopInsetsnapPositionsnapPositionXsnapPositionYsnapSizesnapSizeXsnapSizeYsnapSpacesnapSpaceXsnapSpaceYsnapToPixelPropertywidthProperty

Field Detail

fillOverrideback to summary
private Paint fillOverride
opacitiesback to summary
private final List<Double> opacities
pathsGback to summary
private ProgressIndicatorSkin.IndeterminateSpinner.IndicatorPaths pathsG
spinEnabledback to summary
private boolean spinEnabled

Constructor Detail

IndeterminateSpinnerback to summary
private IndeterminateSpinner(boolean spinEnabled, Paint fillOverride)

Method Detail

layoutChildrenback to summary
protected void layoutChildren()

Overrides javafx.scene.Parent.layoutChildren.

Doc from javafx.scene.Parent.layoutChildren.

Invoked during the layout pass to layout the children in this Parent. By default it will only set the size of managed, resizable content to their preferred sizes and does not do any node positioning.

Subclasses should override this function to layout content as needed.

Annotations
@Override
rebuildback to summary
private void rebuild()
rebuildTimelineback to summary
private void rebuildTimeline()
setFillOverrideback to summary
public void setFillOverride(Paint fillOverride)
setSpinEnabledback to summary
public void setSpinEnabled(boolean spinEnabled)
shiftColorsback to summary
private void shiftColors()
javafx.scene.control.skin back to summary

private Class ProgressIndicatorSkin.IndeterminateSpinner.IndicatorPaths

extends Pane
Class Inheritance

Constructor Summary

AccessConstructor and Description
private

Method Summary

Modifier and TypeMethod and Description
protected double
computePrefHeight(double width)

Overrides javafx.scene.layout.Region.computePrefHeight.

Computes the preferred height of this region for the given width; Region subclasses should override this method to return an appropriate value based on their content and layout strategy.

protected double
computePrefWidth(double height)

Overrides javafx.scene.layout.Region.computePrefWidth.

Computes the preferred width of this region for the given height.

protected void
layoutChildren()

Overrides javafx.scene.Parent.layoutChildren.

Invoked during the layout pass to layout the children in this Parent.

Inherited from javafx.scene.layout.Pane:
getChildren

Constructor Detail

IndicatorPathsback to summary
private IndicatorPaths()

Method Detail

computePrefHeightback to summary
protected double computePrefHeight(double width)

Overrides javafx.scene.layout.Region.computePrefHeight.

Doc from javafx.scene.layout.Region.computePrefHeight.

Computes the preferred height of this region for the given width; Region subclasses should override this method to return an appropriate value based on their content and layout strategy. If the subclass doesn't have a HORIZONTAL content bias, then the width parameter can be ignored.

Annotations
@Override
computePrefWidthback to summary
protected double computePrefWidth(double height)

Overrides javafx.scene.layout.Region.computePrefWidth.

Doc from javafx.scene.layout.Region.computePrefWidth.

Computes the preferred width of this region for the given height. Region subclasses should override this method to return an appropriate value based on their content and layout strategy. If the subclass doesn't have a VERTICAL content bias, then the height parameter can be ignored.

Annotations
@Override
layoutChildrenback to summary
protected void layoutChildren()

Overrides javafx.scene.Parent.layoutChildren.

Doc from javafx.scene.Parent.layoutChildren.

Invoked during the layout pass to layout the children in this Parent. By default it will only set the size of managed, resizable content to their preferred sizes and does not do any node positioning.

Subclasses should override this function to layout content as needed.

Annotations
@Override