|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectjava.util.EventObject
java.awt.AWTEvent
java.awt.event.ComponentEvent
java.awt.event.FocusEvent
org.havi.ui.event.HFocusEvent
public class HFocusEvent
An HFocusEvent event is used to
interact with a component implementing the HNavigationInputPreferred
interface as follows:
HFocusEvent event may be sent
from the HAVi system to the component to inform the component that
it has gained or lost the input focus, or that it should transfer
focus to another component.
HFocusEvent event is sent
from the component to all registered HFocusListener listeners whenever
the component focus status changes.
Note that because the underlying focus mechanism is based on AWT, focus transfer events do not guarantee that another component will actually get focus, or that the current component will lose focus.
All interoperable HAVi components which expect to receive HFocusEvent events must implement the
HNavigationInputPreferred interface.
| Field Summary | |
|---|---|
static int |
FOCUS_TRANSFER
An event id which indicates that the component should transfer focus to the component identified by the data returned from the getTransferId method. |
static int |
HFOCUS_FIRST
The first integer id in the range of event ids supported by the HFocusEvent class. |
static int |
HFOCUS_LAST
The last integer id in the range of event ids supported by the HFocusEvent class. |
static int |
NO_TRANSFER_ID
A constant returned from the getTransferId
method if the event id is not FOCUS_TRANSFER. |
| Fields inherited from class java.awt.event.FocusEvent |
|---|
FOCUS_FIRST, FOCUS_GAINED, FOCUS_LAST, FOCUS_LOST |
| Fields inherited from class java.awt.event.ComponentEvent |
|---|
COMPONENT_FIRST, COMPONENT_HIDDEN, COMPONENT_LAST, COMPONENT_MOVED, COMPONENT_RESIZED, COMPONENT_SHOWN |
| Fields inherited from class java.util.EventObject |
|---|
source |
| Constructor Summary | |
|---|---|
HFocusEvent(Component source,
int id)
Constructs an HFocusEvent. |
|
HFocusEvent(Component source,
int id,
int transfer)
Constructs an HFocusEvent. |
|
| Method Summary | |
|---|---|
int |
getTransferId()
Returns a key which maps to the component to transfer focus to. |
boolean |
isTemporary()
Returns whether or not this focus change event is a temporary change. |
| Methods inherited from class java.awt.event.FocusEvent |
|---|
getOppositeComponent, paramString |
| Methods inherited from class java.awt.event.ComponentEvent |
|---|
getComponent |
| Methods inherited from class java.awt.AWTEvent |
|---|
consume, getID, isConsumed, toString |
| Methods inherited from class java.util.EventObject |
|---|
getSource |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Field Detail |
|---|
public static final int HFOCUS_FIRST
HFocusEvent class.
public static final int FOCUS_TRANSFER
getTransferId method.
If a component matching the data cannot be found the component receiving this event should do nothing.
public static final int HFOCUS_LAST
HFocusEvent class.
public static final int NO_TRANSFER_ID
getTransferId
method if the event id is not FOCUS_TRANSFER.
| Constructor Detail |
|---|
public HFocusEvent(Component source,
int id)
HFocusEvent.
source - The java.awt.Component component
which originated this event.id - The event id of the HFocusEvent generated
by the HNavigable
component. This is the value that will be returned by the
event object's getID method.
public HFocusEvent(Component source,
int id,
int transfer)
HFocusEvent.
source - The java.awt.Component component
which originated this event.id - The event id of the HFocusEvent generated
by the HNavigable
component. This is the value that will be returned by the
event object's getID method.transfer - a key which maps to the component to transfer
focus to, if the id parameter has the value FOCUS_TRANSFER. If the id parameter does not have
this value NO_TRANSFER_ID is substituted for its value.| Method Detail |
|---|
public boolean isTemporary()
isTemporary in class FocusEventpublic int getTransferId()
NO_TRANSFER_ID if the id of this event is not FOCUS_TRANSFER.
The return value of this function is used to pass key codes to
an HNavigable to implement focus
transfer for HAVi UI components.
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||