game.libraries.general
Class AbstractExit

java.lang.Object
  |
  +--game.libraries.general.AbstractExit
Direct Known Subclasses:
Exit

public abstract class AbstractExit
extends java.lang.Object


Field Summary
static javax.swing.AbstractAction listener
          Use only one exit listener for the whole program.
static java.awt.event.WindowListener windowListener
          Use only one windows event listener.
 
Constructor Summary
protected AbstractExit()
           
 
Method Summary
protected abstract  void apply()
          The cleanup callback.
static void cleanup()
          Clean up the program and exit.
static void direct()
          Direct exit, no cleanup.
static void error(int value)
          Error exit.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

listener

public static javax.swing.AbstractAction listener
Use only one exit listener for the whole program.


windowListener

public static java.awt.event.WindowListener windowListener
Use only one windows event listener.

Constructor Detail

AbstractExit

protected AbstractExit()
Method Detail

cleanup

public static void cleanup()
Clean up the program and exit.


direct

public static void direct()
Direct exit, no cleanup.


error

public static void error(int value)
Error exit.

Parameters:
value - error on exit.

apply

protected abstract void apply()
The cleanup callback.