net.sf.freecol.client.gui
Class GUI

java.lang.Object
  extended by net.sf.freecol.client.gui.GUI

public class GUI
extends java.lang.Object


Field Summary
private  Canvas canvas
           
private  MapViewer colonyTileGUI
          This is the MapViewer instance used to paint the colony tiles in the ColonyPanel and other panels.
static java.lang.String COPYRIGHT
           
private static int DEFAULT_WINDOW_SPACE
          The space not being used in windowed mode.
private  javax.swing.JFrame frame
           
private  FreeColClient freeColClient
           
private  java.awt.GraphicsDevice gd
           
private  ImageLibrary imageLibrary
           
static java.lang.String LICENSE
           
private static java.util.logging.Logger logger
           
private  MapViewer mapViewer
           
static java.lang.String REVISION
           
private  SoundPlayer soundPlayer
           
private  javax.swing.JWindow splash
           
private  java.awt.Rectangle windowBounds
           
private  boolean windowed
           
 
Constructor Summary
GUI(FreeColClient freeColClient)
           
 
Method Summary
 void activateGotoPath()
           
 boolean canPlaySound()
          Verifies if the client can play sounds.
 void centerActiveUnit()
           
 void changeWindowedMode(boolean windowed)
          Change the windowed mode.
 void closeMainPanel()
           
 void closeMenus()
           
 void closeStatusPanel()
           
 boolean containsInGameComponents()
           
 java.awt.Dimension determineWindowSize()
           
 void displayChat(java.lang.String senderNme, java.lang.String message, boolean privateChat)
           
 void displayChatMessage(java.lang.String message, boolean privateChat)
          Tells the map controls that a chat message was received.
 void displaySpashScreen(java.lang.String splashFilename)
           
 void errorMessage(java.lang.String messageId)
           
 void errorMessage(java.lang.String messageID, java.lang.String message)
           
 void executeWithUnitOutForAnimation(Unit unit, Tile sourceTile, OutForAnimationCallback r)
           
 Unit getActiveUnit()
           
 Canvas getCanvas()
           
 MapViewer getColonyTileGUI()
           
 int getCurrentViewMode()
           
 Tile getFocus()
           
 javax.swing.ImageIcon getImageIcon(java.lang.Object display, boolean small)
           
 ImageLibrary getImageLibrary()
           
 LoadingSavegameDialog getLoadingSavegameDialog()
           
 float getMapScale()
           
 MapViewer getMapViewer()
           
 Tile getSelectedTile()
           
 SoundPlayer getSoundPlayer()
           
 java.awt.Rectangle getTileBounds(Tile tile)
           
 java.awt.Point getTilePosition(Tile tile)
           
 java.awt.Rectangle getWindowBounds()
           
 void hideSplashScreen()
           
 boolean isClientOptionsDialogShowing()
           
 boolean isMapboardActionsEnabled()
           
 boolean isShowingSubPanel()
           
 boolean isWindowed()
           
 void moveTileCursor(Map.Direction direction)
           
 boolean onScreen(Tile tileToCheck)
           
 void paintImmediatelyCanvasIn(java.awt.Rectangle rectangle)
           
 void paintImmediatelyCanvasInItsBounds()
           
 void playSound(java.lang.String sound)
          Plays some sound.
 void quit()
           
 void refresh()
           
 void refreshPlayersTable()
           
 void refreshTile(Tile t)
          Refreshes the screen at the specified Tile.
 void removeFromCanvas(java.awt.Component component)
           
 void removeInGameComponents()
           
 void requestFocusForSubPanel()
           
 boolean requestFocusInWindow()
           
 void resetMenuBar()
           
 void returnToTitle()
           
 void scaleMap(float delta)
           
 void setActiveUnit(Unit unitToActivate)
           
 void setFocus(Tile tileToFocus)
           
 void setFocusImmediately(Tile tileToFocus)
           
 boolean setSelectedTile(Tile newTileToSelect, boolean clearGoToOrders)
           
 void setupInGameMenuBar()
           
