API Overview API Index Package Overview Direct link to this page
JDK 1.6
  javax.swing.plaf.basic. BasicProgressBarUI View Source
Author(s)
Michael C. Albers
Kathy Walrath
Since
Version
1.73 04/17/06
Serial
Hierarchy
 Object
      ComponentUI
          ProgressBarUI
              BasicProgressBarUI
Implements
Subclasses
Description
public class BasicProgressBarUI
A Basic L&F implementation of ProgressBarUI.
See also:   
Constructors
public BasicProgressBarUI ()
Methods
Hide/Show inherited methods
public boolean contains (JComponent c, int x, int y) [Inherited From ComponentUI]
  Returns true if the specified x,y location is contained within the look and feel's defined shape of the specified component.
publicstatic ComponentUI createUI (JComponent x) [Overrides ComponentUI]
public Accessible getAccessibleChild (JComponent c, int i) [Inherited From ComponentUI]
  Returns the ith Accessible child of the object.
public int getAccessibleChildrenCount (JComponent c) [Inherited From ComponentUI]
  Returns the number of accessible children in the object.
protected int getAmountFull (Insets b, int width, int height)
  This determines the amount of the progress bar that should be filled based on the percent done gathered from the model.
protected int getAnimationIndex ()
  Gets the index of the current animation frame.
public int getBaseline (JComponent c, int width, int height) [Overrides ComponentUI]
  Returns the baseline.
public BaselineResizeBehavior getBaselineResizeBehavior (JComponent c) [Overrides ComponentUI]
  Returns an enum indicating how the baseline of the component changes as the size changes.
protected Rectangle getBox (Rectangle r)
  Stores the position and size of the bouncing box that would be painted for the current animation index in r and returns r.
protected int getBoxLength (int availableLength, int otherDimension)
  Returns the length of the "bouncing box" to be painted.
protected int getCellLength ()
  Returns the width (if HORIZONTAL) or height (if VERTICAL) of each of the indivdual cells/units to be rendered in the progress bar.
protected int getCellSpacing ()
  Returns the spacing between each of the cells/units in the progress bar.
protectedfinal int getFrameCount ()
  Returns the number of frames for the complete animation loop used by an indeterminate JProgessBar.
public Dimension getMaximumSize (JComponent c) [Overrides ComponentUI]
public Dimension getMinimumSize (JComponent c) [Overrides ComponentUI]
  The Minimum size for this component is 10.
protected Dimension getPreferredInnerHorizontal ()
protected Dimension getPreferredInnerVertical ()
public Dimension getPreferredSize (JComponent c) [Overrides ComponentUI]
protected Color getSelectionBackground ()
The "selectionBackground" is the color of the text when it is painted over an unfilled area of the progress bar.
protected Color getSelectionForeground ()
The "selectionForeground" is the color of the text when it is painted over a filled area of the progress bar.
protected Point getStringPlacement (Graphics g, String progressString, int x, int y, int width, int height)
  Designate the place where the progress string will be painted.
protected void incrementAnimationIndex ()
  Sets the index of the current animation frame, to the next valid value, which results in the progress bar being repainted.
protected void installDefaults ()
protected void installListeners ()
public void installUI (JComponent c) [Overrides ComponentUI]
public void paint (Graphics g, JComponent c) [Overrides ComponentUI]
Delegates painting to one of two methods: paintDeterminate or paintIndeterminate.
protected void paintDeterminate (Graphics g, JComponent c)
  All purpose paint method that should do the right thing for almost all linear, determinate progress bars.
protected void paintIndeterminate (Graphics g, JComponent c)
  All purpose paint method that should do the right thing for all linear bouncing-box progress bars.
protected void paintString (Graphics g, int x, int y, int width, int height, int amountFull, Insets b)
protected void setAnimationIndex (int newValue)
  Sets the index of the current animation frame to the specified value and requests that the progress bar be repainted.
protected void setCellLength (int cellLen)
protected void setCellSpacing (int cellSpace)
protected void startAnimationTimer ()
  Starts the animation thread, creating and initializing it if necessary.
protected void stopAnimationTimer ()
  Stops the animation thread.
protected void uninstallDefaults ()
protected void uninstallListeners ()
Removes all listeners installed by this object.
public void uninstallUI (JComponent c) [Overrides ComponentUI]
public void update (Graphics g, JComponent c) [Inherited From ComponentUI]
  Notifies this UI delegate that it's time to paint the specified component.
Fields
Hide/Show inherited fields
protected Rectangle boxRect
  Used to hold the location and size of the bouncing box (returned by getBox) to be painted.
protected ChangeListener changeListener
protected JProgressBar progressBar
Nested Classes
  BasicProgressBarUI.ChangeHandler
This inner class is marked "public" due to a compiler bug.
Generated By: JavaOnTracks Doclet 0.1.4     ©Thibaut Colar