soc.client
Class SOCPlayerClient.ClientWindowAdapter
java.lang.Object
java.awt.event.WindowAdapter
soc.client.SOCPlayerClient.ClientWindowAdapter
- All Implemented Interfaces:
- java.awt.event.WindowFocusListener, java.awt.event.WindowListener, java.awt.event.WindowStateListener, java.util.EventListener
- Enclosing class:
- SOCPlayerClient
private static class SOCPlayerClient.ClientWindowAdapter
- extends java.awt.event.WindowAdapter
React to windowOpened, windowClosing events for GameAwtDisplay's Frame.
Method Summary |
void |
windowClosing(java.awt.event.WindowEvent evt)
User has clicked window Close button. |
void |
windowOpened(java.awt.event.WindowEvent evt)
Set focus to Nickname field |
Methods inherited from class java.awt.event.WindowAdapter |
windowActivated, windowClosed, windowDeactivated, windowDeiconified, windowGainedFocus, windowIconified, windowLostFocus, windowStateChanged |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
cli
private final SOCPlayerClient.GameAwtDisplay cli
SOCPlayerClient.ClientWindowAdapter
public SOCPlayerClient.ClientWindowAdapter(SOCPlayerClient.GameAwtDisplay c)
windowClosing
public void windowClosing(java.awt.event.WindowEvent evt)
- User has clicked window Close button.
Check for active games, before exiting.
If we are playing in a game, or running a local tcp server hosting active games,
ask the user to confirm if possible.
- Specified by:
windowClosing
in interface java.awt.event.WindowListener
- Overrides:
windowClosing
in class java.awt.event.WindowAdapter
windowOpened
public void windowOpened(java.awt.event.WindowEvent evt)
- Set focus to Nickname field
- Specified by:
windowOpened
in interface java.awt.event.WindowListener
- Overrides:
windowOpened
in class java.awt.event.WindowAdapter