Class ClientGUI
java.lang.Object
net.sf.colossus.gui.ClientGUI
- All Implemented Interfaces:
IClientGUI, GUICallbacks
-
Nested Class Summary
Nested Classes -
Field Summary
FieldsModifier and TypeFieldDescriptionprivate AutoInspectorprivate BattleBoardprivate final List<GUIBattleChit> private MasterBoardprivate CreatureCollectionViewprotected final Clientprivate static final intprivate final Objectprivate Timerprivate ConnectionLogWindowprivate EngagementResultsprivate EventViewerprivate booleanprivate longprivate intprivate static final Loggerprivate LogWindow(package private) Stringprivate MovementDieprivate LegionInformation on the current moving legion.private Negotiateprivate intprivate final Optionsprotected final IOracleprivate final LinkedList<ClientGUI.PendingMove> private PickCarryprivate PreferencesWindow(package private) booleanprivate booleanprivate intprivate intprivate intprivate ReplyToProposalprivate JFramethe parent frame for secondary windowsprivate booleanprivate StatusScreenprivate final LinkedList<Object> Stack of legion marker ID's, to allow multiple levels of undo for splits, moves, and recruits.private intprivate WebClientprivate final WhatNextManagerThe object which handles what to do next when a game is going to end -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidacquireAngelCallback(Legion legion, CreatureType angelType) voidactOnAddCreature(Legion legion, CreatureType creature, String reason) voidvoidvoidactOnDidMove(Legion legion, MasterHex startingHex, MasterHex currentHex, boolean teleport, CreatureType teleportingLord, boolean splitLegionHasForcedMove) voidactOnDidRecruit(Legion legion, CreatureType recruit, List<CreatureType> recruiters, String reason) voidactOnDidSplit(int turn, Legion parent, Legion child, MasterHex hex) voidvoidvoidvoidvoidvoidvoidvoidvoidactOnHitsSet(BattleUnit target) voidvoidvoidvoidvoidactOnPlaceNewChit(String imageName, BattleUnit battleUnit, BattleHex hex) voidvoidactOnRemoveCreature(Legion legion, CreatureType type, String reason) voidactOnRemoveCreaturePart2(Legion legion) voidactOnRemoveLegion(Legion legion) voidvoidvoidvoidvoidvoidvoidvoidvoidactOnTellBattleMove(BattleHex startingHex, BattleHex endingHex, boolean rememberForUndo) voidactOnTellEngagementResults(Legion winner, String method, int points, int turns) voidactOnTellGameOver(String message, boolean disposeFollows) Update Board and Status screen to reflect the new game over state.voidactOnTellLegionLocation(Legion legion, MasterHex hex) voidactOnTellMovementRoll(int roll) voidvoidactOnTellReplay(int maxTurn) voidactOnTellStrikeResults(boolean wasCarry, int strikeNumber, List<String> rolls, BattleCritter striker, BattleCritter target) voidactOnTurnOrPlayerChange(Client client, int turnNr, Player player) voidactOnUndidMove(Legion legion, MasterHex formerHex, MasterHex currentHex, boolean splitLegionHasForcedMove, boolean didTeleport) voidactOnUndidRecruitPart(Legion legion, boolean wasReinforcement, int turnNumber) voidactOnUndidSplit(Legion survivor, int turn) voidprivate voidaddBattleChit(GUIBattleChit battleChit) voidaddPossibleRecruitChits(LegionClientSide legion, Set<MasterHex> hexes) voidalignLegionsMaybe(Legion legion) voidanswerConcede(Legion legion, boolean answer) voidanswerFlee(Legion ally, boolean answer) voidanswerPickColor(PlayerColor color) voidvoidapplyCarries(BattleHex hex) (package private) voidaskNewCloseQuitCancel(JFrame frame, boolean fromBattleBoard) voidautoInspectorSetDubiousAsBlanks(boolean newValue) voidbringUpPickColorDialog(String playerName, List<PlayerColor> colorsLeft) (package private) voidWhen user requests it from File menu, this method here requests the server to send us a confirmation package, to confirm that connection is still alive and ok.booleanPresent a dialog allowing the player to enter via land or teleport.private voidvoidprivate voidvoidconcede()voidcreatePickMarkerDialog(ClientGUI gui, Set<String> markerIds, Legion parent) voidvoiddidSummon(Legion summoner, Legion donor, CreatureType summon) private voidprivate voidprivate voidprivate void(package private) voidprivate voidvoidprivate voidprivate voidprivate voidvoidDispose the PickCarryDialog, make sure that that is done inside the EDT (caused GUI to hang in 1.6.0_39 whereas in 1.6.0_38 it worked )-;private voidprivate voidvoiddoAcquireAngel(Legion legion, List<CreatureType> recruits) voiddoBattleMove(int tag, BattleHex hex) voidvoidbooleanprivate voidvoidvoidvoiddoPickCarries(Client client, int carryDamage, Set<String> carryTargetDescriptions) voiddoPickColor(String playerName, List<PlayerColor> colorsLeft) doPickEntrySide(MasterHex hex, Set<EntrySide> entrySides) voiddoPickInitialMarker(Set<String> markersAvailable) doPickLord(List<CreatureType> lords) doPickRecruit(Legion legion, String hexDescription) doPickRecruiter(List<String> recruiters, String hexDescription, Legion legion) doPickSplitLegion(Legion parent, String childMarker) voiddoPickSplitMarker(Legion parent, Set<String> markersAvailable) voiddoPickStrikePenalty(Client client, List<String> choices) voiddoPickSummonAngel(Legion legion, List<Legion> possibleDonors) private voiddoSetWhatToDoNext(WhatNextManager.WhatToDoNext whatToDoNext, boolean triggerQuitTimer) private voiddoSetWhatToDoNext(WhatNextManager.WhatToDoNext whatToDoNext, String loadFile) (package private) voiddoShowMessageDialog(String message) voidprivate voidprivate voidEnsure that setupClientGUI() is run inside the EDTvoideventViewerCancelReinforcement(CreatureType recruit, int turnNr) voideventViewerNewSplitEvent(int turn, Legion parent, Legion child) voideventViewerRevealCreatures(Legion legion, List<CreatureType> creatures, String reason) voideventViewerSetCreatureDead(BattleUnit battleUnit) voidvoideventViewerUndoEvent(Legion splitoff, Legion survivor, int turn) private voidfinishServerConnectionCheck(boolean success) Cleanup everything related to the serverConnectionCheck timer, and show a message telling whether it went ok or not.private StringgetBattleUnitDescription(BattleCritter battleUnit) getBoard()getGame()Get a list of all GUIBattleChits (on the current BattleMap)Find all GUIBattleChits that occupy a specified hex Note that this can be several for the offboard position(s)intprivate JFrame(package private) String(package private) MovementDiegetMover()intprivate JFrameintbooleanintvoidprivate voidhandleUndoRecruit(Legion legion) This does the actual work for undoing a recruitvoidbooleanhasBoard()(package private) voidhighlightBattleSite(MasterHex battleSite) voidvoidvoidvoidprivate voidprivate voidprivate voidvoidbooleanisMyTurn()boolean(package private) boolean(package private) booleanprivate booleanvoidvoidvoidmarkLegionAsSkipRecruit(Legion legion) TODO This is just a HACK.private voidmarkLegionAsSkipSplit(Legion legion) voidvoidmenuLoadGame(String filename) voidvoid(package private) voidmenuSaveGame(String filename) private void(package private) voidnegotiateCallback(Proposal proposal, boolean respawn) private Objectprivate voidpostRecruitStuff(Legion legion) Do what is needed after recruit (or mark as skip recruit): push to undo stack, update legions left to muster, hightlight remaining ones,(package private) voidpushUndoStack(Object object) voidremoveBattleChit(BattleUnit battleUnit) voidvoidvoidreplayTurnChange(int nowTurn) voidTODO since we are doing Swing nowadays it would probably be much better to replace all this rescaling code with just usingAffineTransformon the rightGraphics2Dinstances.voidvoidreset all strike numbers on chitsvoidvoidrevealEngagedCreatures(Legion legion, List<CreatureType> creatures, boolean isAttacker, String reason) voidUpon request with checkServerConnection, server sends a confirmation.voidsetBoardActive(boolean val) voidsetChosenDevice(GraphicsDevice chosen) voidvoidsetLookAndFeel(String lfName) (package private) voidAdd the marker to the end of the list and to the LegionInfo.voidsetMoveCompleted(Legion mover, MasterHex current, MasterHex target) voidsetMovePending(Legion mover, MasterHex currentHex, MasterHex targetHex) voidvoidsetMulliganOldRoll(int movementRoll) voidsetPreferencesCheckBoxValue(String name, boolean value) voidsetPreferencesRadioButtonValue(String name, boolean value) voidsetPreferencesWindowVisible(boolean val) voidsetStartedByWebClient(boolean byWebClient) voidsetStrikeNumbers(BattleUnit striker, Set<BattleHex> targetHexes) voidCalled via ensureEdtSetupClientGUI() when server sends all clients the initBoard command.private voidprivate voidvoidprivate voidvoidshowConcede(Client client, Legion ally, Legion enemy) voidThis is for permanent, non-reversible closed connectionsvoidvoidvoidshowMarker(Marker marker) voidshowMessageDialogAndWait(String message) voidshowNegotiate(Legion attacker, Legion defender) private voidshowOrHideAutoInspector(boolean bval) private voidshowOrHideCaretaker(boolean bval) private voidshowOrHideConnectionLogWindow(boolean show) private voidshowOrHideLogWindow(boolean show) voidvoidvoidEnsure that Player menu checkboxes reflect the correct state.voidtellEngagement(Legion attacker, Legion defender, int turnNumber) voidtellProposal(String proposalString) Inform this player about the other player's proposal.voidtellWhatsHappening(String message) voidTimeout reached.voidvoidvoid(package private) voidvoidundoBattleMove(BattleHex hex) void(package private) void(package private) voidFor the topmost item on undo stack, undo the done recruit, or reset the skipThisTime flag if set.(package private) voidvoidundoRecruit(Legion legion) For a specific clicked legion, undo the done recruit, or reset the skipThisTime flag if set.voidvoidprivate voidvoidprivate voidupdateTreeAndPack(Window window) private voidvoid
-
Field Details
-
LOGGER
-
CONN_CHECK_TIMEOUT
private static final int CONN_CHECK_TIMEOUT- See Also:
-
connectionCheckMutex
-
connectionCheckTimer
-
lastConnectionCheckPackageSent
private long lastConnectionCheckPackageSent -
board
-
statusScreen
-
caretakerDisplay
-
movementDie
-
engagementResults
-
autoInspector
-
eventViewer
-
preferencesWindow
-
logWindow
-
connectionLogWindow
-
pickCarryDialog
-
negotiate
-
replyToProposal
-
battleBoard
-
webClient
-
startedByWebClient
private boolean startedByWebClient -
whatNextManager
The object which handles what to do next when a game is going to end -
undoStack
Stack of legion marker ID's, to allow multiple levels of undo for splits, moves, and recruits. (for battle actions, the Strings are not actually marker ID's, it's battle hex ID's there instead). TODO it would probably be good to have a full Command pattern here, similar to Swing'sUndoManagerstuff. In the GUI client we could/should probably just use that. A list of objects (which are mostly the string identifiers of something) isn't that safe. -
pendingMoves
-
pendingMoveHexes
-
recoveredFromMoveNak
private boolean recoveredFromMoveNak -
battleChits
-
mover
Information on the current moving legion. -
secondaryParent
the parent frame for secondary windows -
replayLastTurn
private int replayLastTurn -
replayMaxTurn
private int replayMaxTurn -
viewMode
private int viewMode -
recruitChitMode
private int recruitChitMode -
legionMoveConfirmationMode
private int legionMoveConfirmationMode -
nextSplitClickMode
private int nextSplitClickMode -
gameOverMessageAlreadyShown
private boolean gameOverMessageAlreadyShown -
client
-
oracle
-
options
-
quitAlreadyTried
boolean quitAlreadyTried -
tellEngagementResultsAttackerStartingContents
-
tellEngagementResultsDefenderStartingContents
-
tellEngagementResultsAttackerLegionCertainities
-
tellEngagementResultsDefenderLegionCertainities
-
message
String message
-
-
Constructor Details
-
ClientGUI
-
-
Method Details
-
setStartedByWebClient
public void setStartedByWebClient(boolean byWebClient) - Specified by:
setStartedByWebClientin interfaceIClientGUI
-
getStartedByWebClient
public boolean getStartedByWebClient() -
setWebClient
- Specified by:
setWebClientin interfaceIClientGUI
-
setClientInWebClientNull
public void setClientInWebClientNull()- Specified by:
setClientInWebClientNullin interfaceIClientGUI
-
getBoard
-
hasBoard
public boolean hasBoard()- Specified by:
hasBoardin interfaceIClientGUI
-
getClient
-
getOracle
-
getGame
-
getGameClientSide
-
getOptions
-
isReplayOngoing
boolean isReplayOngoing() -
isRedoOngoing
boolean isRedoOngoing() -
handleWebClientRestore
public void handleWebClientRestore()- Specified by:
handleWebClientRestorein interfaceIClientGUI
-
showWebClient
public void showWebClient()- Specified by:
showWebClientin interfaceIClientGUI
-
initBoard
public void initBoard()- Specified by:
initBoardin interfaceIClientGUI
-
actOnGameStartingFailed
public void actOnGameStartingFailed()- Specified by:
actOnGameStartingFailedin interfaceIClientGUI
-
ensureEdtSetupClientGUI
private void ensureEdtSetupClientGUI()Ensure that setupClientGUI() is run inside the EDT -
setupClientGUI
public void setupClientGUI()Called via ensureEdtSetupClientGUI() when server sends all clients the initBoard command. -
setChosenDevice
- Specified by:
setChosenDevicein interfaceIClientGUI
-
ensureEdtNewBattleBoard
private void ensureEdtNewBattleBoard() -
actOnInitBattle
public void actOnInitBattle()- Specified by:
actOnInitBattlein interfaceIClientGUI
-
doNewBattleBoard
private void doNewBattleBoard() -
setStrikeNumbers
-
resetStrikeNumbers
public void resetStrikeNumbers()reset all strike numbers on chits- Specified by:
resetStrikeNumbersin interfaceIClientGUI
-
updateStatusScreen
public void updateStatusScreen()- Specified by:
updateStatusScreenin interfaceIClientGUI
-
askNewCloseQuitCancel
-
checkServerConnection
void checkServerConnection()When user requests it from File menu, this method here requests the server to send us a confirmation package, to confirm that connection is still alive and ok. -
initiateConnectionCheck
private void initiateConnectionCheck() -
serverConfirmsConnection
public void serverConfirmsConnection()Description copied from interface:IClientGUIUpon request with checkServerConnection, server sends a confirmation. This method here processes the confirmation.- Specified by:
serverConfirmsConnectionin interfaceIClientGUI
-
timeoutAbortsConnectionCheck
public void timeoutAbortsConnectionCheck()Description copied from interface:IClientGUITimeout reached. Cancel timer and show error message- Specified by:
timeoutAbortsConnectionCheckin interfaceIClientGUI
-
finishServerConnectionCheck
private void finishServerConnectionCheck(boolean success) Cleanup everything related to the serverConnectionCheck timer, and show a message telling whether it went ok or not. Called by either serverConfirmsConnection() or timeoutAbortsConnectionCheck(), which both synchronize on the connectionCheckMutex. -
doSetWhatToDoNext
-
doSetWhatToDoNext
-
setWhatToDoNextForClose
private void setWhatToDoNextForClose() -
setupPlayerLabel
private void setupPlayerLabel() -
highlightEngagements
public void highlightEngagements()- Specified by:
highlightEngagementsin interfaceIClientGUI
-
getPreferredParent
-
getViewMode
public int getViewMode()- Specified by:
getViewModein interfaceIClientGUI
-
getRecruitChitMode
public int getRecruitChitMode()- Specified by:
getRecruitChitModein interfaceIClientGUI
-
getLegionMoveConfirmationMode
public int getLegionMoveConfirmationMode()- Specified by:
getLegionMoveConfirmationModein interfaceIClientGUI
-
getNextSplitClickMode
public int getNextSplitClickMode()- Specified by:
getNextSplitClickModein interfaceIClientGUI
-
addPossibleRecruitChits
- Specified by:
addPossibleRecruitChitsin interfaceIClientGUI
-
setupGUIOptionListeners
private void setupGUIOptionListeners() -
initEventViewer
private void initEventViewer() -
eventViewerSetVisibleMaybe
public void eventViewerSetVisibleMaybe()- Specified by:
eventViewerSetVisibleMaybein interfaceIClientGUI
-
autoInspectorSetDubiousAsBlanks
public void autoInspectorSetDubiousAsBlanks(boolean newValue) - Specified by:
autoInspectorSetDubiousAsBlanksin interfaceIClientGUI
-
engagementResultsMaybeShow
public void engagementResultsMaybeShow()- Specified by:
engagementResultsMaybeShowin interfaceIClientGUI
-
actOnTellLegionLocation
- Specified by:
actOnTellLegionLocationin interfaceIClientGUI
-
setMarker
-
actOnDidSplit
- Specified by:
actOnDidSplitin interfaceIClientGUI
-
actOnDidSplitPart2
- Specified by:
actOnDidSplitPart2in interfaceIClientGUI
-
actOnDoneWithMoves
public void actOnDoneWithMoves()- Specified by:
actOnDoneWithMovesin interfaceIClientGUI
-
actOnDoneWithSplits
public void actOnDoneWithSplits()- Specified by:
actOnDoneWithSplitsin interfaceIClientGUI
-
actOnDidRecruit
public void actOnDidRecruit(Legion legion, CreatureType recruit, List<CreatureType> recruiters, String reason) - Specified by:
actOnDidRecruitin interfaceIClientGUI
-
postRecruitStuff
Do what is needed after recruit (or mark as skip recruit): push to undo stack, update legions left to muster, hightlight remaining ones,- Parameters:
legion-
-
actOnRemoveCreature
- Specified by:
actOnRemoveCreaturein interfaceIClientGUI
-
actOnRemoveCreaturePart2
- Specified by:
actOnRemoveCreaturePart2in interfaceIClientGUI
-
actOnAddCreature
- Specified by:
actOnAddCreaturein interfaceIClientGUI
-
actOnUndidSplit
- Specified by:
actOnUndidSplitin interfaceIClientGUI
-
actOnUndidRecruitPart
- Specified by:
actOnUndidRecruitPartin interfaceIClientGUI
-
chooseWhetherToTeleport
public boolean chooseWhetherToTeleport()Description copied from interface:IClientGUIPresent a dialog allowing the player to enter via land or teleport. Return true if the player chooses to teleport.- Specified by:
chooseWhetherToTeleportin interfaceIClientGUI
-
actOnDidMove
public void actOnDidMove(Legion legion, MasterHex startingHex, MasterHex currentHex, boolean teleport, CreatureType teleportingLord, boolean splitLegionHasForcedMove) - Specified by:
actOnDidMovein interfaceIClientGUI
-
actOnUndidMove
public void actOnUndidMove(Legion legion, MasterHex formerHex, MasterHex currentHex, boolean splitLegionHasForcedMove, boolean didTeleport) - Specified by:
actOnUndidMovein interfaceIClientGUI
-
actOnNoMoreEngagements
public void actOnNoMoreEngagements()- Specified by:
actOnNoMoreEngagementsin interfaceIClientGUI
-
alignLegionsMaybe
- Specified by:
alignLegionsMaybein interfaceIClientGUI
-
actOnRemoveLegion
- Specified by:
actOnRemoveLegionin interfaceIClientGUI
-
actOnDoSummon
public void actOnDoSummon()- Specified by:
actOnDoSummonin interfaceIClientGUI
-
setLookAndFeel
- Specified by:
setLookAndFeelin interfaceIClientGUI
-
updateEverything
public void updateEverything()- Specified by:
updateEverythingin interfaceIClientGUI
-
updateTreeAndPack
-
replayTurnChange
public void replayTurnChange(int nowTurn) - Specified by:
replayTurnChangein interfaceIClientGUI
-
actOnTellReplay
public void actOnTellReplay(int maxTurn) - Specified by:
actOnTellReplayin interfaceIClientGUI
-
makeBoardRecreateMarkers
public void makeBoardRecreateMarkers() -
actOnTellRedoChange
public void actOnTellRedoChange()- Specified by:
actOnTellRedoChangein interfaceIClientGUI
-
clearUndoStack
private void clearUndoStack() -
popUndoStack
-
pushUndoStack
-
isUndoStackEmpty
private boolean isUndoStackEmpty() -
eventViewerCancelReinforcement
- Specified by:
eventViewerCancelReinforcementin interfaceIClientGUI
-
eventViewerSetCreatureDead
- Specified by:
eventViewerSetCreatureDeadin interfaceIClientGUI
-
eventViewerNewSplitEvent
- Specified by:
eventViewerNewSplitEventin interfaceIClientGUI
-
eventViewerUndoEvent
- Specified by:
eventViewerUndoEventin interfaceIClientGUI
-
setPreferencesCheckBoxValue
- Specified by:
setPreferencesCheckBoxValuein interfaceIClientGUI
-
setPreferencesRadioButtonValue
- Specified by:
setPreferencesRadioButtonValuein interfaceIClientGUI
-
initPreferencesWindow
private void initPreferencesWindow() -
setPreferencesWindowVisible
public void setPreferencesWindowVisible(boolean val) - Specified by:
setPreferencesWindowVisiblein interfaceIClientGUI
-
showMarker
-
showOrHideCaretaker
private void showOrHideCaretaker(boolean bval) -
showOrHideAutoInspector
private void showOrHideAutoInspector(boolean bval) -
showHexRecruitTree
-
didSummon
- Specified by:
didSummonin interfaceIClientGUI
-
repaintBattleBoard
public void repaintBattleBoard()- Specified by:
repaintBattleBoardin interfaceIClientGUI
-
repaintAllWindows
public void repaintAllWindows()- Specified by:
repaintAllWindowsin interfaceIClientGUI
-
rescaleAllWindows
public void rescaleAllWindows()Description copied from interface:IClientGUITODO since we are doing Swing nowadays it would probably be much better to replace all this rescaling code with just usingAffineTransformon the rightGraphics2Dinstances.- Specified by:
rescaleAllWindowsin interfaceIClientGUI
-
disposeInspector
public void disposeInspector()- Specified by:
disposeInspectorin interfaceIClientGUI
-
updateCreatureCountDisplay
public void updateCreatureCountDisplay()- Specified by:
updateCreatureCountDisplayin interfaceIClientGUI
-
disposeMasterBoard
private void disposeMasterBoard() -
disposeBattleBoard
private void disposeBattleBoard() -
disposePickCarryDialog
public void disposePickCarryDialog()Dispose the PickCarryDialog, make sure that that is done inside the EDT (caused GUI to hang in 1.6.0_39 whereas in 1.6.0_38 it worked )-;- Specified by:
disposePickCarryDialogin interfaceIClientGUI
-
actualDisposePickCarryDialog
public void actualDisposePickCarryDialog() -
disposeStatusScreen
private void disposeStatusScreen() -
disposeLogWindow
private void disposeLogWindow() -
disposeConnectionLogWindow
private void disposeConnectionLogWindow() -
disposeEventViewer
private void disposeEventViewer() -
disposePreferencesWindow
private void disposePreferencesWindow() -
disposeEngagementResults
void disposeEngagementResults() -
disposeCaretakerDisplay
private void disposeCaretakerDisplay() -
showNegotiate
- Specified by:
showNegotiatein interfaceIClientGUI
-
respawnNegotiate
public void respawnNegotiate()- Specified by:
respawnNegotiatein interfaceIClientGUI
-
showConcede
- Specified by:
showConcedein interfaceIClientGUI
-
showFlee
- Specified by:
showFleein interfaceIClientGUI
-
myTurnNotificationActions
-
initShowEngagementResults
public void initShowEngagementResults()- Specified by:
initShowEngagementResultsin interfaceIClientGUI
-
tellEngagement
- Specified by:
tellEngagementin interfaceIClientGUI
-
highlightBattleSite
-
actOnTellEngagementResults
- Specified by:
actOnTellEngagementResultsin interfaceIClientGUI
-
actOnEngagementCompleted
public void actOnEngagementCompleted()- Specified by:
actOnEngagementCompletedin interfaceIClientGUI
-
setMulliganOldRoll
public void setMulliganOldRoll(int movementRoll) - Specified by:
setMulliganOldRollin interfaceIClientGUI
-
tellWhatsHappening
- Specified by:
tellWhatsHappeningin interfaceIClientGUI
-
actOnTellMovementRoll
public void actOnTellMovementRoll(int roll) - Specified by:
actOnTellMovementRollin interfaceIClientGUI
-
revealEngagedCreatures
public void revealEngagedCreatures(Legion legion, List<CreatureType> creatures, boolean isAttacker, String reason) - Specified by:
revealEngagedCreaturesin interfaceIClientGUI
-
eventViewerRevealCreatures
- Specified by:
eventViewerRevealCreaturesin interfaceIClientGUI
-
showOrHideLogWindow
private void showOrHideLogWindow(boolean show) -
showOrHideConnectionLogWindow
private void showOrHideConnectionLogWindow(boolean show) -
appendToConnectionLog
- Specified by:
appendToConnectionLogin interfaceIClientGUI
-
actOnReconnectCompleted
public void actOnReconnectCompleted()- Specified by:
actOnReconnectCompletedin interfaceIClientGUI
-
syncCheckboxes
public void syncCheckboxes()Ensure that Player menu checkboxes reflect the correct state. Copied the TODO below from the interface where it's now removed... TODO let the checkboxes have their own listeners instead. Or even better: use a binding framework. -
doAcquireAngel
- Specified by:
doAcquireAngelin interfaceIClientGUI
-
setBoardActive
public void setBoardActive(boolean val) - Specified by:
setBoardActivein interfaceIClientGUI
-
doPickSummonAngel
- Specified by:
doPickSummonAngelin interfaceIClientGUI
-
doPickSplitLegion
- Specified by:
doPickSplitLegionin interfaceIClientGUI
-
markLegionAsSkipSplit
-
resetAllLegionFlags
public void resetAllLegionFlags() -
isPickCarryOngoing
public boolean isPickCarryOngoing()- Specified by:
isPickCarryOngoingin interfaceIClientGUI
-
doPickCarries
- Specified by:
doPickCarriesin interfaceIClientGUI
-
getPickCarryDialog
-
handlePickCarry
-
doPickColor
- Specified by:
doPickColorin interfaceIClientGUI
-
bringUpPickColorDialog
-
doPickSplitMarker
- Specified by:
doPickSplitMarkerin interfaceIClientGUI
-
doPickInitialMarker
- Specified by:
doPickInitialMarkerin interfaceIClientGUI
-
createPickMarkerDialog
-
doPickRecruit
- Specified by:
doPickRecruitin interfaceIClientGUI
-
markLegionAsSkipRecruit
TODO This is just a HACK. PickRecruit calls this to mark a legion as that user wants to not recruit anything this turn. Better would be, if that dialog could return a "NONE" CreatureType and the caller does the work cleanly... (postponed for now because the NONE-CreatureType would be so much work right now...)- Parameters:
legion-
-
doPickRecruiter
- Specified by:
doPickRecruiterin interfaceIClientGUI
-
doPickEntrySide
- Specified by:
doPickEntrySidein interfaceIClientGUI
-
doPickLord
- Specified by:
doPickLordin interfaceIClientGUI
-
doPickStrikePenalty
- Specified by:
doPickStrikePenaltyin interfaceIClientGUI
-
tellProposal
Description copied from interface:IClientGUIInform this player about the other player's proposal.- Specified by:
tellProposalin interfaceIClientGUI
-
cleanupNegotiationDialogs
public void cleanupNegotiationDialogs()- Specified by:
cleanupNegotiationDialogsin interfaceIClientGUI
-
actOnTurnOrPlayerChange
- Specified by:
actOnTurnOrPlayerChangein interfaceIClientGUI
-
actOnGameStarting
public void actOnGameStarting()- Specified by:
actOnGameStartingin interfaceIClientGUI
-
actOnSetupSplit
public void actOnSetupSplit()- Specified by:
actOnSetupSplitin interfaceIClientGUI
-
validateLegions
private void validateLegions() -
actOnSetupMuster
public void actOnSetupMuster()- Specified by:
actOnSetupMusterin interfaceIClientGUI
-
actOnSetupMove
public void actOnSetupMove()- Specified by:
actOnSetupMovein interfaceIClientGUI
-
actOnSetupFight
public void actOnSetupFight()- Specified by:
actOnSetupFightin interfaceIClientGUI
-
actOnSetupBattleFight
public void actOnSetupBattleFight()- Specified by:
actOnSetupBattleFightin interfaceIClientGUI
-
actOnSetupBattleMove
public void actOnSetupBattleMove()- Specified by:
actOnSetupBattleMovein interfaceIClientGUI
-
actOnTellBattleMove
public void actOnTellBattleMove(BattleHex startingHex, BattleHex endingHex, boolean rememberForUndo) - Specified by:
actOnTellBattleMovein interfaceIClientGUI
-
actOnPendingBattleMoveOver
public void actOnPendingBattleMoveOver()- Specified by:
actOnPendingBattleMoveOverin interfaceIClientGUI
-
actOnDoneWithBattleMoves
public void actOnDoneWithBattleMoves()- Specified by:
actOnDoneWithBattleMovesin interfaceIClientGUI
-
actOnSetupBattleRecruit
public void actOnSetupBattleRecruit()- Specified by:
actOnSetupBattleRecruitin interfaceIClientGUI
-
actOnSetupBattleSummon
public void actOnSetupBattleSummon()- Specified by:
actOnSetupBattleSummonin interfaceIClientGUI
-
addBattleChit
-
getGUIBattleChits
Get a list of all GUIBattleChits (on the current BattleMap)- Returns:
- The list of GUIBattleChits
-
getGUIBattleChitsInHex
Find all GUIBattleChits that occupy a specified hex Note that this can be several for the offboard position(s)- Parameters:
hex- The hex to give Chits for- Returns:
- A List of GUIBattleChits
-
getGUIBattleChit
-
actOnPlaceNewChit
- Specified by:
actOnPlaceNewChitin interfaceIClientGUI
-
getBattleUnitDescription
-
actOnTellStrikeResults
public void actOnTellStrikeResults(boolean wasCarry, int strikeNumber, List<String> rolls, BattleCritter striker, BattleCritter target) - Specified by:
actOnTellStrikeResultsin interfaceIClientGUI
-
actOnHitsSet
- Specified by:
actOnHitsSetin interfaceIClientGUI
-
highlightCrittersWithTargets
public void highlightCrittersWithTargets()- Specified by:
highlightCrittersWithTargetsin interfaceIClientGUI
-
actOnApplyCarries
- Specified by:
actOnApplyCarriesin interfaceIClientGUI
-
actOnCleanupBattle
public void actOnCleanupBattle()- Specified by:
actOnCleanupBattlein interfaceIClientGUI
-
undoLastRecruit
void undoLastRecruit()For the topmost item on undo stack, undo the done recruit, or reset the skipThisTime flag if set. -
undoRecruit
For a specific clicked legion, undo the done recruit, or reset the skipThisTime flag if set.- Specified by:
undoRecruitin interfaceIClientGUI- Parameters:
legion- The legion for which to undo the recruit
-
handleUndoRecruit
This does the actual work for undoing a recruit- Parameters:
legion- The legion for which to undo the recruit
-
undoAllSplits
void undoAllSplits() -
undoLastSplit
void undoLastSplit() -
informSplitRequiredFirstRound
public void informSplitRequiredFirstRound()- Specified by:
informSplitRequiredFirstRoundin interfaceIClientGUI
-
undoLastMove
void undoLastMove() -
undoLastBattleMove
public void undoLastBattleMove()- Specified by:
undoLastBattleMovein interfaceIClientGUI
-
undoAllBattleMoves
public void undoAllBattleMoves()- Specified by:
undoAllBattleMovesin interfaceIClientGUI
-
undoAllMoves
public void undoAllMoves()- Specified by:
undoAllMovesin interfaceIClientGUI
-
undoAllRecruits
public void undoAllRecruits()- Specified by:
undoAllRecruitsin interfaceIClientGUI
-
displayNoUndoWhilePendingMovesInfo
private void displayNoUndoWhilePendingMovesInfo() -
defaultCursor
public void defaultCursor()- Specified by:
defaultCursorin interfaceIClientGUI
-
waitCursor
public void waitCursor()- Specified by:
waitCursorin interfaceIClientGUI
-
doCleanupGUI
public void doCleanupGUI()- Specified by:
doCleanupGUIin interfaceIClientGUI
-
disposeMovementDie
private void disposeMovementDie() -
getMovementDie
MovementDie getMovementDie() -
cleanupGUI
private void cleanupGUI() -
actOnTellGameOver
Update Board and Status screen to reflect the new game over state. Show the game over message, or store it to be shown later. If dispose will follow soon, don't show message immediately (to avoid having the user to have click two boxes), instead store it for later to be shown then together with the dispose dialog.- Specified by:
actOnTellGameOverin interfaceIClientGUI- Parameters:
message- The message ("XXXX wins", or "Draw")disposeFollows- If true, server will send a dispose message soon
-
getMessage
String getMessage() -
showMessageDialogAndWait
- Specified by:
showMessageDialogAndWaitin interfaceIClientGUI
-
doShowMessageDialog
-
doConfirmAndQuit
public void doConfirmAndQuit()- Specified by:
doConfirmAndQuitin interfaceIClientGUI
-
showConnectionClosedMessage
public void showConnectionClosedMessage()This is for permanent, non-reversible closed connections- Specified by:
showConnectionClosedMessagein interfaceIClientGUI
-
getMapOrBoardFrame
-
negotiateCallback
-
getOwningPlayer
-
getOwningPlayerName
-
isMyTurn
public boolean isMyTurn() -
getMover
-
setMover
-
doMove
-
actOnMoveNak
public void actOnMoveNak()- Specified by:
actOnMoveNakin interfaceIClientGUI
-
setMovePending
- Specified by:
setMovePendingin interfaceIClientGUI
-
updatePendingText
private void updatePendingText() -
getPendingMoveHexes
-
getStillToMoveHexes
-
setMoveCompleted
- Specified by:
setMoveCompletedin interfaceIClientGUI
-
removeBattleChit
- Specified by:
removeBattleChitin interfaceIClientGUI
-
getCallbackHandler
-
answerPickColor
-
leaveCarryMode
public void leaveCarryMode()- Specified by:
leaveCarryModein interfaceGUICallbacks
-
applyCarries
- Specified by:
applyCarriesin interfaceGUICallbacks
-
acquireAngelCallback
- Specified by:
acquireAngelCallbackin interfaceGUICallbacks
-
answerFlee
- Specified by:
answerFleein interfaceGUICallbacks
-
answerConcede
- Specified by:
answerConcedein interfaceGUICallbacks
-
doBattleMove
- Specified by:
doBattleMovein interfaceGUICallbacks
-
undoBattleMove
- Specified by:
undoBattleMovein interfaceGUICallbacks
-
strike
- Specified by:
strikein interfaceGUICallbacks
-
doneWithBattleMoves
public void doneWithBattleMoves()- Specified by:
doneWithBattleMovesin interfaceGUICallbacks
-
doneWithStrikes
public void doneWithStrikes()- Specified by:
doneWithStrikesin interfaceGUICallbacks
-
concede
public void concede()- Specified by:
concedein interfaceGUICallbacks
-