private  void setupMapEditorMenuBar()
           
 void setupMenuBarToNull()
           
private  void setupMouseListenerForMapEditor()
           
 void setUpMouseListenersForCanvas()
           
 void setWindowed(boolean windowed)
           
 void showAboutPanel()
           
 Canvas.ScoutIndianSettlementAction showArmedUnitIndianSettlementDialog(IndianSettlement settlement)
           
 Canvas.BoycottAction showBoycottedGoodsDialog(Goods goods, Europe europe)
           
 void showBuildQueuePanel(Colony colony)
           
 void showBuildQueuePanel(Colony colony, java.lang.Runnable callBack)
           
 Canvas.BuyAction showBuyDialog(Unit unit, Settlement settlement, Goods goods, int gold, boolean canBuy)
           
 java.util.List<Goods> showCaptureGoodsDialog(Unit winner, java.util.List<Goods> loot)
           
 void showChatPanel()
           
<T> T
showChoiceDialog(Tile tile, java.lang.String text, java.lang.String cancelText, java.util.List<ChoiceItem<T>> choices)
           
 Monarch.MonarchAction showChoiceMonarchActionDialog(java.lang.String monarchTitle, java.util.List<ChoiceItem<Monarch.MonarchAction>> actions)
           
 FoundingFather showChooseFoundingFatherDialog(java.util.List<ChoiceItem<FoundingFather>> fathers, java.lang.String fatherTitle)
           
 FoundingFather showChooseFoundingFatherDialog(java.util.List<FoundingFather> ffs)
           
 Canvas.ClaimAction showClaimDialog(Tile tile, Player player, int price, Player owner, boolean canAccept)
           
 OptionGroup showClientOptionsDialog()
           
 ColonyPanel showColonyPanel(Colony colony)
           
 void showColonyPanel(Colony colony, java.lang.Runnable callback)
           
 void showColopediaPanel(java.lang.String nodeId)
           
 void showCompactLabourReport()
           
 void showCompactLabourReport(LabourData.UnitData unitData)
           
 java.util.List<java.lang.String> showConfirmDeclarationDialog()
           
 boolean showConfirmDialog(java.lang.String text, java.lang.String okText, java.lang.String cancelText)
           
 boolean showConfirmDialog(Tile tile, ModelMessage[] messages, java.lang.String okText, java.lang.String cancelText)
           
 boolean showConfirmDialog(Tile tile, StringTemplate text, java.lang.String okText, java.lang.String cancelText)
           
 void showDeclarationDialog()
           
 void showDifficultyDialog()
           
 OptionGroup showDifficultyDialog(Specification specification)
           
 java.util.List<Goods> showDumpCargoDialog(Unit unit)
           
 int showEmigrationPanel(boolean fountainOfYouth)
           
 boolean showEndTurnDialog(java.util.List<Unit> units)
           
 int showEuropeDialog(EuropePanel.EuropeAction europeAction)
           
 void showEuropePanel()
           
 void showEventPanel(Canvas.EventType type)
           
 void showFindSettlementDialog()
           
 void showGameOptionsDialog(boolean editable, boolean loadCustomOptions)
           
 void showHighScoresPanel(java.lang.String messageId)
           
 void showIndianSettlementPanel(IndianSettlement indianSettlement)
           
 Canvas.TradeAction showIndianSettlementTradeDialog(Settlement settlement, boolean canBuy, boolean canSell, boolean canGift)
           
 void showInformationMessage(FreeColObject displayObject, java.lang.String messageId)
           
 void showInformationMessage(FreeColObject displayObject, StringTemplate template)
           
 void showInformationMessage(ModelMessage message)
           
 void showInformationMessage(java.lang.String messageId)
           
 void showInformationMessage(StringTemplate template)
           
 java.lang.String showInputDialog(Tile tile, StringTemplate text, java.lang.String defaultValue, java.lang.String okText, java.lang.String cancelText, boolean rejectEmptyString)
           
 java.io.File showLoadDialog(java.io.File directory)
           
 java.io.File showLoadDialog(java.io.File directory, javax.swing.filechooser.FileFilter[] fileFilters)
           
 boolean showLoadingSavegameDialog(boolean publicServer, boolean singleplayer)
           
 void showLogFilePanel()
           
 void showMainPanel()
           
 OptionGroup showMapGeneratorOptionsDialog(OptionGroup mgo, boolean editable, boolean loadCustomOptions)
           
 java.awt.Dimension showMapSizeDialog()
           
 void showModelMessages(ModelMessage... modelMessages)
           
 boolean showMonarchPanelDialog(Monarch.MonarchAction action, StringTemplate replace)
           
 DiplomaticTrade showNegotiationDialog(Unit unit, Settlement settlement, DiplomaticTrade agreement)
           
 void showNewPanel()
           
 void showNewPanel(Specification specification)
           
 boolean showPreCombatDialog(FreeColGameObject attacker, FreeColGameObject defender, Tile tile)
           
 void showReportCargoPanel()
           
 void showReportColonyPanel()
           
 void showReportContinentalCongressPanel()
           
 void showReportEducationPanel()
           
 void showReportExplorationPanel()
           
 void showReportForeignAffairPanel()
           
 void showReportHistoryPanel()
           
 void showReportIndianPanel()
           
 void showReportLabourPanel()
           
 void showReportMilitaryPanel()
           
 void showReportNavalPanel()
           
 void showReportProductionPanel()
           
 void showReportReligiousPanel()
           
 void showReportRequirementsPanel()
           
 void showReportTradePanel()
           
 void showReportTurnPanel(ModelMessage... messages)
           
 java.io.File showSaveDialog(java.io.File directory, java.lang.String defaultName)
           
 java.io.File showSaveDialog(java.io.File directory, java.lang.String standardName, javax.swing.filechooser.FileFilter[] fileFilters, java.lang.String defaultName)
           
 Canvas.ScoutColonyAction showScoutForeignColonyDialog(Colony colony, Unit unit, boolean canNegotiate)
           
 Canvas.ScoutIndianSettlementAction showScoutIndianSettlementDialog(IndianSettlement settlement, java.lang.String number)
           
 int showSelectAmountDialog(GoodsType goodsType, int available, int defaultAmount, boolean needToPay)
           
 Location showSelectDestinationDialog(Unit unit)
           
 Canvas.SellAction showSellDialog(Unit unit, Settlement settlement, Goods goods, int gold)
           
 void showServerListPanel(java.lang.String username, java.util.ArrayList<ServerInfo> serverList)
           
