| java.awt.event.ComponentEvent java.awt.event.FocusEvent
FocusEvent | public class FocusEvent extends ComponentEvent (Code) | | The component-level focus event.
There are two levels of focus change events: permanent and temporary.
Permanent focus change events occur when focus is directly moved
from one component to another, such as through calls to requestFocus()
or as the user uses the Tab key to traverse components.
Temporary focus change events occur when focus is temporarily
gained or lost for a component as the indirect result of another
operation, such as window deactivation or a scrollbar drag. In this
case, the original focus state will automatically be restored once
that operation is finished, or, for the case of window deactivation,
when the window is reactivated. Both permanent and temporary focus
events are delivered using the FOCUS_GAINED and FOCUS_LOST event ids;
the levels may be distinguished in the event using the isTemporary()
method.
version: 1.20 08/19/02 author: Carl Quinn author: Amy Fowler |
Field Summary | |
final public static int | FOCUS_FIRST Marks the first integer id for the range of focus event ids. | final public static int | FOCUS_GAINED The focus gained event type. | final public static int | FOCUS_LAST Marks the last integer id for the range of focus event ids. | final public static int | FOCUS_LOST The focus lost event type. | transient Component | opposite | boolean | temporary |
Constructor Summary | |
public | FocusEvent(Component source, int id, boolean temporary) Constructs a FocusEvent object with the specified source component,
type, and whether or not the focus event is a temporary level event. | public | FocusEvent(Component source, int id) Constructs a permanent-level FocusEvent object with the
specified source component and type. | public | FocusEvent(Component source, int id, boolean temporary, Component opposite) |
FOCUS_FIRST | final public static int FOCUS_FIRST(Code) | | Marks the first integer id for the range of focus event ids.
|
FOCUS_GAINED | final public static int FOCUS_GAINED(Code) | | The focus gained event type.
|
FOCUS_LAST | final public static int FOCUS_LAST(Code) | | Marks the last integer id for the range of focus event ids.
|
FOCUS_LOST | final public static int FOCUS_LOST(Code) | | The focus lost event type.
|
temporary | boolean temporary(Code) | | |
FocusEvent | public FocusEvent(Component source, int id, boolean temporary)(Code) | | Constructs a FocusEvent object with the specified source component,
type, and whether or not the focus event is a temporary level event.
Parameters: source - the object where the event originated |
FocusEvent | public FocusEvent(Component source, int id)(Code) | | Constructs a permanent-level FocusEvent object with the
specified source component and type.
Parameters: source - the object where the event originated |
isTemporary | public boolean isTemporary()(Code) | | Returns whether or not this focus change event is a temporary
change.
|
|
|