Class ProgressBar

All Implemented Interfaces:
HasLocalTransform, CloneableSmartAsset, Collidable, Savable, JmeCloneable, Cloneable

public class ProgressBar extends Panel
A horizontal progress indicator supporting an optional text overlay. This is a composite component where an indicator panel overlays the base panel.
  • Field Details

  • Constructor Details

  • Method Details

    • initializeDefaultStyles

      public static void initializeDefaultStyles(Styles styles, Attributes attrs)
    • setProgressPercent

      public void setProgressPercent(double percent)
      Sets the current progress value as a percentage (0-1.0) of the current range.
    • getProgressPercent

      public double getProgressPercent()
      Returns the current progress value as a percentage (0-1.0) of the current range.
    • setProgressValue

      public void setProgressValue(double val)
      Sets the raw progress value.
    • getProgressValue

      public double getProgressValue()
      Returns the raw progress value.
    • setModel

      public void setModel(RangedValueModel model)
      Sets the ranged value model that will be used to calculate progress percentage. The default model is is a DefaultRangedValueModel() where the range is 0 to 100. If setModel(null) is called then a new default range is created.
    • getModel

      public RangedValueModel getModel()
      Returns the current range model for this progress bar.
    • setMessage

      public void setMessage(String message)
      Sets the message text that appears in the progress bar text overlay.
    • getMessage

      public String getMessage()
      Returns the message text that currently appears in the progress bar text overlay.
    • getLabel

      public Label getLabel()
      Returns the GUI element that is used for the main progress bar area and overlay label. This can be used to apply special styling.
    • getValueIndicator

      public Panel getValueIndicator()
      Returns the GUI element that is used for the value indicator. This can be used to apply special styling.
    • updateLogicalState

      public void updateLogicalState(float tpf)
      Description copied from class: Spatial
      updateLogicalState calls the update() method for all controls attached to this Spatial.
      Overrides:
      updateLogicalState in class Node
      Parameters:
      tpf - Time per frame.
      See Also:
    • resetStateView

      protected void resetStateView()