<T> T
showSimpleChoiceDialog(Tile tile, java.lang.String text, java.lang.String cancelText, java.util.List<T> objects)
           
 void showStartGamePanel(Game game, Player player, boolean singlePlayerMode)
           
 void showStatisticsPanel()
           
 void showStatusPanel(java.lang.String message)
           
 void showTilePanel(Tile tile)
           
 void showTilePopUpAtSelectedTile()
           
 TradeRoute showTradeRouteDialog(TradeRoute tradeRoute, Tile tile)
           
 boolean showTradeRouteInputDialog(TradeRoute newRoute)
           
 Canvas.MissionaryAction showUseMissionaryDialog(Unit unit, IndianSettlement settlement, boolean canEstablish, boolean canDenounce)
           
 void showVictoryPanel()
           
 boolean showWarehouseDialog(Colony colony)
           
 void showWorkProductionPanel(Unit unit)
           
 void startGUI(java.awt.Dimension innerWindowSize, boolean sound, boolean showOpeningVideo, boolean loadGame)
          Starts the GUI by creating and displaying the GUI-objects.
 void startMapEditorGUI()
           
 void toggleViewMode()
           
 void updateGameOptions()
           
 void updateGoldLabel()
          Updates the label displaying the current amount of gold.
 void updateMapGeneratorOptions()
           
 void updateMenuBar()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

logger

private static final java.util.logging.Logger logger

COPYRIGHT

public static final java.lang.String COPYRIGHT
See Also:
Constant Field Values

LICENSE

public static final java.lang.String LICENSE
See Also:
Constant Field Values

