public class ChasingArrowsThrobberUI extends ThrobberUI
ThrobberUI of two arrows that rotate clockwise.
![]() |
![]() |
![]() |
On installation: the component's foreground is set to dark gray, but if that is changed then that color is used to render this animation.
The default period for this animation is 2000, but you can modify this with the period client properties ThrobberUI or ThrobberUI.
| Modifier and Type | Field and Description |
|---|---|
static int |
DEFAULT_PERIOD
The default duration (in ms) it takes to complete a cycle.
|
PERIOD_KEY, PERIOD_MULTIPLIER_KEY, repaintInterval, TIMER_KEY| Constructor and Description |
|---|
ChasingArrowsThrobberUI()
|
| Modifier and Type | Method and Description |
|---|---|
Color |
getDefaultForeground()
Return the default foreground color for this throbber.
|
Dimension |
getPreferredSize()
|
protected 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
protected 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 DimensiongetPreferredSize()
public ColorgetDefaultForeground()
ThrobberUI
installUI() this will be assigned as the new foreground color.