ch.sahits.game.graphic.display.gameplay.internal
Class MarketPlaceScenehandler

java.lang.Object
  extended by ch.sahits.game.graphic.display.gameplay.internal.AbstractSceneHandler
      extended by ch.sahits.game.graphic.display.gameplay.internal.MarketPlaceScenehandler
All Implemented Interfaces:
ISceneHandler

public class MarketPlaceScenehandler
extends AbstractSceneHandler

Scene handler that handles the market place related scenes

Author:
Andi Hotz, (c) Sahits GmbH, 2012 Created on Jul 17, 2012

Field Summary
private static org.apache.log4j.Logger logger
           
private static String[] polyNames
           
 
Fields inherited from class ch.sahits.game.graphic.display.gameplay.internal.AbstractSceneHandler
imageUtils, polygons, scaleMap, SCENE_IMAGE_NAME, xmlLoader
 
Constructor Summary
MarketPlaceScenehandler(Rectangle parentBounds, IDataImageLoader xmlLoader, DisplayImageDIResolver resolver)
           
 
Method Summary
 void displayConsumtionProductionDialog(CityPlayerProxy city, IUpdatableDialog dialogUpdater)
          Display the consumption and production dialog
 void displayTradingStockdialog(CityPlayerProxy city, IUpdatableDialog dialogUpdater)
          Display the trading stock dialog
 BufferedImage init(DisplayImageDIResolver resolver)
          Initialize the images and polygons of the scene
 void updateScene(Event e, Object eventNotice, CityPlayerProxy city, IUpdatableDialog dialogUpdater)
          Update the scene based on an event.
 
Methods inherited from class ch.sahits.game.graphic.display.gameplay.internal.AbstractSceneHandler
findPolygon, getBounds, getImage, initPolygons
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

logger

private static final org.apache.log4j.Logger logger

polyNames

private static final String[] polyNames
Constructor Detail

MarketPlaceScenehandler

public MarketPlaceScenehandler(Rectangle parentBounds,
                               IDataImageLoader xmlLoader,
                               DisplayImageDIResolver resolver)
Method Detail

init

public BufferedImage init(DisplayImageDIResolver resolver)
Description copied from interface: ISceneHandler
Initialize the images and polygons of the scene

Parameters:
resolver - to be used to load the images
Returns:
Buffered image that is initialized as the scene.

updateScene

public void updateScene(Event e,
                        Object eventNotice,
                        CityPlayerProxy city,
                        IUpdatableDialog dialogUpdater)
Description copied from interface: ISceneHandler
Update the scene based on an event. This method allows the gameUpdate method of MainView to delegate the responsability, as the inner working of the scene is unknown to the MainView


displayTradingStockdialog

public void displayTradingStockdialog(CityPlayerProxy city,
                                      IUpdatableDialog dialogUpdater)
Display the trading stock dialog

Parameters:
city -
dialogUpdater -

displayConsumtionProductionDialog

public void displayConsumtionProductionDialog(CityPlayerProxy city,
                                              IUpdatableDialog dialogUpdater)
Display the consumption and production dialog

Parameters:
city -
dialogUpdater -


Copyright © 2011-2012 Sahits GmbH. All Rights Reserved.