Module MaterialFX

Class MFXProgressBarSkin

java.lang.Object
javafx.scene.control.SkinBase<MFXProgressBar>
io.github.palexdev.materialfx.skins.MFXProgressBarSkin
All Implemented Interfaces:
Skin<MFXProgressBar>

public class MFXProgressBarSkin extends SkinBase<MFXProgressBar>
This is the implementation of the Skin associated with every MFXProgressBar.
  • Constructor Details

    • MFXProgressBarSkin

      public MFXProgressBarSkin(MFXProgressBar progressBar)
  • Method Details

    • updateBars

      protected void updateBars()
      Responsible for updating the progress bar state.

      If it is indeterminate calls playIndeterminateAnimation(), otherwise calls resetBars() and updateProgress().
    • resetBars

      protected void resetBars()
      Responsible for clearing the indeterminate animation (stop, clear children and set to null), and resetting the bars layout, scale and width properties.
    • updateProgress

      protected void updateProgress()
      Responsible for calculating the bar width according to the current progress (so when the progress bar is not indeterminate).
    • playIndeterminateAnimation

      protected void playIndeterminateAnimation()
      If the indeterminate animation is already playing returns.

      Responsible for building the indeterminate animation.
    • buildRectangle

      protected Rectangle buildRectangle(String styleClass)
      Responsible for building the track and the bars for the progress bar.
    • computePrefWidth

      protected double computePrefWidth(double height, double topInset, double rightInset, double bottomInset, double leftInset)
      Overrides:
      computePrefWidth in class SkinBase<MFXProgressBar>
    • computePrefHeight

      protected double computePrefHeight(double width, double topInset, double rightInset, double bottomInset, double leftInset)
      Overrides:
      computePrefHeight in class SkinBase<MFXProgressBar>
    • computeMaxHeight

      protected double computeMaxHeight(double width, double topInset, double rightInset, double bottomInset, double leftInset)
      Overrides:
      computeMaxHeight in class SkinBase<MFXProgressBar>
    • computeMaxWidth

      protected double computeMaxWidth(double height, double topInset, double rightInset, double bottomInset, double leftInset)
      Overrides:
      computeMaxWidth in class SkinBase<MFXProgressBar>
    • dispose

      public void dispose()
      Specified by:
      dispose in interface Skin<MFXProgressBar>
      Overrides:
      dispose in class SkinBase<MFXProgressBar>