Package net.sf.freecol.client.control
Class FreeColClientHolder
- java.lang.Object
-
- net.sf.freecol.client.control.FreeColClientHolder
-
- Direct Known Subclasses:
AbstractCanvasListener,CanvasMouseListener,ClientInputHandler,ConnectController,GUI,InGameController,MapControls,MapEditorController,MapViewer,PreGameController,TileViewer,WindowedFrameListener
public class FreeColClientHolder extends java.lang.ObjectThis base class provides access to aFreeColClientfor several subclasses.
-
-
Field Summary
Fields Modifier and Type Field Description private FreeColClientfreeColClientThe main client object.
-
Constructor Summary
Constructors Modifier Constructor Description protectedFreeColClientHolder(FreeColClient freeColClient)Simple constructor.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description ServerAPIaskServer()Meaningfully named access to the server API.protected booleancurrentPlayerIsMyPlayer()Check if the current player is the client player.protected ClientOptionsgetClientOptions()Get the client options.protected ConnectControllergetConnectController()Get the connect controller.protected FreeColClientgetFreeColClient()Get the main client object.protected FreeColServergetFreeColServer()Get the server.protected GamegetGame()Get the game.protected GUIgetGUI()Get the GUI.protected MapgetMap()Get the Map.protected PlayergetMyPlayer()Get the client player.protected SpecificationgetSpecification()Get the specification.protected InGameControllerigc()Get the in-game controller.protected PreGameControllerpgc()Get the pre-game controller.
-
-
-
Field Detail
-
freeColClient
private final FreeColClient freeColClient
The main client object.
-
-
Constructor Detail
-
FreeColClientHolder
protected FreeColClientHolder(FreeColClient freeColClient)
Simple constructor.- Parameters:
freeColClient- TheFreeColClientto hold.
-
-
Method Detail
-
askServer
public ServerAPI askServer()
Meaningfully named access to the server API.- Returns:
- The
ServerAPI.
-
currentPlayerIsMyPlayer
protected boolean currentPlayerIsMyPlayer()
Check if the current player is the client player.- Returns:
- True if the client player is current.
-
getClientOptions
protected ClientOptions getClientOptions()
Get the client options.- Returns:
- The
ClientOptionsheld by the client.
-
getConnectController
protected ConnectController getConnectController()
Get the connect controller.- Returns:
- The
ConnectControllerheld by the client.
-
getFreeColClient
protected FreeColClient getFreeColClient()
Get the main client object.- Returns:
- The
FreeColClientheld by this object.
-
getFreeColServer
protected FreeColServer getFreeColServer()
Get the server.- Returns:
- The
FreeColServerheld by the client.
-
getGame
protected Game getGame()
Get the game.- Returns:
- The
Gameheld by the client.
-
getMap
protected Map getMap()
Get the Map.- Returns:
- The game
Map.
-
getGUI
protected GUI getGUI()
Get the GUI.- Returns:
- The
GUIheld by the client.
-
getMyPlayer
protected Player getMyPlayer()
Get the client player.- Returns:
- The
Playerassociated with the client.
-
getSpecification
protected Specification getSpecification()
Get the specification.- Returns:
- The
Specificationheld by the game.
-
igc
protected InGameController igc()
Get the in-game controller.- Returns:
- The
InGameControllerfor the client.
-
pgc
protected PreGameController pgc()
Get the pre-game controller.- Returns:
- The
PreGameControllerfor the client.
-
-