Class JPanelProgressBar

All Implemented Interfaces:
ProgressBarInterface, ImageObserver, MenuContainer, Serializable, Accessible

public class JPanelProgressBar extends JPanel implements ProgressBarInterface

Title: JPanelProgressBar

Description: simple jpanel containing a JProgressBar (similar to ViewJProgressBar but in a panel, not a frame)

Version:
1.0
Author:
blink
See Also:
  • Field Details

    • serialVersionUID

      private static final long serialVersionUID
      Use serialVersionUID for interoperability.
      See Also:
    • pBar

      private JProgressBar pBar
      Actual bar which fills with color as the percentage of completion increases.
  • Constructor Details

    • JPanelProgressBar

      public JPanelProgressBar()
      Creates a new JPanelProgressBar object.
    • JPanelProgressBar

      public JPanelProgressBar(int min, int max)
      Creates a new JPanelProgressBar object.
      Parameters:
      min - int
      max - int
  • Method Details

    • appendMessage

      public void appendMessage(String message)
      DOCUMENT ME!
      Specified by:
      appendMessage in interface ProgressBarInterface
      Parameters:
      message - DOCUMENT ME!
    • dispose

      public void dispose()
      DOCUMENT ME!
      Specified by:
      dispose in interface ProgressBarInterface
    • finalize

      public void finalize()
      DOCUMENT ME!
      Overrides:
      finalize in class Object
    • getProgressBar

      public JProgressBar getProgressBar()
      Get the progress bar.
      Specified by:
      getProgressBar in interface ProgressBarInterface
      Returns:
      pBar the progress bar.
    • getValue

      public int getValue()
      Used to get the present value of the progress bar.
      Specified by:
      getValue in interface ProgressBarInterface
      Returns:
      Value of progress bar.
    • isComplete

      public boolean isComplete()
      Used to determine if the progress bar is at 100%.
      Specified by:
      isComplete in interface ProgressBarInterface
      Returns:
      true if progress bar is at 100%, false if not.
    • setMessage

      public void setMessage(String message)
      DOCUMENT ME!
      Specified by:
      setMessage in interface ProgressBarInterface
      Parameters:
      message - DOCUMENT ME!
    • setTitle

      public void setTitle(String title)
      DOCUMENT ME!
      Specified by:
      setTitle in interface ProgressBarInterface
      Parameters:
      title - DOCUMENT ME!
    • setValue

      public void setValue(int value)
      Used to set the present value of the progress bar. Changes the percentage label and title of the frame as well.
      Parameters:
      value - Set the progress bar to the given value.
    • setValue

      public void setValue(int value, boolean separateThread)
      DOCUMENT ME!
      Parameters:
      value - DOCUMENT ME!
      separateThread - DOCUMENT ME!
    • setValueImmed

      public void setValueImmed(int value)
      Used to set the present value of the progress bar. Changes the percentage label and title of the frame as well.
      Parameters:
      value - Set the progress bar to the given value.
    • setVisible

      public void setVisible(boolean vis)
      DOCUMENT ME!
      Specified by:
      setVisible in interface ProgressBarInterface
      Overrides:
      setVisible in class JComponent
      Parameters:
      vis - DOCUMENT ME!
    • updateValue

      public void updateValue(int value)
      Used to set the present value of the progress bar. Changes the percentage label and title of the frame as well.
      Parameters:
      value - Set the progress bar to the given value.
    • updateValue

      public void updateValue(int value, boolean separateThread)
      DOCUMENT ME!
      Specified by:
      updateValue in interface ProgressBarInterface
      Parameters:
      value - DOCUMENT ME!
      separateThread - DOCUMENT ME!
    • updateValueImmed

      public void updateValueImmed(int value)
      Used to set the present value of the progress bar. Changes the percentage label and title of the frame as well. It also forces an immediate update of the frame. Typically used when using IO functions.
      Parameters:
      value - Set the progress bar to the given value.