|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectch.sahits.game.graphic.display.dialog.OpenPatricianGameDialog
ch.sahits.game.graphic.display.dialog.TradingOfficeBalanceDialog
public class TradingOfficeBalanceDialog
| Nested Class Summary | |
|---|---|
private static class |
TradingOfficeBalanceDialog.DialogPositions
This class holds the positions where different elements are placed on the dialog. |
| Nested classes/interfaces inherited from class ch.sahits.game.graphic.display.dialog.OpenPatricianGameDialog |
|---|
OpenPatricianGameDialog.CloseAction |
| Field Summary | |
|---|---|
private boolean |
enabled
|
private ClickablePolygons |
footerPolygons
|
private IImageUtilities |
imageUtils
reference to the utilities for image manipulation |
private IOpenPatricianPainter |
opPainter
|
private TradingOfficeBalanceDialog.DialogPositions |
positions
Hold all the positioning information, initialized in initBackgroundImage |
| Fields inherited from class ch.sahits.game.graphic.display.dialog.OpenPatricianGameDialog |
|---|
city, inset, loader |
| Constructor Summary | |
|---|---|
TradingOfficeBalanceDialog(Point topLeft,
double scale,
CityPlayerProxy cityProxy)
|
|
| Method Summary | |
|---|---|
private void |
drawBalanceRow(Graphics2D g2d,
BufferedImage coin,
int y,
int lastWeek,
int forcaset)
Draw the balance line with the last weeks values and the forcast values |
private void |
drawBalanceRow(Graphics2D g2d,
int y,
int amount,
int people,
int maxPeople,
String label)
|
private void |
drawBalanceSum(Graphics2D g2d,
ITradingOffice office,
BufferedImage coin,
int y)
Draw the balance line summing up |
private void |
drawOfficeTradeing(Graphics2D g2d,
ITradingOffice office,
BufferedImage coin,
int y)
Draw the balance line for the office traiding |
private void |
drawOtherCosts(Graphics2D g2d,
ITradingOffice office,
BufferedImage coin,
int y)
Draw the balance line for other costs |
private void |
drawPropertyTax(Graphics2D g2d,
ITradingOffice office,
BufferedImage coin,
int y)
Draw the balance line for the property taxes |
private void |
drawRentalIncome(Graphics2D g2d,
ITradingOffice office,
BufferedImage coin,
int y)
Draw the balance line for the rental income |
private int |
drawRow(Graphics2D g2d,
int y,
int leftBorder,
String text)
Draw a text string at a defined position. |
private void |
drawStewardCosts(Graphics2D g2d,
ITradingOffice office,
BufferedImage coin,
int y)
Draw the balance line for the steward costs |
private void |
drawTableHeader(Graphics2D g2d,
int y)
Draw the table header |
private void |
drawWageCosts(Graphics2D g2d,
ITradingOffice office,
BufferedImage coin,
int y)
Draw the balance line for the wage costs |
void |
gameRender(Graphics gScr)
|
void |
gameUpdate(Event e,
Object notice)
|
protected void |
init()
Initialize class specific stuff which might be need later in the initialisation |
protected BufferedImage |
initBackgroundImage(IImageLoader loader,
Point topLeft)
Initialize the background image that is stored as a reference. |
protected void |
initiatePolygons()
Instanciate the any polygon member variables. |
boolean |
isEnabled()
|
void |
setEnabled(boolean flag)
|
| Methods inherited from class ch.sahits.game.graphic.display.dialog.OpenPatricianGameDialog |
|---|
getBounds, getInset, initInsets |
| 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.rendering.RenderablePart |
|---|
getBounds |
| Field Detail |
|---|
private IImageUtilities imageUtils
private IOpenPatricianPainter opPainter
private boolean enabled
private ClickablePolygons footerPolygons
private TradingOfficeBalanceDialog.DialogPositions positions
| Constructor Detail |
|---|
public TradingOfficeBalanceDialog(Point topLeft,
double scale,
CityPlayerProxy cityProxy)
| Method Detail |
|---|
protected void init()
OpenPatricianGameDialog
init in class OpenPatricianGameDialogprotected void initiatePolygons()
OpenPatricianGameDialog
initiatePolygons in class OpenPatricianGameDialogpublic boolean isEnabled()
isEnabled in interface Renderablepublic void setEnabled(boolean flag)
setEnabled in interface Renderable
public void gameUpdate(Event e,
Object notice)
gameUpdate in interface IEventListenergameUpdate in interface Renderable
private void drawTableHeader(Graphics2D g2d,
int y)
throws FontFormatException,
IOException
g2d - y - position of the table header baseline
FontFormatException
IOException
private int drawRow(Graphics2D g2d,
int y,
int leftBorder,
String text)
throws FontFormatException,
IOException
g2d - Graphic contexty - positionleftBorder - left insettext - to be drawn
FontFormatException
IOException
protected BufferedImage initBackgroundImage(IImageLoader loader,
Point topLeft)
OpenPatricianGameDialog
initBackgroundImage in class OpenPatricianGameDialogloader - ImageLoader to retrieve images
public void gameRender(Graphics gScr)
gameRender in interface RenderablegameRender in class OpenPatricianGameDialog
private void drawBalanceRow(Graphics2D g2d,
int y,
int amount,
int people,
int maxPeople,
String label)
throws FontFormatException,
IOException
FontFormatException
IOException
private void drawBalanceSum(Graphics2D g2d,
ITradingOffice office,
BufferedImage coin,
int y)
throws FontFormatException,
IOException
g2d - Graphic contextoffice - Trading office instancecoin - imagey - position
FontFormatException
IOException
private void drawOtherCosts(Graphics2D g2d,
ITradingOffice office,
BufferedImage coin,
int y)
throws FontFormatException,
IOException
g2d - Graphic contextoffice - Trading office instancecoin - imagey - position
IOException
FontFormatException
private void drawStewardCosts(Graphics2D g2d,
ITradingOffice office,
BufferedImage coin,
int y)
throws FontFormatException,
IOException
g2d - Graphic contextoffice - Trading office instancecoin - imagey - position
FontFormatException
IOException
private void drawOfficeTradeing(Graphics2D g2d,
ITradingOffice office,
BufferedImage coin,
int y)
throws FontFormatException,
IOException
g2d - Graphic contextoffice - Trading office instancecoin - imagey - position
IOException
FontFormatException
private void drawPropertyTax(Graphics2D g2d,
ITradingOffice office,
BufferedImage coin,
int y)
throws FontFormatException,
IOException
g2d - Graphic contextoffice - Trading office instancecoin - imagey - position
FontFormatException
IOException
private void drawWageCosts(Graphics2D g2d,
ITradingOffice office,
BufferedImage coin,
int y)
throws FontFormatException,
IOException
g2d - Graphic contextoffice - Trading office instancecoin - imagey - position
FontFormatException
IOException
private void drawRentalIncome(Graphics2D g2d,
ITradingOffice office,
BufferedImage coin,
int y)
throws FontFormatException,
IOException
g2d - Graphic contextoffice - Trading office instancecoin - imagey - position
FontFormatException
IOException
private void drawBalanceRow(Graphics2D g2d,
BufferedImage coin,
int y,
int lastWeek,
int forcaset)
throws FontFormatException,
IOException
g2d - Graphic contextcoin - imagey - positionlastWeek - value of the last weekforcaset - valeu forcast of the current week
FontFormatException
IOException
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||