com.croftsoft.core.animation.sprite
Class TextSprite

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

Field Summary
 
Fields inherited from class com.croftsoft.core.animation.sprite.AbstractSprite
componentPainter, componentUpdater, heading, velocity, x, y, z
 
Constructor Summary
TextSprite(double x, double y, double z, double heading, double velocity, ComponentUpdater componentUpdater, String text, Font font, Color color)
           
TextSprite(String text)
           
 
Method Summary
 Shape getCollisionShape()
           
 Color getColor()
           
 Font getFont()
           
 void getPaintBounds(Rectangle paintBounds)
           
 String getText()
           
 void paint(JComponent component, Graphics2D graphics)
           
 void setBackgroundColor(Color backgroundColor)
           
 void setColor(Color color)
           
 void setFont(Font font)
           
 void setText(String text)
           
 
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
 

Constructor Detail

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)
Method Detail

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 Javadoc

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