ch.sahits.game.graphic.display.gameplay
Class OpenPatricianGameDialog

java.lang.Object
  extended by ch.sahits.game.graphic.display.gameplay.OpenPatricianGameDialog
Direct Known Subclasses:
TradeDialog

public abstract class OpenPatricianGameDialog
extends Object

This is a dialog that renderes a wooden frame with an inlaid parchment at a given position. Based on what the dialog represents the subclass may implement a RenderablePart.

Author:
Andi Hotz, (c) Sahits GmbH, 2011 Created on Nov 18, 2011

Nested Class Summary
protected static class OpenPatricianGameDialog.CloseAction
           
 
Field Summary
private  Rectangle bounds
          Top left corner of the frame
private  BufferedImage img
          Frame that is rendered
private  Insets inset
           
protected  ch.sahits.game.graphic.image.ImagesLoader loader
           
 
Constructor Summary
OpenPatricianGameDialog(Point topLeft, ch.sahits.game.graphic.image.ImagesLoader loader, double scale)
           
 
Method Summary
 void gameRender(Graphics gScr)
           
 Rectangle getBounds()
           
 Insets getInset()
          Retrieve the insets of the dialog border
protected  BufferedImage initBackgroundImage(ch.sahits.game.graphic.image.ImagesLoader loader, Point topLeft)
          Initialize the background image that is stored as a reference.
protected  void initiatePolygons()
          Instanciate the any polygon member variables
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

img

private final BufferedImage img
Frame that is rendered


bounds

private final Rectangle bounds
Top left corner of the frame


inset

private final Insets inset

loader

protected ch.sahits.game.graphic.image.ImagesLoader loader
Constructor Detail

OpenPatricianGameDialog

public OpenPatricianGameDialog(Point topLeft,
                               ch.sahits.game.graphic.image.ImagesLoader loader,
                               double scale)
Method Detail

initiatePolygons

protected void initiatePolygons()
Instanciate the any polygon member variables


initBackgroundImage

protected BufferedImage initBackgroundImage(ch.sahits.game.graphic.image.ImagesLoader loader,
                                            Point topLeft)
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.

Parameters:
loader - ImageLoader to retrieve images
Returns:
Image that will be stored as background

getBounds

public final Rectangle getBounds()

gameRender

public void gameRender(Graphics gScr)

getInset

public Insets getInset()
Retrieve the insets of the dialog border

Returns:


Copyright © 2011 Sahits GmbH. All Rights Reserved.