com.croftsoft.core.animation.sprite
Class IconSprite
java.lang.Object
com.croftsoft.core.animation.sprite.AbstractSprite
com.croftsoft.core.animation.sprite.IconSprite
- All Implemented Interfaces:
- ComponentAnimator, ComponentPainter, ComponentUpdater, Sprite
public class IconSprite
- extends AbstractSprite
A Sprite implementation backed by an Icon.
- Since:
- 2002-03-06
- Version:
- 2002-07-11
- Author:
- David Wallace Croft
Methods inherited from class com.croftsoft.core.animation.sprite.AbstractSprite |
getHeading, getVelocity, getX, getY, getZ, setComponentPainter, setComponentUpdater, setHeading, setVelocity, setZ, update |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
IconSprite
public IconSprite(double x,
double y,
double z,
double heading,
double velocity,
ComponentUpdater componentUpdater,
Icon icon)
IconSprite
public IconSprite(Icon icon)
getIcon
public Icon getIcon()
getCollisionShape
public Shape getCollisionShape()
getCollisionBounds
public void getCollisionBounds(Rectangle collisionBounds)
- Specified by:
getCollisionBounds
in interface Sprite
- Overrides:
getCollisionBounds
in class AbstractSprite
getPaintBounds
public void getPaintBounds(Rectangle paintBounds)
setX
public void setX(double x)
- Specified by:
setX
in interface Sprite
- Overrides:
setX
in class AbstractSprite
setY
public void setY(double y)
- Specified by:
setY
in interface Sprite
- Overrides:
setY
in class AbstractSprite
setIcon
public void setIcon(Icon icon)
paint
public void paint(JComponent component,
Graphics2D graphics)
- Specified by:
paint
in interface ComponentPainter
- Overrides:
paint
in class AbstractSprite
CroftSoft Core Javadoc (2008-09-28 20:58:02)