com.croftsoft.core.animation.sprite
Class IconSprite

java.lang.Object
  extended by com.croftsoft.core.animation.sprite.AbstractSprite
      extended by 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

Field Summary
 
Fields inherited from class com.croftsoft.core.animation.sprite.AbstractSprite
componentPainter, componentUpdater, heading, velocity, x, y, z
 
Constructor Summary
IconSprite(double x, double y, double z, double heading, double velocity, ComponentUpdater componentUpdater, Icon icon)
           
IconSprite(Icon icon)
           
 
Method Summary
 void getCollisionBounds(Rectangle collisionBounds)
           
 Shape getCollisionShape()
           
 Icon getIcon()
           
 void getPaintBounds(Rectangle paintBounds)
           
 void paint(JComponent component, Graphics2D graphics)
           
 void setIcon(Icon icon)
           
 void setX(double x)
           
 void setY(double y)
           
 
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
 

Constructor Detail

IconSprite

public IconSprite(double x,
                  double y,
                  double z,
                  double heading,
                  double velocity,
                  ComponentUpdater componentUpdater,
                  Icon icon)

IconSprite

public IconSprite(Icon icon)
Method Detail

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 Javadoc

CroftSoft Core Javadoc (2008-09-28 20:58:02)