REVISION

public static final java.lang.String REVISION
See Also:
Constant Field Values

DEFAULT_WINDOW_SPACE

private static final int DEFAULT_WINDOW_SPACE
The space not being used in windowed mode.

See Also:
Constant Field Values

freeColClient

private FreeColClient freeColClient

gd

private java.awt.GraphicsDevice gd

frame

private javax.swing.JFrame frame

canvas

private Canvas canvas

mapViewer

private MapViewer mapViewer

colonyTileGUI

private MapViewer colonyTileGUI
This is the MapViewer instance used to paint the colony tiles in the ColonyPanel and other panels. It should not be scaled along with the default MapViewer.


imageLibrary

private ImageLibrary imageLibrary

soundPlayer

private SoundPlayer soundPlayer

windowed

private boolean windowed

windowBounds

private java.awt.Rectangle windowBounds

splash

private javax.swing.JWindow splash
Constructor Detail

GUI

public GUI(FreeColClient freeColClient)
Method Detail

activateGotoPath

public void activateGotoPath()

canPlaySound

public boolean canPlaySound()
Verifies if the client can play sounds.

Returns:
boolean true if and only if client sound player has an instance

centerActiveUnit

public void centerActiveUnit()

changeWindowedMode

public void changeWindowedMode(boolean windowed)
Change the windowed mode.

Parameters:
windowed - Use true for windowed mode and false for fullscreen mode.

closeMainPanel

public void closeMainPanel()

closeMenus

public void closeMenus()

closeStatusPanel

public void closeStatusPanel()

containsInGameComponents

public boolean containsInGameComponents()

determineWindowSize

public java.awt.Dimension determineWindowSize()

displayChat

public void displayChat(java.lang.String senderNme,
                        java.lang.String message,
                        boolean privateChat)

displayChatMessage

public void displayChatMessage(java.lang.String message,
                               boolean privateChat)
Tells the map controls that a chat message was received.

Parameters:
sender - The player who sent the chat message to the server.
message - The chat message.
privateChat - 'true' if the message is a private one, 'false' otherwise.
See Also:
GUIMessage

displaySpashScreen

public void displaySpashScreen(java.lang.String splashFilename)

errorMessage

public void errorMessage(java.lang.String messageId)

errorMessage

public void errorMessage(java.lang.String messageID,
                         java.lang.String message)

executeWithUnitOutForAnimation

public void executeWithUnitOutForAnimation(Unit unit,
                                           Tile sourceTile,
                                           OutForAnimationCallback r)

getActiveUnit

public Unit getActiveUnit()

getCanvas

public Canvas getCanvas()

getColonyTileGUI

public MapViewer getColonyTileGUI()

getCurrentViewMode

public int getCurrentViewMode()

getFocus

public Tile getFocus()

getImageIcon

public javax.swing.ImageIcon getImageIcon(java.lang.Object display,
                                          boolean small)

getImageLibrary

public ImageLibrary getImageLibrary()

getLoadingSavegameDialog

public LoadingSavegameDialog getLoadingSavegameDialog()

getMapScale

public float getMapScale()

getMapViewer

public MapViewer getMapViewer()

getSelectedTile

public Tile getSelectedTile()

getSoundPlayer

public SoundPlayer getSoundPlayer()

getTileBounds

public java.awt.Rectangle getTileBounds(Tile tile)

getTilePosition

public java.awt.Point getTilePosition(Tile tile)

getWindowBounds

public java.awt.Rectangle getWindowBounds()

hideSplashScreen

public void hideSplashScreen()

isClientOptionsDialogShowing

public boolean isClientOptionsDialogShowing()

isMapboardActionsEnabled

public boolean isMapboardActionsEnabled()

isShowingSubPanel

public boolean isShowingSubPanel()

isWindowed

public boolean isWindowed()

moveTileCursor

public void moveTileCursor(Map.Direction direction)

onScreen

public boolean onScreen(Tile tileToCheck)

paintImmediatelyCanvasIn

public void paintImmediatelyCanvasIn(java.awt.Rectangle rectangle)

