java.lang.Object | ||||
↳ | javax.swing.plaf.ComponentUI | |||
↳ | javax.swing.plaf.ProgressBarUI | |||
↳ | javax.swing.plaf.basic.BasicProgressBarUI | |||
↳ | com.sun.java.swing.plaf.windows.WindowsProgressBarUI |
Windows rendition of the component.
Warning: Serialized objects of this class will not be compatible with future Swing releases. The current serialization support is appropriate for short term storage or RMI between applications running the same version of Swing. A future release of Swing will provide support for long term persistence.
[Expand]
Inherited Fields | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
From class
javax.swing.plaf.basic.BasicProgressBarUI
|
Public Constructors | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
Public Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
Returns the baseline.
|
Protected Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
Stores the position and size of
the bouncing box that would be painted for the current animation index
in
r and returns r . | |||||||||||
Returns the length
of the "bouncing box" to be painted.
| |||||||||||
All purpose paint method that should do the right thing for almost
all linear, determinate progress bars.
| |||||||||||
All purpose paint method that should do the right thing for all
linear bouncing-box progress bars.
| |||||||||||
Sets the index of the current animation frame
to the specified value and requests that the
progress bar be repainted.
|
[Expand]
Inherited Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
From class
javax.swing.plaf.basic.BasicProgressBarUI
| |||||||||||
From class
javax.swing.plaf.ComponentUI
| |||||||||||
From class
java.lang.Object
|
Returns the baseline.
c | JComponent baseline is being requested for |
---|---|
width | the width to get the baseline for |
height | the height to get the baseline for |
Stores the position and size of
the bouncing box that would be painted for the current animation index
in r
and returns r
.
Subclasses that add to the painting performed
in this class's implementation of paintIndeterminate
--
to draw an outline around the bouncing box, for example --
can use this method to get the location of the bouncing
box that was just painted.
By overriding this method,
you have complete control over the size and position
of the bouncing box,
without having to reimplement paintIndeterminate
.
r | the Rectangle instance to be modified;
may be null |
---|
null
if no box should be drawn;
otherwise, returns the passed-in rectangle
(if non-null)
or a new rectangleReturns the length
of the "bouncing box" to be painted.
This method is invoked by the
default implementation of paintIndeterminate
to get the width (if the progress bar is horizontal)
or height (if vertical) of the box.
For example:
boxRect.width = getBoxLength(componentInnards.width, componentInnards.height);
availableLength | the amount of space available for the bouncing box to move in; for a horizontal progress bar, for example, this should be the inside width of the progress bar (the component width minus borders) |
---|---|
otherDimension | for a horizontal progress bar, this should be the inside height of the progress bar; this value might be used to constrain or determine the return value |
availableLength
All purpose paint method that should do the right thing for almost all linear, determinate progress bars. By setting a few values in the defaults table, things should work just fine to paint your progress bar. Naturally, override this if you are making a circular or semi-circular progress bar.
All purpose paint method that should do the right thing for all linear bouncing-box progress bars. Override this if you are making another kind of progress bar.
Sets the index of the current animation frame
to the specified value and requests that the
progress bar be repainted.
Subclasses that don't use the default painting code
might need to override this method
to change the way that the repaint
method
is invoked.
newValue | the new animation index; no checking is performed on its value |
---|