Class UIProgressBar

All Implemented Interfaces:
UIKeyHandler, Hintable, Savable

public class UIProgressBar extends UIPanel
This component shows progress as "percent complete" via a proportionally sized bar and an optional text label.
  • Constructor Details

    • UIProgressBar

      public UIProgressBar()
      Construct a new, horizontal progress bar.
    • UIProgressBar

      public UIProgressBar(String labelText, boolean horizontal)
      Construct a new progress bar with the given attributes.
      Parameters:
      labelText - text to show next to the progress bar
      horizontal - true for horizontal bar, false for vertical.
  • Method Details

    • layout

      public void layout()
      Description copied from class: UIComponent
      Override this to perform actual layout.
      Overrides:
      layout in class UIContainer
    • isHorizontal

      public boolean isHorizontal()
    • setHorizontal

      public void setHorizontal(boolean horizontal)
      Takes affect on next call to layout()
      Parameters:
      horizontal - true for horizontal bar, false for vertical.
    • getPercentFilled

      public double getPercentFilled()
    • setPercentFilled

      public void setPercentFilled(double value)
      Triggers layout if value is not same as current value.
      Parameters:
      value - the value
    • setLabelText

      public void setLabelText(String text)
    • setBarText

      public void setBarText(String text)
    • getBar

      public UIPanel getBar()
    • getTextLabel

      public UILabel getTextLabel()
    • getBarLabel

      public UILabel getBarLabel()
    • getMainPanel

      public UIPanel getMainPanel()