paintImmediatelyCanvasInItsBounds

public void paintImmediatelyCanvasInItsBounds()

playSound

public void playSound(java.lang.String sound)
Plays some sound. Parameter == null stops playing a sound.

Parameters:
sound - The sound resource to play or null

quit

public void quit()

refresh

public void refresh()

refreshPlayersTable

public void refreshPlayersTable()

refreshTile

public void refreshTile(Tile t)
Refreshes the screen at the specified Tile.

Parameters:
t - The tile to refresh.

removeFromCanvas

public void removeFromCanvas(java.awt.Component component)

removeInGameComponents

public void removeInGameComponents()

requestFocusForSubPanel

public void requestFocusForSubPanel()

requestFocusInWindow

public boolean requestFocusInWindow()

resetMenuBar

public void resetMenuBar()

returnToTitle

public void returnToTitle()

scaleMap

public void scaleMap(float delta)

setActiveUnit

public void setActiveUnit(Unit unitToActivate)

setFocus

public void setFocus(Tile tileToFocus)

setFocusImmediately

public void setFocusImmediately(Tile tileToFocus)

setSelectedTile

public boolean setSelectedTile(Tile newTileToSelect,
                               boolean clearGoToOrders)

setupInGameMenuBar

public void setupInGameMenuBar()

setupMenuBarToNull

public void setupMenuBarToNull()

setUpMouseListenersForCanvas

public void setUpMouseListenersForCanvas()

setWindowed

public void setWindowed(boolean windowed)

showAboutPanel

public void showAboutPanel()

showArmedUnitIndianSettlementDialog

public Canvas.ScoutIndianSettlementAction showArmedUnitIndianSettlementDialog(IndianSettlement settlement)

showBoycottedGoodsDialog

public Canvas.BoycottAction showBoycottedGoodsDialog(Goods goods,
                                                     Europe europe)

showBuildQueuePanel

public void showBuildQueuePanel(Colony colony)

showBuildQueuePanel

public void showBuildQueuePanel(Colony colony,
                                java.lang.Runnable callBack)

showBuyDialog

public Canvas.BuyAction showBuyDialog(Unit unit,
                                      Settlement settlement,
                                      Goods goods,
                                      int gold,
                                      boolean canBuy)

showCaptureGoodsDialog

public java.util.List<Goods> showCaptureGoodsDialog(Unit winner,
                                                    java.util.List<Goods> loot)

showChatPanel

public void showChatPanel()

showChoiceDialog

public <T> T showChoiceDialog(Tile tile,
                              java.lang.String text,
                              java.lang.String cancelText,
                              java.util.List<ChoiceItem<T>> choices)

showChoiceMonarchActionDialog

public Monarch.MonarchAction showChoiceMonarchActionDialog(java.lang.String monarchTitle,
                                                           java.util.List<ChoiceItem<Monarch.MonarchAction>> actions)

showChooseFoundingFatherDialog

public FoundingFather showChooseFoundingFatherDialog(java.util.List<ChoiceItem<FoundingFather>> fathers,
                                                     java.lang.String fatherTitle)

showChooseFoundingFatherDialog

public FoundingFather showChooseFoundingFatherDialog(java.util.List<FoundingFather> ffs)

showClaimDialog

public Canvas.ClaimAction showClaimDialog(Tile tile,
                                          Player player,
                                          int price,
                                          Player owner,
                                          boolean canAccept)

showClientOptionsDialog

public OptionGroup showClientOptionsDialog()

showColonyPanel

public ColonyPanel showColonyPanel(Colony colony)

showColonyPanel

public void showColonyPanel(Colony colony,
                            java.lang.Runnable callback)

showColopediaPanel

public void showColopediaPanel(java.lang.String nodeId)

showCompactLabourReport

public void showCompactLabourReport()

showCompactLabourReport

public void showCompactLabourReport(LabourData.UnitData unitData)

showConfirmDeclarationDialog

public java.util.List<java.lang.String> showConfirmDeclarationDialog()

showConfirmDialog

