|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectnet.sf.freecol.client.control.InputHandler
net.sf.freecol.client.control.InGameInputHandler
public final class InGameInputHandler
Handles the network messages that arrives while in the getGame().
| Nested Class Summary | |
|---|---|
(package private) class |
InGameInputHandler.LootCargoSwingTask
This class displays a dialog that lets the player choose goods to loot. |
(package private) class |
InGameInputHandler.NewLandNameSwingTask
|
(package private) class |
InGameInputHandler.NewRegionNameSwingTask
|
(package private) class |
InGameInputHandler.NoResultCanvasSwingTask
Base class for Swing tasks that need to do a simple update without return value, and use the canvas. |
(package private) class |
InGameInputHandler.ReconnectSwingTask
This task reconnects to the server. |
(package private) class |
InGameInputHandler.RefreshCanvasSwingTask
This task refreshes the entire canvas. |
(package private) class |
InGameInputHandler.RefreshTilesSwingTask
|
(package private) class |
InGameInputHandler.ShowConfirmDialogSwingTask
This class shows a dialog and saves the answer (ok/cancel). |
(package private) class |
InGameInputHandler.ShowErrorMessageSwingTask
This class shows an error dialog. |
(package private) class |
InGameInputHandler.ShowInformationMessageSwingTask
This class shows an informational dialog. |
(package private) class |
InGameInputHandler.ShowInputDialogSwingTask
This class shows a an input dialog and saves the answer (ok/cancel). |
(package private) class |
InGameInputHandler.ShowMessageSwingTask
Base class for dialog SwingTasks. |
(package private) class |
InGameInputHandler.ShowModelMessageSwingTask
This class shows a model message. |
(package private) class |
InGameInputHandler.ShowMonarchPanelSwingTask
This class shows the monarch panel. |
(package private) class |
InGameInputHandler.ShowSelectSwingTask
This class displays a dialog that lets the player pick a Founding Father. |
(package private) class |
InGameInputHandler.ShowVictoryPanelSwingTask
This task shows the victory panel. |
(package private) class |
InGameInputHandler.SpyColonySwingTask
This task shows an enhanced colony panel, then restores the normal information when it closes. |
(package private) static class |
InGameInputHandler.SwingTask
This utility class is the base class for tasks that need to run in the event dispatch thread. |
(package private) class |
InGameInputHandler.UnitAttackAnimationCanvasSwingTask
This task plays an unit attack animation in the Canvas. |
(package private) class |
InGameInputHandler.UnitMoveAnimationCanvasSwingTask
This task plays an unit movement animation in the Canvas. |
(package private) class |
InGameInputHandler.UpdateMenuBarSwingTask
This task updates the menu bar. |
| Field Summary | |
|---|---|
private Unit |
lastAnimatedUnit
|
private static java.util.logging.Logger |
logger
|
| Fields inherited from class net.sf.freecol.client.control.InputHandler |
|---|
gui |
| Constructor Summary | |
|---|---|
InGameInputHandler(FreeColClient freeColClient,
GUI gui)
The constructor to use. |
|
| Method Summary | |
|---|---|
org.w3c.dom.Element |
addObject(org.w3c.dom.Element element)
Add the objects which are the children of this Element. |
private org.w3c.dom.Element |
addPlayer(org.w3c.dom.Element element)
Handles an "addPlayer"-message. |
private org.w3c.dom.Element |
animateAttack(org.w3c.dom.Element element)
Handles an "animateAttack"-message. |
private org.w3c.dom.Element |
animateMove(org.w3c.dom.Element element)
Handles an "animateMove"-message. |
private org.w3c.dom.Element |
chat(org.w3c.dom.Element element)
Handles a "chat"-message. |
private org.w3c.dom.Element |
chooseFoundingFather(org.w3c.dom.Element element)
Handles an "chooseFoundingFather"-request. |
org.w3c.dom.Element |
closeMenus()
Trivial handler to allow the server to signal to the client that an offer that caused a popup (for example, a native demand or diplomacy proposal) has not been answered quickly enough and that the offering player has assumed this player has refused-by-inaction, and therefore, the popup needs to be closed. |
private org.w3c.dom.Element |
diplomacy(org.w3c.dom.Element element)
Handles a "diplomacy"-request. |
org.w3c.dom.Element |
disposeUnits(org.w3c.dom.Element element)
Disposes of the Units which are the children of this
Element. |
private org.w3c.dom.Element |
error(org.w3c.dom.Element element)
Handles an "error"-message. |
org.w3c.dom.Element |
fountainOfYouth(org.w3c.dom.Element element)
Ask the player to choose migrants from a fountain of youth event. |
private org.w3c.dom.Element |
gameEnded(org.w3c.dom.Element element)
Handles a "gameEnded"-message. |
org.w3c.dom.Element |
handle(Connection connection,
org.w3c.dom.Element element)
Deals with incoming messages that have just been received. |
private org.w3c.dom.Element |
indianDemand(org.w3c.dom.Element element)
Handles an "indianDemand"-request. |
org.w3c.dom.Element |
lootCargo(org.w3c.dom.Element element)
Ask the player to choose something to loot. |
private org.w3c.dom.Element |
monarchAction(org.w3c.dom.Element element)
Handles a "monarchAction"-request. |
org.w3c.dom.Element |
multiple(Connection connection,
org.w3c.dom.Element element)
Handle all the children of this element. |
org.w3c.dom.Element |
newLandName(org.w3c.dom.Element element)
Ask the player to name the new land. |
org.w3c.dom.Element |
newRegionName(org.w3c.dom.Element element)
Ask the player to name a new region. |
private org.w3c.dom.Element |
newTurn(org.w3c.dom.Element element)
Handles a "newTurn"-message. |
private org.w3c.dom.Element |
reconnect(org.w3c.dom.Element element)
Handles an "reconnect"-message. |
private org.w3c.dom.Element |
remove(org.w3c.dom.Element removeElement)
Handles a "remove"-message. |
private static Unit |
selectUnitFromElement(Game game,
org.w3c.dom.Element element,
java.lang.String id)
Sometimes units appear which the client does not know about, and are passed in as the children of the parent element. |
private org.w3c.dom.Element |
setAI(org.w3c.dom.Element element)
Handles a "setAI"-message. |
private org.w3c.dom.Element |
setCurrentPlayer(org.w3c.dom.Element element)
Handles a "setCurrentPlayer"-message. |
private org.w3c.dom.Element |
setDead(org.w3c.dom.Element element)
Handles a "setDead"-message. |
private org.w3c.dom.Element |
setStance(org.w3c.dom.Element element)
Handles a "setStance"-request. |
private org.w3c.dom.Element |
spyResult(org.w3c.dom.Element element)
Handles a "spyResult" message. |
private void |
takeTurn(Player player,
boolean newTurn)
|
org.w3c.dom.Element |
update(org.w3c.dom.Element updateElement)
Handles an "update"-message. |
private void |
updateGameObjects(org.w3c.dom.NodeList nodeList)
Updates all FreeColGameObjects from the childNodes of the message |
| Methods inherited from class net.sf.freecol.client.control.InputHandler |
|---|
disconnect, getFreeColClient, getGame |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
private static final java.util.logging.Logger logger
private Unit lastAnimatedUnit
| Constructor Detail |
|---|
public InGameInputHandler(FreeColClient freeColClient,
GUI gui)
freeColClient - The main controller.| Method Detail |
|---|
public org.w3c.dom.Element handle(Connection connection,
org.w3c.dom.Element element)
handle in interface MessageHandlerhandle in class InputHandlerconnection - The Connection the message was received
on.element - The root element of the message.
private org.w3c.dom.Element reconnect(org.w3c.dom.Element element)
element - The element (root element in a DOM-parsed XML tree) that
holds all the information.public org.w3c.dom.Element update(org.w3c.dom.Element updateElement)
updateElement - The element (root element in a DOM-parsed XML tree)
that holds all the information.
private void updateGameObjects(org.w3c.dom.NodeList nodeList)
nodeList - The list of nodes from the messageprivate org.w3c.dom.Element remove(org.w3c.dom.Element removeElement)
removeElement - The element (root element in a DOM-parsed XML tree)
that holds all the information.
private static Unit selectUnitFromElement(Game game,
org.w3c.dom.Element element,
java.lang.String id)
game - The Game to add the unit to.element - The Element to find a unit in.id - The id of the unit to find.
private org.w3c.dom.Element animateMove(org.w3c.dom.Element element)
element - An element (root element in a DOM-parsed XML tree) that
holds attributes for the old and new tiles and an element for
the unit that is moving (which are used solely to operate the
animation).private org.w3c.dom.Element animateAttack(org.w3c.dom.Element element)
element - An element (root element in a DOM-parsed XML tree) that
holds attributes for the old and new tiles and an element for
the unit that is moving (which are used solely to operate the
animation).
private void takeTurn(Player player,
boolean newTurn)
private org.w3c.dom.Element setCurrentPlayer(org.w3c.dom.Element element)
element - The element (root element in a DOM-parsed XML
tree) that holds all the information.
Element valueprivate org.w3c.dom.Element newTurn(org.w3c.dom.Element element)
element - The element (root element in a DOM-parsed XML tree)
that holds all the information.private org.w3c.dom.Element setDead(org.w3c.dom.Element element)
element - The element (root element in a DOM-parsed XML tree) that
holds all the information.private org.w3c.dom.Element gameEnded(org.w3c.dom.Element element)
element - The element (root element in a DOM-parsed XML tree) that
holds all the information.private org.w3c.dom.Element chat(org.w3c.dom.Element element)
element - The element (root element in a DOM-parsed XML tree) that
holds all the information.private org.w3c.dom.Element error(org.w3c.dom.Element element)
element - The element (root element in a DOM-parsed XML tree) that
holds all the information.private org.w3c.dom.Element setAI(org.w3c.dom.Element element)
element - The element (root element in a DOM-parsed XML tree) that
holds all the information.private org.w3c.dom.Element chooseFoundingFather(org.w3c.dom.Element element)
element - The element (root element in a DOM-parsed XML tree) that
holds all the information.private org.w3c.dom.Element diplomacy(org.w3c.dom.Element element)
element - The element (root element in a DOM-parsed XML tree)
containing a "diplomacy"-message.
private org.w3c.dom.Element indianDemand(org.w3c.dom.Element element)
element - The element (root element in a DOM-parsed XML tree) that
holds all the information.private org.w3c.dom.Element spyResult(org.w3c.dom.Element element)
element - The element (root element in a DOM-parsed XML tree) that
holds all the information.private org.w3c.dom.Element monarchAction(org.w3c.dom.Element element)
element - The element (root element in a DOM-parsed XML tree) that
holds all the information.private org.w3c.dom.Element setStance(org.w3c.dom.Element element)
element - The element (root element in a DOM-parsed XML tree) that
holds all the information.private org.w3c.dom.Element addPlayer(org.w3c.dom.Element element)
element - The element (root element in a DOM-parsed XML tree) that
holds all the information.public org.w3c.dom.Element disposeUnits(org.w3c.dom.Element element)
Units which are the children of this
Element.
element - The element (root element in a DOM-parsed XML tree) that
holds all the information.public org.w3c.dom.Element addObject(org.w3c.dom.Element element)
element - The element (root element in a DOM-parsed XML tree) that
holds all the information.public org.w3c.dom.Element newLandName(org.w3c.dom.Element element)
element - The element (root element in a DOM-parsed XML tree) that
holds all the information.public org.w3c.dom.Element newRegionName(org.w3c.dom.Element element)
element - The element (root element in a DOM-parsed XML tree) that
holds all the information.public org.w3c.dom.Element fountainOfYouth(org.w3c.dom.Element element)
element - The element (root element in a DOM-parsed XML tree) that
holds all the information.public org.w3c.dom.Element lootCargo(org.w3c.dom.Element element)
element - The element (root element in a DOM-parsed XML tree) that
holds all the information.public org.w3c.dom.Element closeMenus()
public org.w3c.dom.Element multiple(Connection connection,
org.w3c.dom.Element element)
connection - The Connection the element arrived on.element - The Element to process.
Element containing the response/s.
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||