org.havi.ui
Interface HSelectionInputPreferred

All Superinterfaces:
HOrientable
All Known Subinterfaces:
HItemValue
All Known Implementing Classes:
HListGroup

public interface HSelectionInputPreferred
extends HOrientable

A component which implements HSelectionInputPreferred indicates that this component expects to receive HItemEvent input events.

The system must provide a means of generating HItemEvent events as necessary. For platforms with a restricted number of physical keys this may involve a "virtual keyboard" or similar mechanism. The system might use the information returned by the method HOrientable.getOrientation() of the super interface to select appropriate key mappings for this event. The mechanisms to generate this event shall not be effective while the component is disabled (see HComponent.setEnabled(boolean)).

Widgets of HAVi compliant applications implementing the HSelectionInputPreferred interface must have HComponent in their inheritance tree.

Note that the java.awt.Component method isFocusTraversable shall always return true for a java.awt.Component implementing this interface.


Field Summary
 
Fields inherited from interface org.havi.ui.HOrientable
ORIENT_BOTTOM_TO_TOP, ORIENT_LEFT_TO_RIGHT, ORIENT_RIGHT_TO_LEFT, ORIENT_TOP_TO_BOTTOM
 
Method Summary
 boolean getSelectionMode()
          Get the selection mode for this HSelectionInputPreferred.
 void processHItemEvent(HItemEvent evt)
          Process an HItemEvent sent to this HSelectionInputPreferred.
 void setSelectionMode(boolean edit)
          Set the selection mode for this HSelectionInputPreferred.
 
Methods inherited from interface org.havi.ui.HOrientable
getOrientation, setOrientation
 

Method Detail

getSelectionMode

boolean getSelectionMode()
Get the selection mode for this HSelectionInputPreferred. If the returned value is true the component is in selection mode, and the selection may be changed.

The component is switched into and out of selection mode on receiving HItemEvent.ITEM_START_CHANGE and HItemEvent.ITEM_END_CHANGE events. Note that these events are ignored, if the component is disabled.

Returns:
true if this component is in selection mode, false otherwise.
See Also:
HComponent.setEnabled(boolean)

setSelectionMode

void setSelectionMode(boolean edit)
Set the selection mode for this HSelectionInputPreferred.

This method is provided for the convenience of component implementors. Interoperable applications shall not call this method. It cannot be made protected because interfaces cannot have protected methods.

Calls to this method shall be ignored, if the component is disabled.

Parameters:
edit - true to switch this component into selection mode, false otherwise.
See Also:
HComponent.setEnabled(boolean), getSelectionMode()

processHItemEvent

void processHItemEvent(HItemEvent evt)
Process an HItemEvent sent to this HSelectionInputPreferred.

Widgets implementing this interface shall ignore HItemEvents, while the component is disabled.

Parameters:
evt - the HItemEvent to process.
See Also:
HComponent.setEnabled(boolean)