public boolean showConfirmDialog(java.lang.String text,
                                 java.lang.String okText,
                                 java.lang.String cancelText)

showConfirmDialog

public boolean showConfirmDialog(Tile tile,
                                 ModelMessage[] messages,
                                 java.lang.String okText,
                                 java.lang.String cancelText)

showConfirmDialog

public boolean showConfirmDialog(Tile tile,
                                 StringTemplate text,
                                 java.lang.String okText,
                                 java.lang.String cancelText)

showDeclarationDialog

public void showDeclarationDialog()

showDifficultyDialog

public void showDifficultyDialog()

showDifficultyDialog

public OptionGroup showDifficultyDialog(Specification specification)

showDumpCargoDialog

public java.util.List<Goods> showDumpCargoDialog(Unit unit)

showEmigrationPanel

public int showEmigrationPanel(boolean fountainOfYouth)

showEndTurnDialog

public boolean showEndTurnDialog(java.util.List<Unit> units)

showEuropeDialog

public int showEuropeDialog(EuropePanel.EuropeAction europeAction)

showEuropePanel

public void showEuropePanel()

showEventPanel

public void showEventPanel(Canvas.EventType type)

showFindSettlementDialog

public void showFindSettlementDialog()

showGameOptionsDialog

public void showGameOptionsDialog(boolean editable,
                                  boolean loadCustomOptions)

showHighScoresPanel

public void showHighScoresPanel(java.lang.String messageId)

showIndianSettlementPanel

public void showIndianSettlementPanel(IndianSettlement indianSettlement)

showIndianSettlementTradeDialog

public Canvas.TradeAction showIndianSettlementTradeDialog(Settlement settlement,
                                                          boolean canBuy,
                                                          boolean canSell,
                                                          boolean canGift)

showInformationMessage

public void showInformationMessage(FreeColObject displayObject,
                                   java.lang.String messageId)

showInformationMessage

public void showInformationMessage(FreeColObject displayObject,
                                   StringTemplate template)

showInformationMessage

public void showInformationMessage(ModelMessage message)

showInformationMessage

public void showInformationMessage(java.lang.String messageId)

showInformationMessage

public void showInformationMessage(StringTemplate template)

showInputDialog

public java.lang.String showInputDialog(Tile tile,
                                        StringTemplate text,
                                        java.lang.String defaultValue,
                                        java.lang.String okText,
                                        java.lang.String cancelText,
                                        boolean rejectEmptyString)

showLoadDialog

public java.io.File showLoadDialog(java.io.File directory)

showLoadDialog

public java.io.File showLoadDialog(java.io.File directory,
                                   javax.swing.filechooser.FileFilter[] fileFilters)

showLoadingSavegameDialog

public boolean showLoadingSavegameDialog(boolean publicServer,
                                         boolean singleplayer)

showLogFilePanel

public void showLogFilePanel()

showMainPanel

public void showMainPanel()

showMapGeneratorOptionsDialog

public OptionGroup showMapGeneratorOptionsDialog(OptionGroup mgo,
                                                 boolean editable,
                                                 boolean loadCustomOptions)

showMapSizeDialog

public java.awt.Dimension showMapSizeDialog()

showModelMessages

public void showModelMessages(ModelMessage... modelMessages)

showMonarchPanelDialog

public boolean showMonarchPanelDialog(Monarch.MonarchAction action,
                                      StringTemplate replace)

showNegotiationDialog

public DiplomaticTrade showNegotiationDialog(Unit unit,
                                             Settlement settlement,
                                             DiplomaticTrade agreement)

showNewPanel

public void showNewPanel()

showNewPanel

public void showNewPanel(Specification specification)

showPreCombatDialog

public boolean showPreCombatDialog(FreeColGameObject attacker,
                                   FreeColGameObject defender,
                                   Tile tile)

showReportCargoPanel

public void showReportCargoPanel()

showReportColonyPanel

public void showReportColonyPanel()

showReportContinentalCongressPanel

public void showReportContinentalCongressPanel()

showReportEducationPanel

public void showReportEducationPanel()

