Class ProgressBar

All Implemented Interfaces:
ImageObserver, MenuContainer, Serializable, Accessible, RootPaneContainer, WindowConstants

public class ProgressBar extends JFrame
This class provides a progressbar with 2 lines. One is the progress bar itself, the other is a String for text messages.
hirsch, 13.10.2003
See Also:
  • Constructor Details

    • ProgressBar

      public ProgressBar(int maxCapacity)
      Creates a progress bar with the given amount as 100 percent.
      maxCapacity - Defines the 100%-scale for this progress bar.
  • Method Details

    • updateUI

      public final void updateUI()
      After any changes the UI needs to be repainted and recentered which is done by that method. This method waits 200ms in order to make the UI more human-readable.
    • setProgress

      public final void setProgress()
      Set progress by setting the amount of items that are processed successfully.
    • setText

      public final void setText(String textContent)
      Sets the part of this component that shows above the graphical bar.
      textContent - Content to show under the graphical progress bar.
    • getText

      public final String getText()
      Getter for text value.
      Current text value.
    • getProgress

      public final int getProgress()
      Getter for current step/progress.
      Current absolute progress value (step).