Class FWProgressBarPanel

All Implemented Interfaces:
ImageObserver, MenuContainer, Serializable, EventListener, Accessible, SwingConstants, FWProgressTaskListener

public class FWProgressBarPanel extends JProgressBar implements FWProgressTaskListener
Progress bar showing the total progress over all tasks of a progress view model.
Author:
Andreas Enders
See Also:
  • Constructor Details

    • FWProgressBarPanel

      public FWProgressBarPanel(FWProgressViewModel aModel)
      Creates a bar for the tasks of the model (indeterminate if there are none).
      Parameters:
      aModel - model with the tasks
    • FWProgressBarPanel

      public FWProgressBarPanel(int aPercentage, String aLabel)
      Creates a bar with a fixed value.
      Parameters:
      aPercentage - value in percent
      aLabel - if empty, no text is painted
  • Method Details

    • update

      public void update(FWProgressTaskEvent aEvent)
      Sets the bar to (finished tasks + percentage of the current task) / number of tasks; an event without task or a value above 98% sets the bar to ready.
      Specified by:
      update in interface FWProgressTaskListener
      Parameters:
      aEvent - the task event