|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.b3dgs.lionengine.game.AbstractRessourcesHandler<Type>
Type
- type of handled ressource.public abstract class AbstractRessourcesHandler<Type>
This class is designed to store original instance of objects, which are going to be duplicated by sharing one or many data. The best example is for AnimatedSprite based object (player, monsters...), which share the same animation surface.
Constructor Summary | |
---|---|
AbstractRessourcesHandler()
Create a new ressources handler. |
Method Summary | |
---|---|
void |
add(java.lang.String id,
MediaRessource<Type> rsc)
Store ressource reference at specified id. |
MediaRessource<Type> |
get(java.lang.String id)
Get ressource reference from its id. |
java.awt.image.BufferedImage |
getImage(java.lang.String filename,
boolean alpha)
Get an image from its name. |
void |
remove(java.lang.String id)
Remove a ressource from its id. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public AbstractRessourcesHandler()
Method Detail |
---|
public void add(java.lang.String id, MediaRessource<Type> rsc)
id
- ressourece key id.rsc
- ressource reference.public MediaRessource<Type> get(java.lang.String id)
id
- ressource id.
public void remove(java.lang.String id)
id
- ressource id.public java.awt.image.BufferedImage getImage(java.lang.String filename, boolean alpha)
filename
- image file name.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |