public class BasicSpinningProgressBarUI extends SpinningProgressBarUI
The arrows are painted in the component's foreground color. (When this UI is installed the component's foreground color is set to Color.darkGray.)
Also the arrows will complete a full revolution in 2000 milliseconds. You can change this rate with the client property "period". This is the length (in milliseconds) this UI takes to complete a full cycle.
SpinningProgressBarUI.RepaintListener
Modifier and Type | Field and Description |
---|---|
static java.lang.Long |
DEFAULT_PERIOD
The default duration (in ms) it takes to complete a cycle.
|
isMac
Constructor and Description |
---|
BasicSpinningProgressBarUI() |
Modifier and Type | Method and Description |
---|---|
void |
installUI(javax.swing.JComponent c)
Sets up the timer and
ChangeListener to make sure this
idler repaints appropriately. |
protected void |
paintForeground(java.awt.Graphics2D g,
javax.swing.JComponent jc,
java.awt.Dimension size)
Paints the foreground
|
create, getMaximumSize, getMinimumSize, getPreferredSize, getRepaintDelay, paint, paintBackground, uninstallUI
public static final java.lang.Long DEFAULT_PERIOD
protected void paintForeground(java.awt.Graphics2D g, javax.swing.JComponent jc, java.awt.Dimension size)
SpinningProgressBarUI
paintForeground
in class SpinningProgressBarUI
g
- the graphics to paint to.jc
- the component to paint.size
- the dimensions to paint to.
Assume these are the dimensions of the component you
are painting (the Graphics2D has been transformed to
work within these dimensions).public void installUI(javax.swing.JComponent c)
SpinningProgressBarUI
ChangeListener
to make sure this
idler repaints appropriately.installUI
in class SpinningProgressBarUI