|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectch.sahits.game.graphic.display.gameplay.internal.AbstractSceneHandler
abstract class AbstractSceneHandler
This abstract class provides base functionallyty for loading and initializing a scene as well as doing stuff on that scene
| Field Summary | |
|---|---|
protected IImageUtilities |
imageUtils
|
private static org.apache.log4j.Logger |
logger
|
protected Map<Integer,NamedPolygon> |
polygons
Store the polygons for checking against clicking them Using a TreeMap so it may be possible do define polygons that cover the same are but in a different z-order. |
private Rectangle |
rect
|
protected Map<String,Double> |
scaleMap
This map holds the scaling factor for the different images |
protected String |
SCENE_IMAGE_NAME
Name of the image for this scene |
protected IDataImageLoader |
xmlLoader
Loader for data from the XML |
| Constructor Summary | |
|---|---|
AbstractSceneHandler(Rectangle parentBounds,
IDataImageLoader xmlLoader,
DisplayImageDIResolver resolver,
String imageName)
|
|
| Method Summary | |
|---|---|
protected String |
findPolygon(int x,
int y)
Find the polygon name that contains the coordinates. |
protected Rectangle |
getBounds()
|
BufferedImage |
getImage()
Retrieve the image that is cached with this handler |
protected void |
initPolygons(DisplayImageDIResolver resolver,
ImageData imgData,
ImageScaleState state,
Point offset)
Setting the positions of the polygons on the screen |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Methods inherited from interface ch.sahits.game.graphic.display.gameplay.internal.ISceneHandler |
|---|
init, updateScene |
| Field Detail |
|---|
private static final org.apache.log4j.Logger logger
protected Map<Integer,NamedPolygon> polygons
protected final Map<String,Double> scaleMap
protected final IDataImageLoader xmlLoader
protected final IImageUtilities imageUtils
private final Rectangle rect
protected final String SCENE_IMAGE_NAME
| Constructor Detail |
|---|
public AbstractSceneHandler(Rectangle parentBounds,
IDataImageLoader xmlLoader,
DisplayImageDIResolver resolver,
String imageName)
| Method Detail |
|---|
protected String findPolygon(int x,
int y)
x - coordinatey - coordinate
protected void initPolygons(DisplayImageDIResolver resolver,
ImageData imgData,
ImageScaleState state,
Point offset)
protected Rectangle getBounds()
public BufferedImage getImage()
getImage in interface ISceneHandler
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||