|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectsprite.Sprite
public abstract class Sprite
Last updated September 21, 2006
The base sprite bean. All other sprites inherit this class.
Establishes basic sprite properties common to all sprites.
| Field Summary | |
|---|---|
protected boolean |
active
Whether the sprite is active or not. |
protected boolean |
visible
Whether the sprite is visible or not. |
| Constructor Summary | |
|---|---|
Sprite()
Creates a new sprite. |
|
| Method Summary | |
|---|---|
void |
addPropertyChangeListener(java.beans.PropertyChangeListener listener)
Adds the property change listener. |
java.beans.PropertyChangeSupport |
getPropertySupport()
Gets the property change support. |
boolean |
isActive()
Gets the active status of the sprite. |
boolean |
isVisible()
Gets the visiblity of the sprite. |
abstract void |
paintSprite(java.awt.Graphics2D g)
abstract paint method. |
void |
removePropertyChangeListener(java.beans.PropertyChangeListener listener)
Removes the property change listener. |
void |
restore()
Restores the sprite. |
void |
setActive(boolean active)
Sets the active status of the sprite. |
void |
setVisible(boolean visible)
Sets the visibility of the sprite. |
void |
suspend()
Stops the sprite. |
abstract void |
updateSprite(java.awt.Component c)
abstract updateSprite. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
protected boolean visible
protected boolean active
| Constructor Detail |
|---|
public Sprite()
| Method Detail |
|---|
public abstract void paintSprite(java.awt.Graphics2D g)
g - The graphics to paint with.public abstract void updateSprite(java.awt.Component c)
c - The owner of the sprite.public void addPropertyChangeListener(java.beans.PropertyChangeListener listener)
listener - The new listener.public void removePropertyChangeListener(java.beans.PropertyChangeListener listener)
listener - The listener to remove.public java.beans.PropertyChangeSupport getPropertySupport()
public void suspend()
public void restore()
public boolean isVisible()
public void setVisible(boolean visible)
visible - Whether the sprite is visible or not.public boolean isActive()
public void setActive(boolean active)
active - Whether the sprite is active or not.
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||