soc.client
Class SOCPlayerInterface.PIWindowAdapter

java.lang.Object
  extended by java.awt.event.WindowAdapter
      extended by soc.client.SOCPlayerInterface.PIWindowAdapter
All Implemented Interfaces:
java.awt.event.WindowFocusListener, java.awt.event.WindowListener, java.awt.event.WindowStateListener, java.util.EventListener
Enclosing class:
SOCPlayerInterface

private static class SOCPlayerInterface.PIWindowAdapter
extends java.awt.event.WindowAdapter

React to window closing or losing focus (deactivation).

Since:
1.1.00
Author:
jdmonin

Field Summary
private  SOCPlayerClient.GameAwtDisplay gd
           
private  SOCPlayerInterface pi
           
 
Constructor Summary
SOCPlayerInterface.PIWindowAdapter(SOCPlayerClient.GameAwtDisplay gd, SOCPlayerInterface spi)
           
 
Method Summary
 void windowClosed(java.awt.event.WindowEvent e)
          Clean up after the window is closed.
 void windowClosing(java.awt.event.WindowEvent e)
          Ask if player is sure - Leave the game when the window closes.
 void windowDeactivated(java.awt.event.WindowEvent e)
          When window loses focus, if 6-player, unexpand the chat window if needed.
 
Methods inherited from class java.awt.event.WindowAdapter
windowActivated, windowDeiconified, windowGainedFocus, windowIconified, windowLostFocus, windowOpened, windowStateChanged
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

gd

private final SOCPlayerClient.GameAwtDisplay gd

pi

private final SOCPlayerInterface pi
Constructor Detail

SOCPlayerInterface.PIWindowAdapter

public SOCPlayerInterface.PIWindowAdapter(SOCPlayerClient.GameAwtDisplay gd,
                                          SOCPlayerInterface spi)
Method Detail

windowClosing

public void windowClosing(java.awt.event.WindowEvent e)
Ask if player is sure - Leave the game when the window closes. If they're observing, not playing, the window can close immediately.

Specified by:
windowClosing in interface java.awt.event.WindowListener
Overrides:
windowClosing in class java.awt.event.WindowAdapter

windowDeactivated

public void windowDeactivated(java.awt.event.WindowEvent e)
When window loses focus, if 6-player, unexpand the chat window if needed.

Specified by:
windowDeactivated in interface java.awt.event.WindowListener
Overrides:
windowDeactivated in class java.awt.event.WindowAdapter
Since:
1.1.12

windowClosed

public void windowClosed(java.awt.event.WindowEvent e)
Clean up after the window is closed. Close the GameStatisticsFrame if showing, etc.

Specified by:
windowClosed in interface java.awt.event.WindowListener
Overrides:
windowClosed in class java.awt.event.WindowAdapter
Since:
2.0.00