public class AquaThrobberUI extends ThrobberUI
![]() |
![]() |
![]() |
On installation: the component's foreground is set to gray, but if that is changed then that color is used to render this animation.
The default period for this animation is 500, but you can modify this with the period client properties ThrobberUI or ThrobberUI.
| Modifier and Type | Field and Description |
|---|---|
static int |
DEFAULT_PERIOD
The number of milliseconds for the default period (500).
|
PERIOD_KEY, PERIOD_MULTIPLIER_KEY, repaintInterval, TIMER_KEY| Constructor and Description |
|---|
AquaThrobberUI()
|
| Modifier and Type | Method and Description |
|---|---|
Color |
getDefaultForeground()
Return the default foreground color for this throbber.
|
Dimension |
getPreferredSize()
|
static void |
paint(Graphics2D
Paints the 12 angular lines in a circle often used to indicate progress in the Aqua interface.
|
void |
paintForeground(Graphics2D
Paints the foreground.
|
createIcon, createUI, getPeriod, getPreferredSize, installUI, paint, paint, paintBackground, uninstallUIcontains, getAccessibleChild, getAccessibleChildrenCount, getBaseline, getBaselineResizeBehavior, getMaximumSize, getMinimumSize, updatepublic static final int DEFAULT_PERIOD
public static void paint(Graphics2Dg, float fraction, Color foreground, int centerX, int centerY, int r1, int r2, float strokeWidth)
It is strongly recommended that you use quality rendering hints (include stroke control) to achieve an aesthetic look.
g - the graphics to paint to
fraction - a fractional value between [0,1] indicating how far the angle has progress. As this value increases the highlighted line segment moves clockwise. The default behavior is for this value to iterate from [0,1] in approximately 1 second.
foreground - the color of the darkest line segment. All other line segments are calculated as translucent shades of this color.
centerX - the x-value of the center of this circle.
centerY - the y-value of the center of this circle.
r1 - the radius of one end point of a line segment in this circle. The default value is 5.
r2 - the radius of the other end point of a line segment in this circle. The default value is 8.
strokeWidth - the width of the stroke. The default value is 1.9f.
public DimensiongetPreferredSize()
public void paintForeground(Graphics2Dg, JComponent jc, Dimension size, Float fixedFraction)
ThrobberUI
size argument (which is the preferred size). So if the preferred size of this ThrobberUI is 16x16, you always paint as if you're painting to a 16x16 area.
paintForeground in class
ThrobberUI
g - the graphics to paint to.
jc - the component to paint, this may be null if used as an Icon.
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).
fixedFraction - an optional fixed fraction from [0, 1] representing the state of this animation. If null: then this should be derived from the current time.
public ColorgetDefaultForeground()
ThrobberUI
installUI() this will be assigned as the new foreground color.