|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectch.sahits.game.graphic.display.gameplay.OpenPatricianGameDialog
ch.sahits.game.graphic.display.gameplay.TradeDialog
public class TradeDialog
Trade dialog for buying/selling from/to the city involving either a ship or the branch office.
| Nested Class Summary | |
|---|---|
private class |
TradeDialog.City2ShipAction
Action of buying stuff from the city onto the ship |
private static class |
TradeDialog.DialogPositions
This class holds the positions where different elements are placed on the dialog. |
private static class |
TradeDialog.ETransferAmount
Enumeration over the transferable amount |
private class |
TradeDialog.Ship2CityAction
Action of selling stuff to the city from the ship |
private class |
TradeDialog.TransferAmountChangeAction
Action to change the chunck size that is to be moved. |
| Nested classes/interfaces inherited from class ch.sahits.game.graphic.display.gameplay.OpenPatricianGameDialog |
|---|
OpenPatricianGameDialog.CloseAction |
| Field Summary | |
|---|---|
private CityPlayerProxy |
city
Reference to the city view model |
private boolean |
enabled
|
private ClickablePolygons |
footerPolygons
|
private TradeDialog.ETransferAmount |
movableAmount
The amount that is moved with one click |
private ClickablePolygons |
polygons
|
private TradeDialog.DialogPositions |
positions
Hold all the positiononing information, initialized in initBackgroundImage |
| Fields inherited from class ch.sahits.game.graphic.display.gameplay.OpenPatricianGameDialog |
|---|
loader |
| Constructor Summary | |
|---|---|
TradeDialog(Point topLeft,
ch.sahits.game.graphic.image.ImagesLoader loader,
double scale,
CityPlayerProxy CityPlayerProxy)
|
|
| Method Summary | |
|---|---|
void |
gameRender(Graphics gScr)
|
void |
gameUpdate(ch.sahits.game.event.Event e,
Object notice)
|
private int |
getAmount(int maxMount)
Retrieve the amount that is to be transferred. |
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 |
boolean |
isEnabled()
|
void |
setEnabled(boolean flag)
|
| Methods inherited from class ch.sahits.game.graphic.display.gameplay.OpenPatricianGameDialog |
|---|
getBounds, getInset |
| 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 boolean enabled
private final CityPlayerProxy city
private TradeDialog.ETransferAmount movableAmount
private ClickablePolygons polygons
private ClickablePolygons footerPolygons
private TradeDialog.DialogPositions positions
| Constructor Detail |
|---|
public TradeDialog(Point topLeft,
ch.sahits.game.graphic.image.ImagesLoader loader,
double scale,
CityPlayerProxy CityPlayerProxy)
| Method Detail |
|---|
protected void initiatePolygons()
OpenPatricianGameDialog
initiatePolygons in class OpenPatricianGameDialogprivate int getAmount(int maxMount)
maxMount -
public void gameUpdate(ch.sahits.game.event.Event e,
Object notice)
gameUpdate in interface ch.sahits.game.event.IEventListenergameUpdate in interface ch.sahits.game.rendering.Renderablepublic boolean isEnabled()
isEnabled in interface ch.sahits.game.rendering.Renderablepublic void setEnabled(boolean flag)
setEnabled in interface ch.sahits.game.rendering.Renderable
protected BufferedImage initBackgroundImage(ch.sahits.game.graphic.image.ImagesLoader loader,
Point topLeft)
OpenPatricianGameDialog
initBackgroundImage in class OpenPatricianGameDialogloader - ImageLoader to retrieve images
public void gameRender(Graphics gScr)
gameRender in interface ch.sahits.game.rendering.RenderablegameRender in class OpenPatricianGameDialog
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||