Class JProgressBar

All Implemented Interfaces:
ImageObserver, MenuContainer, Serializable, Accessible, SwingConstants, FieldReconciler.Reconcilable

public class JProgressBar extends JComponent implements SwingConstants, Accessible, FieldReconciler.Reconcilable
Emulator for JProgressBar, rendered by SJProgressBar.
See Also:
  • Field Details

    • changeListener

      protected ChangeListener changeListener
      The listener createChangeListener() produced, subscribed to the model through modelRelay. Protected and named as the JDK's is, so a subclass that reads or replaces it compiles unchanged.
    • orientation

      protected int orientation
    • paintBorder

      protected boolean paintBorder
    • model

      protected BoundedRangeModel model
    • progressString

      protected String progressString
    • paintString

      protected boolean paintString
    • changeEvent

      protected transient ChangeEvent changeEvent
      Lazily created by fireStateChanged(), as in the JDK.
  • Constructor Details

    • JProgressBar

      public JProgressBar()
    • JProgressBar

      public JProgressBar(int orientation)
    • JProgressBar

      public JProgressBar(int min, int max)
    • JProgressBar

      public JProgressBar(int orientation, int min, int max)
    • JProgressBar

      public JProgressBar(BoundedRangeModel brm)
  • Method Details

    • reconcileFields

      public final void reconcileFields()
      D_field_write_reconcile repair hook — see JSlider.reconcileFields().
      Specified by:
      reconcileFields in interface FieldReconciler.Reconcilable
    • getValue

      public int getValue()
    • setValue

      public void setValue(int n)
    • getMinimum

      public int getMinimum()
    • setMinimum

      public void setMinimum(int minimum)
    • getMaximum

      public int getMaximum()
    • setMaximum

      public void setMaximum(int maximum)
    • getModel

      public BoundedRangeModel getModel()
    • setModel

      public void setModel(BoundedRangeModel newModel)
    • getPercentComplete

      public double getPercentComplete()
      The JDK's arithmetic, so an empty range (minimum == maximum) answers NaN, as on the desktop.
    • setIndeterminate

      public void setIndeterminate(boolean newValue)
    • isIndeterminate

      public boolean isIndeterminate()
    • getOrientation

      public int getOrientation()
    • setOrientation

      public void setOrientation(int orientation)
    • isStringPainted

      public boolean isStringPainted()
    • setStringPainted

      public void setStringPainted(boolean b)
    • getString

      public String getString()
    • setString

      public void setString(String s)
    • isBorderPainted

      public boolean isBorderPainted()
    • setBorderPainted

      public void setBorderPainted(boolean b)
    • addChangeListener

      public void addChangeListener(ChangeListener l)
    • removeChangeListener

      public void removeChangeListener(ChangeListener l)
    • getChangeListeners

      public ChangeListener[] getChangeListeners()
    • fireStateChanged

      protected void fireStateChanged()
    • createChangeListener

      protected ChangeListener createChangeListener()
      JDK hook: the listener subscribed to the model, which re-fires as this bar.
    • updateUI

      public void updateUI()
      Overrides:
      updateUI in class JComponent
    • getUIClassID

      public String getUIClassID()
      Overrides:
      getUIClassID in class JComponent
    • getUI

      public ProgressBarUI getUI()
      Overrides:
      getUI in class JComponent
    • setUI

      public void setUI(ProgressBarUI ui)
    • paramString

      protected String paramString()
      Overrides:
      paramString in class JComponent
    • getAccessibleContext

      public AccessibleContext getAccessibleContext()
      Specified by:
      getAccessibleContext in interface Accessible
      Overrides:
      getAccessibleContext in class Component