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.Object
This base class provides access to aFreeColClient
for several subclasses.
-
-
Field Summary
Fields Modifier and Type Field Description private FreeColClient
freeColClient
The main client object.
-
Constructor Summary
Constructors Modifier Constructor Description protected
FreeColClientHolder(FreeColClient freeColClient)
Simple constructor.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description ServerAPI
askServer()
Meaningfully named access to the server API.protected boolean
currentPlayerIsMyPlayer()
Check if the current player is the client player.protected ClientOptions
getClientOptions()
Get the client options.protected ConnectController
getConnectController()
Get the connect controller.protected FreeColClient
getFreeColClient()
Get the main client object.protected FreeColServer
getFreeColServer()
Get the server.protected Game
getGame()
Get the game.protected GUI
getGUI()
Get the GUI.protected Map
getMap()
Get the Map.protected Player
getMyPlayer()
Get the client player.protected Specification
getSpecification()
Get the specification.protected InGameController
igc()
Get the in-game controller.protected PreGameController
pgc()
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
- TheFreeColClient
to 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
ClientOptions
held by the client.
-
getConnectController
protected ConnectController getConnectController()
Get the connect controller.- Returns:
- The
ConnectController
held by the client.
-
getFreeColClient
protected FreeColClient getFreeColClient()
Get the main client object.- Returns:
- The
FreeColClient
held by this object.
-
getFreeColServer
protected FreeColServer getFreeColServer()
Get the server.- Returns:
- The
FreeColServer
held by the client.
-
getGame
protected Game getGame()
Get the game.- Returns:
- The
Game
held by the client.
-
getMap
protected Map getMap()
Get the Map.- Returns:
- The game
Map
.
-
getGUI
protected GUI getGUI()
Get the GUI.- Returns:
- The
GUI
held by the client.
-
getMyPlayer
protected Player getMyPlayer()
Get the client player.- Returns:
- The
Player
associated with the client.
-
getSpecification
protected Specification getSpecification()
Get the specification.- Returns:
- The
Specification
held by the game.
-
igc
protected InGameController igc()
Get the in-game controller.- Returns:
- The
InGameController
for the client.
-
pgc
protected PreGameController pgc()
Get the pre-game controller.- Returns:
- The
PreGameController
for the client.
-
-