showReportExplorationPanel

public void showReportExplorationPanel()

showReportForeignAffairPanel

public void showReportForeignAffairPanel()

showReportHistoryPanel

public void showReportHistoryPanel()

showReportIndianPanel

public void showReportIndianPanel()

showReportLabourPanel

public void showReportLabourPanel()

showReportMilitaryPanel

public void showReportMilitaryPanel()

showReportNavalPanel

public void showReportNavalPanel()

showReportProductionPanel

public void showReportProductionPanel()

showReportReligiousPanel

public void showReportReligiousPanel()

showReportRequirementsPanel

public void showReportRequirementsPanel()

showReportTradePanel

public void showReportTradePanel()

showReportTurnPanel

public void showReportTurnPanel(ModelMessage... messages)

showSaveDialog

public java.io.File showSaveDialog(java.io.File directory,
                                   java.lang.String defaultName)

showSaveDialog

public java.io.File showSaveDialog(java.io.File directory,
                                   java.lang.String standardName,
                                   javax.swing.filechooser.FileFilter[] fileFilters,
                                   java.lang.String defaultName)

showScoutForeignColonyDialog

public Canvas.ScoutColonyAction showScoutForeignColonyDialog(Colony colony,
                                                             Unit unit,
                                                             boolean canNegotiate)

showScoutIndianSettlementDialog

public Canvas.ScoutIndianSettlementAction showScoutIndianSettlementDialog(IndianSettlement settlement,
                                                                          java.lang.String number)

showSelectAmountDialog

public int showSelectAmountDialog(GoodsType goodsType,
                                  int available,
                                  int defaultAmount,
                                  boolean needToPay)

showSelectDestinationDialog

public Location showSelectDestinationDialog(Unit unit)

showSellDialog

public Canvas.SellAction showSellDialog(Unit unit,
                                        Settlement settlement,
                                        Goods goods,
                                        int gold)

showServerListPanel

public void showServerListPanel(java.lang.String username,
                                java.util.ArrayList<ServerInfo> serverList)

showSimpleChoiceDialog

public <T> T showSimpleChoiceDialog(Tile tile,
                                    java.lang.String text,
                                    java.lang.String cancelText,
                                    java.util.List<T> objects)

showStartGamePanel

public void showStartGamePanel(Game game,
                               Player player,
                               boolean singlePlayerMode)

showStatisticsPanel

public void showStatisticsPanel()

showStatusPanel

public void showStatusPanel(java.lang.String message)

showTilePanel

public void showTilePanel(Tile tile)

showTilePopUpAtSelectedTile

public void showTilePopUpAtSelectedTile()

showTradeRouteDialog

public TradeRoute showTradeRouteDialog(TradeRoute tradeRoute,
                                       Tile tile)

showTradeRouteInputDialog

public boolean showTradeRouteInputDialog(TradeRoute newRoute)

showUseMissionaryDialog

public Canvas.MissionaryAction showUseMissionaryDialog(Unit unit,
                                                       IndianSettlement settlement,
                                                       boolean canEstablish,
                                                       boolean canDenounce)

showVictoryPanel

public void showVictoryPanel()

showWarehouseDialog

public boolean showWarehouseDialog(Colony colony)

showWorkProductionPanel

public void showWorkProductionPanel(Unit unit)

startGUI

public void startGUI(java.awt.Dimension innerWindowSize,
                     boolean sound,
                     boolean showOpeningVideo,
                     boolean loadGame)
Starts the GUI by creating and displaying the GUI-objects.


startMapEditorGUI

public void startMapEditorGUI()

toggleViewMode

public void toggleViewMode()

updateGameOptions

public void updateGameOptions()

updateGoldLabel

public void updateGoldLabel()
Updates the label displaying the current amount of gold.


updateMapGeneratorOptions

public void updateMapGeneratorOptions()

updateMenuBar

public void updateMenuBar()

setupMapEditorMenuBar

private void setupMapEditorMenuBar()

setupMouseListenerForMapEditor

private void setupMouseListenerForMapEditor()