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

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

public class PortSceneHandler
extends AbstractSceneHandler

This scene handler handles the port scene related events

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
PortSceneHandler(Rectangle parentBounds, IDataImageLoader xmlLoader, DisplayImageDIResolver resolver)
           
 
Method Summary
 void displayConsumtionProductionDialog(CityPlayerProxy city, IUpdatableDialog dialogUpdater)
          Display the consumption and production dialog
 void displayTradingOfficeBalanceDialog(CityPlayerProxy city, IUpdatableDialog dialogUpdater)
          Display the balance dialog for the trading office
 void displayTradingOfficePersonaldialog(CityPlayerProxy city, IUpdatableDialog dialogUpdater)
          Display ther personal dialog for the trading office
 void displayWareStorageDialog(CityPlayerProxy city, IUpdatableDialog dialogUpdater)
          Display the ware storage dialog
 void displayWeaponStorageDialog(CityPlayerProxy city, IUpdatableDialog dialogUpdater)
          Display the weapon storage 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

PortSceneHandler

public PortSceneHandler(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


displayTradingOfficeBalanceDialog

public void displayTradingOfficeBalanceDialog(CityPlayerProxy city,
                                              IUpdatableDialog dialogUpdater)
Display the balance dialog for the trading office

Parameters:
city -
dialogUpdater -

displayTradingOfficePersonaldialog

public void displayTradingOfficePersonaldialog(CityPlayerProxy city,
                                               IUpdatableDialog dialogUpdater)
Display ther personal dialog for the trading office

Parameters:
city -
dialogUpdater -

displayConsumtionProductionDialog

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

Parameters:
city -
dialogUpdater -

displayWeaponStorageDialog

public void displayWeaponStorageDialog(CityPlayerProxy city,
                                       IUpdatableDialog dialogUpdater)
Display the weapon storage dialog

Parameters:
city -
dialogUpdater -

displayWareStorageDialog

public void displayWareStorageDialog(CityPlayerProxy city,
                                     IUpdatableDialog dialogUpdater)
Display the ware storage dialog

Parameters:
city -
dialogUpdater -


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