FocusEventpublic 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. |
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.Component | getOppositeComponent()
return opposite;
| public boolean | isTemporary()
return temporary;
| public java.lang.String | paramString()
/* 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$
|
|