ch.sahits.game.graphic.display.dialog
Class TradingOfficePersonalDialog
java.lang.Object
ch.sahits.game.graphic.display.dialog.OpenPatricianGameDialog
ch.sahits.game.graphic.display.dialog.TradingOfficePersonalDialog
- All Implemented Interfaces:
- IEventListener, Renderable, RenderablePart
public class TradingOfficePersonalDialog
- extends OpenPatricianGameDialog
- implements IEventListener, RenderablePart
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
imageUtils
private IImageUtilities imageUtils
- reference to the utilities for image manipulation
opPainter
private IOpenPatricianPainter opPainter
enabled
private boolean enabled
footerPolygons
private ClickablePolygons footerPolygons
positions
private TradingOfficePersonalDialog.DialogPositions positions
- Hold all the positioning information, initialized in initBackgroundImage
TradingOfficePersonalDialog
public TradingOfficePersonalDialog(Point topLeft,
double scale,
CityPlayerProxy cityProxy)
init
protected void init()
- Description copied from class:
OpenPatricianGameDialog
- Initialize class specific stuff which might be need later in the initialisation
- Overrides:
init in class OpenPatricianGameDialog
initiatePolygons
protected void initiatePolygons()
- Description copied from class:
OpenPatricianGameDialog
- Instanciate the any polygon member variables.
This method is intended to be overriden if the dialog uses polygons.
- Overrides:
initiatePolygons in class OpenPatricianGameDialog
isEnabled
public boolean isEnabled()
- Specified by:
isEnabled in interface Renderable
setEnabled
public void setEnabled(boolean flag)
- Specified by:
setEnabled in interface Renderable
gameUpdate
public void gameUpdate(Event e,
Object notice)
- Specified by:
gameUpdate in interface IEventListener- Specified by:
gameUpdate in interface Renderable
initBackgroundImage
protected BufferedImage initBackgroundImage(IImageLoader loader,
Point topLeft)
- Description copied from class:
OpenPatricianGameDialog
- Initialize the background image that is stored as a reference. This method
should be overridden by any subclass that contains static elements in the dialog.
This implementation returns a copy of the background image stored in the cache, so that
image can be further processed, without inflicting conflicts.
- Overrides:
initBackgroundImage in class OpenPatricianGameDialog
- Parameters:
loader - ImageLoader to retrieve images
- Returns:
- Image that will be stored as background
drawRow
private int drawRow(Graphics2D g2d,
int y,
int leftBorder,
String text)
throws FontFormatException,
IOException
- Draw a text string at a defined position. The Y-position is passed as an argument, updated for the next row
and returned. The X-coordinate is computed from the left border argument and the visual length of the text string
- Parameters:
g2d - Graphic contexty - positionleftBorder - left insettext - to be drawn
- Returns:
- updated y coordinate
- Throws:
FontFormatException
IOException
Copyright © 2011-2012 Sahits GmbH. All Rights Reserved.