public interface HNavigationInputPreferred
HNavigationInputPreferred
indicates that this component expects to receive HFocusEvent events. The focus event
system in HAVi is designed to be compatible with standard AWT
focus mechanisms while supporting key event-based focus traversal
for HAVi UI components.
All interoperable implementations of the HNavigationInputPreferred
interface must extend HComponent.
Components which implement HNavigationInputPreferred
to handle HFocusEvent events
can optionally manage focus traversal based on keyboard input
events, in addition to the normal semantics of the FocusEvent.FOCUS_GAINED and
FocusEvent.FOCUS_LOST event
types. The focus traversal mechanism specified by the HAVI UI
HNavigable interface is one such
system.
In the case where such an implementation requires specific keys to
manage focus traversal the getNavigationKeys()
method is provided to allow the HAVi platform
to query the set of keys for which a navigation target has been
set. When such a component has the input focus, platforms without
a physical means of generating the desired keystrokes shall
provide another means for navigation e.g. by offering an on-screen
"virtual" keyboard. Applications can query the system about
the support of specific keyCodes through the HKeyCapabilities.isSupported(int) method.
The keyCodes for navigation keystrokes generated on the HNavigationInputPreferred will be passed to the HNavigationInputPreferred as an HFocusEvent transferId through the processHFocusEvent(org.havi.ui.event.HFocusEvent) method. No HKeyEvent will be generated on the HNavigationInputPreferred as a result of these keystrokes.
Note that the java.awt.Component method isFocusTraversable should
always return true for a java.awt.Component
implementing this interface.
| Modifier and Type | Method and Description |
|---|---|
int[] |
getNavigationKeys()
Retrieve the set of key codes which this component maps to
navigation targets.
|
void |
processHFocusEvent(HFocusEvent evt)
Process an
HFocusEvent sent to this HNavigationInputPreferred. |
int[] getNavigationKeys()
null if no
navigation targets are set on this component.void processHFocusEvent(HFocusEvent evt)
HFocusEvent sent to this HNavigationInputPreferred.evt - the HFocusEvent to process.Copyright © 2012 code4tv.com. All Rights Reserved.