FileDocCategorySizeDatePackage
WindowEvent.javaAPI DocAndroid 1.5 API4829Wed May 06 22:41:54 BST 2009java.awt.event

WindowEvent

public class WindowEvent extends ComponentEvent
This class is not supported in Android 1.0. It is merely provided to maintain interface compatibility with desktop Java implementations.
since
Android 1.0

Fields Summary
private static final long
serialVersionUID
public static final int
WINDOW_FIRST
public static final int
WINDOW_OPENED
public static final int
WINDOW_CLOSING
public static final int
WINDOW_CLOSED
public static final int
WINDOW_ICONIFIED
public static final int
WINDOW_DEICONIFIED
public static final int
WINDOW_ACTIVATED
public static final int
WINDOW_DEACTIVATED
public static final int
WINDOW_GAINED_FOCUS
public static final int
WINDOW_LOST_FOCUS
public static final int
WINDOW_STATE_CHANGED
public static final int
WINDOW_LAST
private int
oldState
private int
newState
Constructors Summary
public WindowEvent()


    //???AWT
    /*
    public WindowEvent(Window source, int id) {
        this(source, id, null);
    }

    public WindowEvent(Window source, int id, Window opposite) {
        this(source, id, opposite, Frame.NORMAL, Frame.NORMAL);
    }

    public WindowEvent(Window source, int id, int oldState, int newState) {
        this(source, id, null, oldState, newState);
    }

    public WindowEvent(Window source, int id, Window opposite, 
                       int oldState, int newState) {
        super(source, id);

        oppositeWindow = opposite;
        this.oldState = oldState;
        this.newState = newState;
    }
    */
    //???AWT: Fake constructor
      
        super(null, 0);
    
Methods Summary
public intgetNewState()

        return newState;
    
public intgetOldState()

        return oldState;
    
public java.lang.StringparamString()

        /* The format is based on 1.5 release behavior 
         * which can be revealed by the following code:
         * 
         * WindowEvent e = new WindowEvent(new Frame(), 
         *          WindowEvent.WINDOW_OPENED); 
         * System.out.println(e);
         */

        String typeString = null;

        switch (id) {
        case WINDOW_OPENED:
            typeString = "WINDOW_OPENED"; //$NON-NLS-1$
            break;
        case WINDOW_CLOSING:
            typeString = "WINDOW_CLOSING"; //$NON-NLS-1$
            break;
        case WINDOW_CLOSED:
            typeString = "WINDOW_CLOSED"; //$NON-NLS-1$
            break;
        case WINDOW_ICONIFIED:
            typeString = "WINDOW_ICONIFIED"; //$NON-NLS-1$
            break;
        case WINDOW_DEICONIFIED:
            typeString = "WINDOW_DEICONIFIED"; //$NON-NLS-1$
            break;
        case WINDOW_ACTIVATED:
            typeString = "WINDOW_ACTIVATED"; //$NON-NLS-1$
            break;
        case WINDOW_DEACTIVATED:
            typeString = "WINDOW_DEACTIVATED"; //$NON-NLS-1$
            break;
        case WINDOW_GAINED_FOCUS:
            typeString = "WINDOW_GAINED_FOCUS"; //$NON-NLS-1$
            break;
        case WINDOW_LOST_FOCUS:
            typeString = "WINDOW_LOST_FOCUS"; //$NON-NLS-1$
            break;
        case WINDOW_STATE_CHANGED:
            typeString = "WINDOW_STATE_CHANGED"; //$NON-NLS-1$
            break;
        default:
            typeString = "unknown type"; //$NON-NLS-1$
        }

        //???AWT
        /*
        return typeString + ",opposite=" + oppositeWindow + //$NON-NLS-1$
                ",oldState=" + oldState + ",newState=" + newState; //$NON-NLS-1$ //$NON-NLS-2$
        */
        return typeString;