|
Genuts API | ||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
Defines an interface for classes that know how to paint sprites.
A display manager can manage only one playfield.
PlayField
Method Summary | |
void |
addSprite(Sprite sprite)
Adds a sprite in the display list of this display manager. |
void |
drawDebug(java.awt.Graphics g)
Draws debug informations for this display manager. |
PlayField |
getPlayfield()
Returns the playfield associated with this display manager. |
void |
invalidateSprite(Sprite sprite)
Performs actions when a sprite is invalidate. |
void |
paint(java.awt.Graphics g)
Displays all visible elements of the playfield. |
void |
playfieldSizeChanged()
Informs that the size of the playfield has changed. |
void |
removeSprite(Sprite sprite)
Removes a sprite from the display list of this display manager. |
void |
reset()
Resets cache datas for this CollisionManager. |
void |
setPlayfield(PlayField playfield)
Sets the playfield associated with this display manager. |
void |
validateSprite(Sprite sprite)
Performs actions when a sprite is validate. |
Method Detail |
public PlayField getPlayfield()
public void setPlayfield(PlayField playfield)
playfield
- The playfield associated with this display manager.public void playfieldSizeChanged()
public void reset()
public void addSprite(Sprite sprite)
Generally, this is called by the playfield when a new sprite is added.
sprite
- Sprite to addpublic void removeSprite(Sprite sprite)
Generally, this is called by the playfield when a sprite is removed.
sprite
- Sprite to removepublic void invalidateSprite(Sprite sprite)
Generally, this is called by a sprite when Sprite.invalidate() is called.
sprite
- Sprite to invalidate.Sprite.invalidate()
public void validateSprite(Sprite sprite)
Generally, this is called by a sprite when Sprite.validate() is called.
sprite
- Sprite to validate.Sprite.validate()
public void paint(java.awt.Graphics g)
For the playfield, calls the method paintPlayField(Graphics).
For each sprite, calls the method paint(Graphics).
g
- The graphics context to use for painting.PlayField.paintPlayField(Graphics)
,
Sprite.paint(Graphics)
public void drawDebug(java.awt.Graphics g)
g
- The graphics context to use for painting.
|
Genuts API | ||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |