com.croftsoft.core.animation.sprite
Class TextSprite
java.lang.Object
com.croftsoft.core.animation.sprite.AbstractSprite
com.croftsoft.core.animation.sprite.TextSprite
- All Implemented Interfaces:
- ComponentAnimator, ComponentPainter, ComponentUpdater, Sprite
public class TextSprite
- extends AbstractSprite
A Sprite implementation that paints text.
- Since:
- 2002-03-07
- Version:
- 2003-07-11
- Author:
- David Wallace Croft
Methods inherited from class com.croftsoft.core.animation.sprite.AbstractSprite |
getCollisionBounds, getHeading, getVelocity, getX, getY, getZ, setComponentPainter, setComponentUpdater, setHeading, setVelocity, setX, setY, setZ, update |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
TextSprite
public TextSprite(double x,
double y,
double z,
double heading,
double velocity,
ComponentUpdater componentUpdater,
String text,
Font font,
Color color)
TextSprite
public TextSprite(String text)
getCollisionShape
public Shape getCollisionShape()
getPaintBounds
public void getPaintBounds(Rectangle paintBounds)
getText
public String getText()
getFont
public Font getFont()
getColor
public Color getColor()
setBackgroundColor
public void setBackgroundColor(Color backgroundColor)
setText
public void setText(String text)
setFont
public void setFont(Font font)
setColor
public void setColor(Color color)
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)