Package net.sf.colossus.webclient
Class WebClient
java.lang.Object
java.awt.Component
java.awt.Container
java.awt.Window
java.awt.Frame
javax.swing.JFrame
net.sf.colossus.guiutil.KFrame
net.sf.colossus.webclient.WebClient
- All Implemented Interfaces:
ImageObserver
,MenuContainer
,Serializable
,Accessible
,RootPaneContainer
,WindowConstants
,IWebClient
This is the main class for one user client for the web server.
One such client can register and/or login to the web server,
propose a game, browse proposed games and enroll to such a game.
When a game has enough players, it can be started, and this
brings up the MasterBoard like the network client would do.
- Author:
- Clemens Katzer
- See Also:
-
Nested Class Summary
Nested ClassesNested classes/interfaces inherited from class javax.swing.JFrame
JFrame.AccessibleJFrame
Nested classes/interfaces inherited from class java.awt.Frame
Frame.AccessibleAWTFrame
Nested classes/interfaces inherited from class java.awt.Window
Window.AccessibleAWTWindow, Window.Type
Nested classes/interfaces inherited from class java.awt.Container
Container.AccessibleAWTContainer
Nested classes/interfaces inherited from class java.awt.Component
Component.AccessibleAWTComponent, Component.BaselineResizeBehavior, Component.BltBufferStrategy, Component.FlipBufferStrategy
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate Box
private JTextField
private JTextField
private JCheckBox
private static final String
private static final String
private static final String
private static final String
private JRadioButton
private JRadioButton
private JRadioButton
private JCheckBox
private static final String
private JCheckBox
private JTextField
private JTextField
private JButton
private static final String
private static final String
private static final String
(package private) static final String
private static final String
private static final String
private boolean
private boolean
private final Object
private JTextField
private static final String
private static final String
private Box
private JButton
private final Point
private static final String
private static String
private static String
private JButton
private JTextField
private JButton
private static final String
private static final int
private String
(package private) static final String
(package private) static final String
private JComboBox
private boolean
private boolean
private Client
NOTE: shared with SocketThread, because WCST needs it to restore game tokens to an GameInfo objectprivate JTextField
private RunGameInSameJVM
private JPanel
private JPanel
private ChatHandler
private JButton
private JLabel
private static final String
private String
private static final String
private JLabel
private boolean
private Server
private static final int
private static final Logger
private String
private static final String
private JTextField
private JButton
private static final String
private JLabel
private static final int
private static final int
private DateFormat
(package private) static final Locale
private DateFormat
(package private) static final String
private JTextField
private JTextField
private static final int
private JLabel
private static final String
private final Options
private String
private JPasswordField
private static final int
(package private) static final String
private int
private JPanel
private JPanel
private JButton
private static final String
private GameTableModel
private JTable
private JButton
private static final String
private JLabel
private JButton
private JLabel
private RegisterPasswordPanel
private JButton
private GameTableModel
private JTable
private Box
private boolean
private static final String
private IWebServer
private Box
private JButton
private JSpinner
private JSpinner
private JSpinner
private JButton
private static final String
(package private) static final String
private String
private int
private String
private GameInfo
private JButton
private static final String
private int
private JLabel
private JLabel
private String
private JTextField
private JTabbedPane
private boolean
(package private) static final String
(package private) static final String
private JButton
private static final String
private JCheckBox
private JLabel
private String
private int
private int
private int
private long
private int
private String
private JComboBox
private JComboBox
(package private) static final String
private JButton
private static final String
private static final int
private String
(package private) static final String
static final int
static final int
static final int
private WebClientSocketThread
(package private) static final int
private JTextField
private JTextField
private final WhatNextManager
private static String
Fields inherited from class javax.swing.JFrame
accessibleContext, rootPane, rootPaneCheckingEnabled
Fields inherited from class java.awt.Frame
CROSSHAIR_CURSOR, DEFAULT_CURSOR, E_RESIZE_CURSOR, HAND_CURSOR, ICONIFIED, MAXIMIZED_BOTH, MAXIMIZED_HORIZ, MAXIMIZED_VERT, MOVE_CURSOR, N_RESIZE_CURSOR, NE_RESIZE_CURSOR, NORMAL, NW_RESIZE_CURSOR, S_RESIZE_CURSOR, SE_RESIZE_CURSOR, SW_RESIZE_CURSOR, TEXT_CURSOR, W_RESIZE_CURSOR, WAIT_CURSOR
Fields inherited from class java.awt.Component
BOTTOM_ALIGNMENT, CENTER_ALIGNMENT, LEFT_ALIGNMENT, RIGHT_ALIGNMENT, TOP_ALIGNMENT
Fields inherited from interface java.awt.image.ImageObserver
ABORT, ALLBITS, ERROR, FRAMEBITS, HEIGHT, PROPERTIES, SOMEBITS, WIDTH
Fields inherited from interface net.sf.colossus.webcommon.IWebClient
alreadyLoggedIn, chatDeliver, connectionClosed, didEnroll, didUnenroll, forcedLogout, gameCancelled, gameInfo, gameStarted, gameStartsNow, gameStartsSoon, generalMessage, grantAdmin, pingRequest, requestAttention, systemMessage, tooManyUsers, userInfo, watchGameInfo
Fields inherited from interface javax.swing.WindowConstants
DISPOSE_ON_CLOSE, DO_NOTHING_ON_CLOSE, EXIT_ON_CLOSE, HIDE_ON_CLOSE
-
Constructor Summary
ConstructorsConstructorDescriptionWebClient
(WhatNextManager whatNextManager, String hostname, int port, String login, String password) -
Method Summary
Modifier and TypeMethodDescriptionprivate void
private void
addRadioButton
(Container cont, ButtonGroup group, String text, String current, ItemListener listener) private void
adjustToPossibleMax
(JSpinner spinner, int max) private void
void
private void
private void
void
chatDeliver
(String chatId, long when, String sender, String message, boolean resent) private boolean
private boolean
private boolean
private boolean
checkIfCouldStartOnServer
(int state) private boolean
private boolean
checkIfCouldWatch
(int state) void
void
connectionReset
(boolean forced) private void
private void
createLoginWebClientSocketThread
(boolean force) private void
createRegisterWebClientSocketThread
(String username, String password, String email, String confCode) private void
private void
private void
void
deliverGeneralMessage
(long when, boolean error, String title, String message) void
void
didUnenroll
(String gameId, String user) private void
displayOnlyOneInstantGameMessage
(String action, String message) void
dispose()
private void
do_proposeGame
(String variant, String viewmode, long startAt, int duration, String summary, String expire, boolean unlimMulli, boolean balTowers, int min, int target, int max) private void
private void
void
private boolean
void
doLogin()
void
doLogout()
private void
doQuit()
private void
doRegisterOrPasswordDialog
(boolean register) void
(package private) boolean
private boolean
doStartLocally
(String gameId) private boolean
doUnenroll
(String gameId) void
private void
private void
private void
executeLoginLogoutButtonAction
(String command) private GameInfo
findGameById
(String gameId) private GameInfo
findGameByIdNoComplaint
(String gameId) Find all "relevant" instant games owned by this player (relevant means except those who are running, ending or deleted).void
gameCancelled
(String gameId, String byUser) void
void
gameStartsNow
(String gameId, int port, String hostingHost) void
gameStartsSoon
(String gameId, String startUser) int
private int
getHost()
private int
getMaxForVariant
(String variant) private Calendar
getNowPlusOffset
(Calendar now, int days, int hours) Determine a point in time given amount of days and hours from now.getPort()
boolean
private long
private String
private String
void
private void
private void
void
void
void
informStartingOnPlayerHost
(String hostingPlayer, String hostingHost, int hostingPort) private void
private void
initValues
(String hostname, int port, String login, String password) boolean
isAdmin()
private boolean
Returns true if this user would be allowed to start this game (given that all other conditions are fulfilled).private boolean
private boolean
private void
(package private) void
loginLogoutButtonAction
(String command) private void
logout()
private String
private String
makeInfoTextForState
(int state) private String
makeStatusTextForState
(int state) private Box
private Box
makeTextBox2
(Component c, Component c2) private String
makeWindowTitleForState
(int state) private JLabel
nonBoldLabel
(String text) void
notifyComingUp
(boolean success) void
private GameInfo
If there is at least one instant game by this player, return it (one of it if many), otherwise null.private void
private void
void
private void
registerOrPasswordButtonAction
(String command) private void
private void
replaceInTable
(JTable table, GameInfo gi) void
requestAttention
(long when, String byUser, boolean byAdmin, String message, int beepCount, long beepInterval, boolean windows) private void
private void
setAdmin
(boolean isAdmin) void
void
setLocalServer
(Server server) private void
setScheduledGamesMode
(boolean scheduled) private void
setupGUI()
private Timer
void
setWatching
(String gameId) void
showAnswer
(String s) private void
private void
private void
private void
void
startOwnClient
(String gameId, int port, String hostingHost) void
startSpectatorClient
(String gameId, int port, String hostingHost) void
systemMessage
(long when, String message) void
tryChangePassword
(String name, String oldPW, String newPW1) private void
private void
void
private void
updateMaxSpinner
(String variant) void
updateStatus
(String text, Color color) void
boolean
validateField
(Component parent, String content, String fieldName) (package private) boolean
validatePort
(Component parent, String portText) boolean
private void
void
watchGameInfo
(String gameId, String host, int port) Methods inherited from class net.sf.colossus.guiutil.KFrame
centerOnScreen, setVisible, useSaveWindow
Methods inherited from class javax.swing.JFrame
addImpl, createRootPane, frameInit, getAccessibleContext, getContentPane, getDefaultCloseOperation, getGlassPane, getGraphics, getJMenuBar, getLayeredPane, getRootPane, getTransferHandler, isDefaultLookAndFeelDecorated, isRootPaneCheckingEnabled, paramString, processWindowEvent, remove, repaint, setContentPane, setDefaultCloseOperation, setDefaultLookAndFeelDecorated, setGlassPane, setIconImage, setJMenuBar, setLayeredPane, setLayout, setRootPane, setRootPaneCheckingEnabled, setTransferHandler, update
Methods inherited from class java.awt.Frame
addNotify, getCursorType, getExtendedState, getFrames, getIconImage, getMaximizedBounds, getMenuBar, getState, getTitle, isResizable, isUndecorated, remove, removeNotify, setBackground, setCursor, setExtendedState, setMaximizedBounds, setMenuBar, setOpacity, setResizable, setShape, setState, setTitle, setUndecorated
Methods inherited from class java.awt.Window
addPropertyChangeListener, addPropertyChangeListener, addWindowFocusListener, addWindowListener, addWindowStateListener, applyResourceBundle, applyResourceBundle, createBufferStrategy, createBufferStrategy, getBackground, getBufferStrategy, getFocusableWindowState, getFocusCycleRootAncestor, getFocusOwner, getFocusTraversalKeys, getIconImages, getInputContext, getListeners, getLocale, getModalExclusionType, getMostRecentFocusOwner, getOpacity, getOwnedWindows, getOwner, getOwnerlessWindows, getShape, getToolkit, getType, getWarningString, getWindowFocusListeners, getWindowListeners, getWindows, getWindowStateListeners, hide, isActive, isAlwaysOnTop, isAlwaysOnTopSupported, isAutoRequestFocus, isFocusableWindow, isFocusCycleRoot, isFocused, isLocationByPlatform, isOpaque, isShowing, isValidateRoot, pack, paint, postEvent, processEvent, processWindowFocusEvent, processWindowStateEvent, removeWindowFocusListener, removeWindowListener, removeWindowStateListener, reshape, setAlwaysOnTop, setAutoRequestFocus, setBounds, setBounds, setCursor, setFocusableWindowState, setFocusCycleRoot, setIconImages, setLocation, setLocation, setLocationByPlatform, setLocationRelativeTo, setMinimumSize, setModalExclusionType, setSize, setSize, setType, show, toBack, toFront
Methods inherited from class java.awt.Container
add, add, add, add, add, addContainerListener, applyComponentOrientation, areFocusTraversalKeysSet, countComponents, deliverEvent, doLayout, findComponentAt, findComponentAt, getAlignmentX, getAlignmentY, getComponent, getComponentAt, getComponentAt, getComponentCount, getComponents, getComponentZOrder, getContainerListeners, getFocusTraversalPolicy, getInsets, getLayout, getMaximumSize, getMinimumSize, getMousePosition, getPreferredSize, insets, invalidate, isAncestorOf, isFocusCycleRoot, isFocusTraversalPolicyProvider, isFocusTraversalPolicySet, layout, list, list, locate, minimumSize, paintComponents, preferredSize, print, printComponents, processContainerEvent, remove, removeAll, removeContainerListener, setComponentZOrder, setFocusTraversalKeys, setFocusTraversalPolicy, setFocusTraversalPolicyProvider, setFont, transferFocusDownCycle, validate, validateTree
Methods inherited from class java.awt.Component
action, add, addComponentListener, addFocusListener, addHierarchyBoundsListener, addHierarchyListener, addInputMethodListener, addKeyListener, addMouseListener, addMouseMotionListener, addMouseWheelListener, bounds, checkImage, checkImage, coalesceEvents, contains, contains, createImage, createImage, createVolatileImage, createVolatileImage, disable, disableEvents, dispatchEvent, enable, enable, enableEvents, enableInputMethods, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, getBaseline, getBaselineResizeBehavior, getBounds, getBounds, getColorModel, getComponentListeners, getComponentOrientation, getCursor, getDropTarget, getFocusListeners, getFocusTraversalKeysEnabled, getFont, getFontMetrics, getForeground, getGraphicsConfiguration, getHeight, getHierarchyBoundsListeners, getHierarchyListeners, getIgnoreRepaint, getInputMethodListeners, getInputMethodRequests, getKeyListeners, getLocation, getLocation, getLocationOnScreen, getMouseListeners, getMouseMotionListeners, getMousePosition, getMouseWheelListeners, getName, getParent, getPropertyChangeListeners, getPropertyChangeListeners, getSize, getSize, getTreeLock, getWidth, getX, getY, gotFocus, handleEvent, hasFocus, imageUpdate, inside, isBackgroundSet, isCursorSet, isDisplayable, isDoubleBuffered, isEnabled, isFocusable, isFocusOwner, isFocusTraversable, isFontSet, isForegroundSet, isLightweight, isMaximumSizeSet, isMinimumSizeSet, isPreferredSizeSet, isValid, isVisible, keyDown, keyUp, list, list, list, location, lostFocus, mouseDown, mouseDrag, mouseEnter, mouseExit, mouseMove, mouseUp, move, nextFocus, paintAll, prepareImage, prepareImage, printAll, processComponentEvent, processFocusEvent, processHierarchyBoundsEvent, processHierarchyEvent, processInputMethodEvent, processKeyEvent, processMouseEvent, processMouseMotionEvent, processMouseWheelEvent, removeComponentListener, removeFocusListener, removeHierarchyBoundsListener, removeHierarchyListener, removeInputMethodListener, removeKeyListener, removeMouseListener, removeMouseMotionListener, removeMouseWheelListener, removePropertyChangeListener, removePropertyChangeListener, repaint, repaint, repaint, requestFocus, requestFocus, requestFocus, requestFocus, requestFocusInWindow, requestFocusInWindow, requestFocusInWindow, resize, resize, revalidate, setComponentOrientation, setDropTarget, setEnabled, setFocusable, setFocusTraversalKeysEnabled, setForeground, setIgnoreRepaint, setLocale, setMaximumSize, setMixingCutoutShape, setName, setPreferredSize, show, size, toString, transferFocus, transferFocusBackward, transferFocusUpCycle
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
Methods inherited from interface java.awt.MenuContainer
getFont, postEvent
-
Field Details
-
LOGGER
-
WC_VERSION_GENERAL_MESSAGE
public static final int WC_VERSION_GENERAL_MESSAGE- See Also:
-
WC_VERSION_SUPPORTS_PING
public static final int WC_VERSION_SUPPORTS_PING- See Also:
-
WC_VERSION_DINO_OK
public static final int WC_VERSION_DINO_OK- See Also:
-
WEB_CLIENT_VERSION
static final int WEB_CLIENT_VERSION- See Also:
-
myLocale
-
CARD_PROPOSED
- See Also:
-
TYPE_SCHEDULED
- See Also:
-
TYPE_INSTANTLY
- See Also:
-
whatNextManager
-
hostname
-
port
private int port -
login
-
username
-
password
-
isAdmin
private boolean isAdmin -
options
-
gameClient
-
gameRunner
-
localServer
-
startedGameId
-
startedAtPort
private int startedAtPort -
startedAtHost
-
registerPanel
-
comingUpMutex
-
timeIsUp
private boolean timeIsUp -
clientIsUp
private boolean clientIsUp -
clientStartFailed
private boolean clientStartFailed -
NotLoggedIn
private static final int NotLoggedIn- See Also:
-
LoggedIn
private static final int LoggedIn- See Also:
-
EnrolledInstantGame
private static final int EnrolledInstantGame- See Also:
-
Playing
private static final int Playing- See Also:
-
Watching
private static final int Watching- See Also:
-
startingGame
-
minPort
private static final int minPort- See Also:
-
maxPort
private static final int maxPort- See Also:
-
sep
- See Also:
-
failedDueToDuplicateLogin
private boolean failedDueToDuplicateLogin -
failedDueToOwnCancel
private boolean failedDueToOwnCancel -
state
private int state -
enrolledInstantGameId
-
watchingInstantGameId
-
scheduledGamesMode
private boolean scheduledGamesMode -
usersLoggedIn
private int usersLoggedIn -
usersEnrolled
private int usersEnrolled -
usersPlaying
private int usersPlaying -
usersDead
private int usersDead -
usersLogoffAgo
private long usersLogoffAgo -
usersText
-
server
-
wcst
-
tabbedPane
-
serverTab
-
preferencesPane
-
createGamesTab
-
runningGamesTab
-
adminTab
-
defaultLocation
-
statusLabel
-
userinfoLabel
-
webserverHostField
-
webserverPortField
-
loginField
-
passwordField
-
commandField
-
receivedField
-
loginLogoutButton
-
quitButton
-
autologinCB
-
autoGamePaneCB
-
registerOrPasswordLabel
-
registerOrPasswordButton
-
debugSubmitButton
-
rereadLoginMsgButton
-
shutdownButton
-
dumpInfoButton
-
notifyMessageField
-
notifyUserField
-
beepCountField
-
beepIntervalField
-
statusField
-
statusText
-
variantBox
-
viewmodeBox
-
eventExpiringBox
-
spinner1
-
spinner2
-
spinner3
-
maxLabel
-
unlimitedMulligansCB
-
balancedTowersCB
-
nowDateAndTimeLabel
-
atDateField
-
atTimeField
-
durationField
-
summaryText
-
myDateFormat
-
myTimeFormat
-
proposeButton
-
cancelButton
-
enrollButton
-
unenrollButton
-
startButton
-
startLocallyButton
-
watchButton
-
hideButton
-
hideButtonText
-
gameNrField
-
autoGSNothingRB
-
autoGSHideRB
-
autoGSCloseRB
-
infoTextLabel
-
needLoginText
- See Also:
-
enrollText
- See Also:
-
startClickedText
- See Also:
-
waitingText
- See Also:
-
enrolledText
- See Also:
-
playingText
- See Also:
-
watchingText
- See Also:
-
generalChat
-
gamesUpdates
-
gameHash
NOTE: shared with SocketThread, because WCST needs it to restore game tokens to an GameInfo object -
deletedGames
-
gamesTablesPanel
-
gamesCards
-
propGamesCard
-
proposedGameTable
-
proposedGameDataModel
-
runGameTable
-
runGameDataModel
-
windowTitle
-
LoginButtonText
- See Also:
-
LogoutButtonText
- See Also:
-
CancelLoginButtonText
- See Also:
-
quitButtonText
- See Also:
-
HideButtonText
- See Also:
-
WatchButtonText
- See Also:
-
CantHideText
- See Also:
-
HowtoUnhideText
- See Also:
-
createAccountButtonText
- See Also:
-
chgPasswordButtonText
- See Also:
-
ProposeButtonText
- See Also:
-
EnrollButtonText
- See Also:
-
UnenrollButtonText
- See Also:
-
CancelButtonText
- See Also:
-
StartButtonText
- See Also:
-
StartLocallyButtonText
- See Also:
-
AutoLoginCBText
- See Also:
-
AutoGamePaneCBText
- See Also:
-
createAccountLabelText
- See Also:
-
chgPasswordLabelText
- See Also:
-
AutoGameStartActionNothing
- See Also:
-
AutoGameStartActionHide
- See Also:
-
AutoGameStartActionClose
- See Also:
-
optAutoGameStartAction
- See Also:
-
defaultSummaryText
- See Also:
-
dialogTitle
-
dialogMessage
-
-
Constructor Details
-
WebClient
public WebClient(WhatNextManager whatNextManager, String hostname, int port, String login, String password)
-
-
Method Details
-
getClientVersion
public int getClientVersion()- Specified by:
getClientVersion
in interfaceIWebClient
-
initValues
-
setGameClient
-
setScheduledGamesMode
private void setScheduledGamesMode(boolean scheduled) -
getScheduledGamesMode
public boolean getScheduledGamesMode() -
onGameStartAutoAction
public void onGameStartAutoAction() -
setupGUI
private void setupGUI() -
autoActions
private void autoActions() -
doAutoGSAction
private void doAutoGSAction() -
updateStatus
-
addAdminTab
private void addAdminTab() -
removeAdminTab
private void removeAdminTab() -
setAdmin
private void setAdmin(boolean isAdmin) -
isAdmin
public boolean isAdmin() -
showAnswer
-
getHost
-
getPort
-
getGameRunner
-
getWhomToNotify
-
createServerTab
private void createServerTab() -
addRadioButton
private void addRadioButton(Container cont, ButtonGroup group, String text, String current, ItemListener listener) -
nonBoldLabel
-
makeTextBox
-
makeTextBox2
-
initFormats
private void initFormats() -
makeDateTimeInfoString
-
updateDateTimeInfoString
private void updateDateTimeInfoString() -
createCreateGamesTab
private void createCreateGamesTab() -
getNowPlusOffset
Determine a point in time given amount of days and hours from now. Round it to a full hour (down if min <= 10, next hour otherwise).- Parameters:
days
-hours
-- Returns:
-
reactOnScheduleRadioButtonChange
-
createPreferencesPane
private void createPreferencesPane() -
updateMaxSpinner
-
adjustToPossibleMax
-
getMaxForVariant
-
createRunningGamesTab
private void createRunningGamesTab() -
createAdminTab
private void createAdminTab() -
beepButtonAction
public void beepButtonAction() -
createLoginWebClientSocketThread
-
createRegisterWebClientSocketThread
-
logout
private void logout() -
doQuit
private void doQuit() -
dispose
public void dispose() -
getUserinfoText
-
updateGUI
public void updateGUI() -
getSelectedGameId
-
getSelectedGameFromRunTableId
-
makeWindowTitleForState
-
makeInfoTextForState
-
makeStatusTextForState
-
isEligibleToStart
Returns true if this user would be allowed to start this game (given that all other conditions are fulfilled). Usually the allowed player is the one who created it, but if that one is not enrolled, the first of the enrolled ones is allowed then to do it.- Parameters:
gi
-- Returns:
- Whether this player would be allowed to start this game
-
checkIfCouldWatch
private boolean checkIfCouldWatch(int state) -
checkIfCouldStartOnServer
private boolean checkIfCouldStartOnServer(int state) -
isScheduledGameAndStartable
-
checkIfCouldPropose
private boolean checkIfCouldPropose() -
checkIfCouldCancel
private boolean checkIfCouldCancel() -
checkIfCouldEnroll
private boolean checkIfCouldEnroll() -
checkIfCouldUnenroll
private boolean checkIfCouldUnenroll() -
doUpdateGUI
public void doUpdateGUI() -
getGameHash
-
findGameByIdNoComplaint
-
findGameById
-
isOwner
-
validateField
-
validatePort
-
doLogin
public void doLogin() -
doCancelConnect
public void doCancelConnect() -
validateServerAndPort
public boolean validateServerAndPort() -
doLogout
public void doLogout() -
cancelOwnInstantGameOnLogout
private void cancelOwnInstantGameOnLogout() -
doRegisterOrPasswordDialog
private void doRegisterOrPasswordDialog(boolean register) -
tryChangePassword
-
doCancel
-
doScheduleDummy
public void doScheduleDummy() -
do_proposeGame
-
getStartTime
private long getStartTime() -
getDuration
private int getDuration() -
getSummaryText
-
doEnroll
-
doUnenroll
-
doStart
-
doStartLocally
-
informStartingOnPlayerHost
-
informGameStartedLocally
public void informGameStartedLocally() -
informLocallyGameOver
public void informLocallyGameOver() -
setLocalServer
-
grantAdminStatus
public void grantAdminStatus()- Specified by:
grantAdminStatus
in interfaceIWebClient
-
didEnroll
- Specified by:
didEnroll
in interfaceIWebClient
-
didUnenroll
- Specified by:
didUnenroll
in interfaceIWebClient
-
setWatching
-
clearWatching
public void clearWatching() -
gameStartsSoon
- Specified by:
gameStartsSoon
in interfaceIWebClient
-
notifyComingUp
public void notifyComingUp(boolean success) -
setupTimer
-
gameStartsNow
- Specified by:
gameStartsNow
in interfaceIWebClient
-
startOwnClient
-
startSpectatorClient
-
gameCancelled
- Specified by:
gameCancelled
in interfaceIWebClient
-
chatDeliver
- Specified by:
chatDeliver
in interfaceIWebClient
-
watchGameInfo
- Specified by:
watchGameInfo
in interfaceIWebClient
-
requestAttention
public void requestAttention(long when, String byUser, boolean byAdmin, String message, int beepCount, long beepInterval, boolean windows) - Specified by:
requestAttention
in interfaceIWebClient
-
showRequestAttentionMessage
private void showRequestAttentionMessage() -
deliverGeneralMessage
- Specified by:
deliverGeneralMessage
in interfaceIWebClient
-
systemMessage
- Specified by:
systemMessage
in interfaceIWebClient
-
tellGameEnds
public void tellGameEnds() -
userInfo
- Specified by:
userInfo
in interfaceIWebClient
-
gameInfo
- Specified by:
gameInfo
in interfaceIWebClient
-
handleGameInfoUpdates
-
replaceInTable
-
connectionReset
public void connectionReset(boolean forced) - Specified by:
connectionReset
in interfaceIWebClient
-
hideButtonAction
private void hideButtonAction() -
watchButtonAction
private void watchButtonAction() -
loadGameButtonAction
private void loadGameButtonAction() -
quitButtonAction
private void quitButtonAction() -
loginLogoutButtonAction
-
executeLoginLogoutButtonAction
-
rereadLoginMsgButtonAction
private void rereadLoginMsgButtonAction() -
shutdownButtonAction
private void shutdownButtonAction() -
dumpInfoButtonAction
private void dumpInfoButtonAction() -
debugSubmitButtonAction
private void debugSubmitButtonAction() -
registerOrPasswordButtonAction
-
startLocallyButtonAction
private void startLocallyButtonAction() -
startButtonAction
private void startButtonAction() -
cancelButtonAction
private void cancelButtonAction() -
unenrollButtonAction
private void unenrollButtonAction() -
findMyInstantGames
Find all "relevant" instant games owned by this player (relevant means except those who are running, ending or deleted). Normally there should ever be only one, but in strange cases... (like, game start failed or something...) -
ownInstantGameIfAny
If there is at least one instant game by this player, return it (one of it if many), otherwise null. Normally there should ever be only one, but in strange cases... (like, game start failed or something...)- Returns:
- The (or: any) instant game or null
-
displayOnlyOneInstantGameMessage
-
enrollButtonAction
private void enrollButtonAction() -
proposeButtonAction
private void proposeButtonAction()
-