All Implemented Interfaces:
Control, View

public class ProgressView extends BoxView
ProgressView is used to show a progress indicator. Defaults to
  • Constructor Details

    • ProgressView

      public ProgressView()
      Construct view with tickStart 0 and tickEnd 100. Uses default ProgressView.ProgressViewItems.
    • ProgressView

      public ProgressView(int tickStart, int tickEnd)
      Construct view with tickStart 0 and tickEnd 100. Uses default ProgressView.ProgressViewItems.
      Parameters:
      tickStart - the tick start
      tickEnd - the tick end
    • ProgressView

      public ProgressView(ProgressView.ProgressViewItem... items)
      Construct view with given ProgressView.ProgressViewItems using tickStart 0 and tickEnd 100.
      Parameters:
      items - the progress view items
    • ProgressView

      public ProgressView(int tickStart, int tickEnd, ProgressView.ProgressViewItem... items)
      Construct view with given bounds for tickStart and tickEnd. tickStart needs to be equal or more than zero. tickEnd needs to be higher than tickStart. Uses defined progress view items.
      Parameters:
      tickStart - the tick start
      tickEnd - the tick end
      items - the progress view items
  • Method Details

    • getDescription

      public String getDescription()
      Gets a progress description.
      Returns:
      a progress description
    • setDescription

      public void setDescription(String description)
      Sets a progress description. Used in items as a text item.
      Parameters:
      description - the progress description
    • setSpinner

      public void setSpinner(Spinner spinner)
      Sets an explicit spinner to use.
      Parameters:
      spinner - the spinner to use
    • start

      public void start()
      Starts a runtime logic. Call to already started progress has no effect.
    • stop

      public void stop()
      Stops a runtime logic.
    • drawInternal

      protected void drawInternal(Screen screen)
      Description copied from class: BoxView
      Possibly draws a box around this view and title in a box top boundary. Also calls a draw function if defined.
      Overrides:
      drawInternal in class BoxView
      Parameters:
      screen - the screen
    • tickAdvance

      public void tickAdvance(int count)
      Advance tickValue by a given count. Note that negative count will advance backwards.
      Parameters:
      count - the count to advance tick value
    • setTickValue

      public void setTickValue(int value)
      Sets a tick value. If value is lower or higher than tickStart or tickEnd respectively tickValue will be set to low/high bounds. This means tickValue is always kept within range inclusively.
      Parameters:
      value - the new tick value to set
    • getState

      public ProgressView.ProgressState getState()
      Gets a state of this ProgressView.
      Returns:
      a view progress state