public abstract class SpinningProgressBarUI
extends javax.swing.plaf.ProgressBarUI
| Modifier and Type | Class and Description |
|---|---|
(package private) static class |
SpinningProgressBarUI.RepaintListener |
| Modifier and Type | Field and Description |
|---|---|
static boolean |
isMac |
| Constructor and Description |
|---|
SpinningProgressBarUI() |
| Modifier and Type | Method and Description |
|---|---|
static javax.swing.JProgressBar |
create()
Creates a spinning progress bar.
|
java.awt.Dimension |
getMaximumSize(javax.swing.JComponent c) |
java.awt.Dimension |
getMinimumSize(javax.swing.JComponent c) |
java.awt.Dimension |
getPreferredSize(javax.swing.JComponent c) |
int |
getRepaintDelay()
Returns the number of milliseconds between
calls to repaint.
|
void |
installUI(javax.swing.JComponent c)
Sets up the timer and
ChangeListener to make sure this
idler repaints appropriately. |
void |
paint(java.awt.Graphics g0,
javax.swing.JComponent jc) |
protected void |
paintBackground(java.awt.Graphics2D g,
javax.swing.JComponent jc) |
protected abstract void |
paintForeground(java.awt.Graphics2D g,
javax.swing.JComponent jc,
java.awt.Dimension size)
Paints the foreground
|
void |
uninstallUI(javax.swing.JComponent c)
Disarms the timer and removes the
ChangeListener |
public static javax.swing.JProgressBar create()
public int getRepaintDelay()
This should be a fixed value that does not change.
public java.awt.Dimension getMaximumSize(javax.swing.JComponent c)
getMaximumSize in class javax.swing.plaf.ComponentUIgetPreferredSize(c)public java.awt.Dimension getMinimumSize(javax.swing.JComponent c)
getMinimumSize in class javax.swing.plaf.ComponentUIgetPreferredSize(c)public java.awt.Dimension getPreferredSize(javax.swing.JComponent c)
getPreferredSize in class javax.swing.plaf.ComponentUIpublic void installUI(javax.swing.JComponent c)
ChangeListener to make sure this
idler repaints appropriately.installUI in class javax.swing.plaf.ComponentUIpublic void paint(java.awt.Graphics g0,
javax.swing.JComponent jc)
paint in class javax.swing.plaf.ComponentUIprotected void paintBackground(java.awt.Graphics2D g,
javax.swing.JComponent jc)
protected abstract void paintForeground(java.awt.Graphics2D g,
javax.swing.JComponent jc,
java.awt.Dimension size)
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 uninstallUI(javax.swing.JComponent c)
ChangeListeneruninstallUI in class javax.swing.plaf.ComponentUI