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

FocusEvent

public class FocusEvent 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
FOCUS_FIRST
public static final int
FOCUS_LAST
public static final int
FOCUS_GAINED
public static final int
FOCUS_LOST
private boolean
temporary
private Component
opposite
Constructors Summary
public FocusEvent(Component source, int id)


         
        this(source, id, false);
    
public FocusEvent(Component source, int id, boolean temporary)

        this(source, id, temporary, null);
    
public FocusEvent(Component source, int id, boolean temporary, Component opposite)

        super(source, id);
        this.temporary = temporary;
        this.opposite = opposite;
    
Methods Summary
public java.awt.ComponentgetOppositeComponent()

        return opposite;
    
public booleanisTemporary()

        return temporary;
    
public java.lang.StringparamString()

        /* The format is based on 1.5 release behavior 
         * which can be revealed by the following code:
         * 
         * FocusEvent e = new FocusEvent(new Button("Button0"),
         *       FocusEvent.FOCUS_GAINED, false, new Button("Button1"));
         * System.out.println(e);
         */

        String idString = null;

        switch (id) {
        case FOCUS_GAINED:
            idString = "FOCUS_GAINED"; //$NON-NLS-1$
            break;
        case FOCUS_LOST:
            idString = "FOCUS_LOST"; //$NON-NLS-1$
            break;
        default:
            idString = "unknown type"; //$NON-NLS-1$
        }

        return (idString +
                (temporary ? ",temporary" : ",permanent") + //$NON-NLS-1$ //$NON-NLS-2$
                ",opposite=" + opposite); //$NON-NLS-1$