|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.croftsoft.core.animation.animator.IconRowAnimator
public final class IconRowAnimator
Displays a quantity as a row of icons.
Useful for display number of remaining lives, ammo, population, etc. If the area to display the icons is too small, the icon spacing will be adjusted so that icons overlap each other to fit.
Constructor Summary | |
---|---|
IconRowAnimator(Icon icon,
int count,
JComponent component)
Draws the icon row at the bottom left of the component. |
|
IconRowAnimator(Icon icon,
int count,
Rectangle rectangle)
Draws the icon row in the rectangle. |
Method Summary | |
---|---|
int |
getCount()
|
Icon |
getIcon()
|
void |
getRectangle(Rectangle rectangle)
|
void |
paint(JComponent component,
Graphics2D graphics)
|
void |
setCount(int count)
|
void |
setIcon(Icon icon)
|
void |
setRectangle(Rectangle rectangle)
|
void |
update(JComponent component)
Updates the state of a JComponent and calls repaint() as required. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public IconRowAnimator(Icon icon, int count, Rectangle rectangle)
public IconRowAnimator(Icon icon, int count, JComponent component)
Method Detail |
---|
public int getCount()
public Icon getIcon()
public void getRectangle(Rectangle rectangle)
public void setCount(int count)
public void setIcon(Icon icon)
public void setRectangle(Rectangle rectangle)
public void update(JComponent component)
ComponentUpdater
update
in interface ComponentUpdater
public void paint(JComponent component, Graphics2D graphics)
paint
in interface ComponentPainter
|
CroftSoft Javadoc | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |