public interface HItemValue extends HNavigable, HSelectionInputPreferred
HComponent which
implement HItemValue must respond to
HFocusEvent and HItemEvent events.
Applications should assume that classes which implement HItemValue can generate events of the
types HFocusEvent and HItemEvent in response to other
types of input event.
An application may add one or more HItemListener listeners to the
component. The selectionChanged method of the HItemListener is invoked whenever the selection managed by the HItemValue is changed.
HAVi item events are discussed in detail in the HSelectionInputPreferred
interface description.
HItemValue component:
The state machine diagram below shows the valid state
transitions for an HItemValue component.
![]() |
HItemValue interface. These classes shall all
generate both HFocusEvent and
HItemEvent events in
addition to any other events specified in the respective class
descriptions.
HNavigable,
HOrientable,
HSelectionInputPreferred,
HItemEvent,
HItemListenerORIENT_BOTTOM_TO_TOP, ORIENT_LEFT_TO_RIGHT, ORIENT_RIGHT_TO_LEFT, ORIENT_TOP_TO_BOTTOM| Modifier and Type | Method and Description |
|---|---|
void |
addItemListener(HItemListener l)
Adds the specified
HItemListener to
receive HItemEvents sent from this object. |
HSound |
getSelectionSound()
Get the sound to be played when the selection changes.
|
void |
removeItemListener(HItemListener l)
Removes the specified
HItemListener so
that it no longer receives HItemEvents from
this object. |
void |
setSelectionSound(HSound sound)
Associate a sound to be played when the selection is
modified.
|
addHFocusListener, getGainFocusSound, getLoseFocusSound, getMove, isSelected, removeHFocusListener, setFocusTraversal, setGainFocusSound, setLoseFocusSound, setMovegetNavigationKeys, processHFocusEventgetSelectionMode, processHItemEvent, setSelectionModegetOrientation, setOrientationvoid addItemListener(HItemListener l)
HItemListener to
receive HItemEvents sent from this object. If the listener has
already been added further calls will add further references to
the listener, which will then receive multiple copies of a
single event.l - the HItemListener to be notified.void removeItemListener(HItemListener l)
HItemListener so
that it no longer receives HItemEvents from
this object. If the specified listener is not registered, the
method has no effect. If multiple references to
a single listener have been registered it should be noted that
this method will only remove one reference per call.l - the HItemListener to be removed from notification.void setSelectionSound(HSound sound)
HItemEvent is sent to one or more
listeners.sound - the sound to be played, when the selection is
modified. If sound content is already set, the original content
is replaced. To remove the sound specify a null HSound.HSound getSelectionSound()
Copyright © 2012 code4tv.com. All Rights Reserved.