public class HItemEvent extends AWTEvent
HItemEvent
event is used to
interact with a component implementing the HSelectionInputPreferred
interface as follows:
HItemEvent
event may be sent
from the HAVi system to the component to change the state of the
component, and the selection set held by the component.
HItemEvent
event is sent
from the component to all registered HItemListener
s when a change to
the component state or selection set occurs.
The HItemEvent
event class therefore
provides support for selecting and clearing individual elements,
selecting or clearing all elements and managing the currently
focused element, i.e. the item whose selection state is toggled by
some user interaction.
All interoperable HAVi components which expect to receive HItemEvent
events should implement the
HSelectionInputPreferred
interface.
HListGroup
,
Serialized FormModifier and Type | Field and Description |
---|---|
static int |
ITEM_CLEARED
An item event with this id is sent from the component whenever
an item is removed from the selection set of an
HItemValue component. |
static int |
ITEM_END_CHANGE
An item event with this id indicates that the selection of
an HItemValue component has been
finally set.
|
static int |
ITEM_FIRST
The first integer id in the range of event ids supported by the
HItemEvent class. |
static int |
ITEM_LAST
The last integer id in the range of event ids supported by the
HItemEvent class. |
static int |
ITEM_SELECTED
An item event with this id is sent from the component whenever
an item is added to the selection set of an
HItemValue component. |
static int |
ITEM_SELECTION_CLEARED
An item event with this id is sent to or from the component
whenever the entire selection set of an
HItemValue component is removed. |
static int |
ITEM_SET_CURRENT
An item event with this id is sent to or from the component
whenever the current item of an
HItemValue
component changes. |
static int |
ITEM_SET_NEXT
An item event with this id is sent to or from the component
whenever the current item of an
HItemValue
component changes to the next item in the group. |
static int |
ITEM_SET_PREVIOUS
An item event with this id is sent to or from the component
whenever the current item of an
HItemValue
component changes to the previous item in the
group. |
static int |
ITEM_START_CHANGE
An item event with this id indicates that the selection of
an
HItemValue component may be
about to change. |
static int |
ITEM_TOGGLE_SELECTED
An item event with this id may be sent to an
HItemValue component to toggle the
selection state of the currently focused item. |
static int |
SCROLL_LESS
An HItemEvent with this id is sent
to the widget to request a decrease of the scrolling position of an
HItemValue by one unit in response to
mouse actions.
|
static int |
SCROLL_MORE
An HItemEvent with this id is sent
to the widget to request an increase of the scrolling position of an
HItemValue by one unit in response to
mouse actions.
|
static int |
SCROLL_PAGE_LESS
An HItemEvent with this id is sent
to the widget to request a decrease of the scrolling position of an
HItemValue by one block in response to
mouse actions.
|
static int |
SCROLL_PAGE_MORE
An HItemEvent with this id is sent
to the widget to request an increase of the scrolling position of an
HItemValue by one block in response to
mouse actions.
|
ACTION_EVENT_MASK, ADJUSTMENT_EVENT_MASK, COMPONENT_EVENT_MASK, consumed, CONTAINER_EVENT_MASK, FOCUS_EVENT_MASK, id, INPUT_METHOD_EVENT_MASK, INVOCATION_EVENT_MASK, ITEM_EVENT_MASK, KEY_EVENT_MASK, MOUSE_EVENT_MASK, MOUSE_MOTION_EVENT_MASK, MOUSE_WHEEL_EVENT_MASK, PAINT_EVENT_MASK, RESERVED_ID_MAX, TEXT_EVENT_MASK, WINDOW_EVENT_MASK, WINDOW_FOCUS_EVENT_MASK
source
Constructor and Description |
---|
HItemEvent(HSelectionInputPreferred source,
int id,
Object item)
Constructs an HItemEvent
|
Modifier and Type | Method and Description |
---|---|
Object |
getItem()
Retrieve the item which caused this
HItemEvent . |
consume, getID, isConsumed, paramString, toString
getSource
public static final int ITEM_FIRST
HItemEvent
class.public static final int ITEM_START_CHANGE
HItemValue
component may be
about to change. This event is sent to or from the component
when the user causes the
component to enter selection mode. Note that it is a
platform specific implementation option for such components to
enter selection mode automatically e.g. when they receive input
focus. In such a case the order in which the HFocusEvent
and HItemEvent
are sent is platform
specific.public static final int ITEM_TOGGLE_SELECTED
HItemValue
component to toggle the
selection state of the currently focused item. Note that events
of this type are never sent to listeners from the component;
instead an event of type ITEM_SELECTED
or
ITEM_CLEARED
is sent in response to an event with this id, depending on the
new state of the currently focused item.public static final int ITEM_SELECTED
HItemValue
component. Note that events
of this type are silently ignored if they are sent to the
component.public static final int ITEM_CLEARED
HItemValue
component. Note that events
of this type are silently ignored if they are sent to the
component.public static final int ITEM_SELECTION_CLEARED
HItemValue
component is removed.public static final int ITEM_SET_CURRENT
HItemValue
component changes.public static final int ITEM_SET_PREVIOUS
HItemValue
component changes to the previous item in the
group.public static final int ITEM_SET_NEXT
HItemValue
component changes to the next item in the group.public static final int SCROLL_MORE
public static final int SCROLL_LESS
public static final int SCROLL_PAGE_MORE
public static final int SCROLL_PAGE_LESS
public static final int ITEM_END_CHANGE
HFocusEvent
and HItemEvent
are sent is platform
specific.public static final int ITEM_LAST
HItemEvent
class.public HItemEvent(HSelectionInputPreferred source, int id, Object item)
source
- The HSelectionInputPreferred
component whose value or current item has been modified.id
- The event id of the HItemEvent generated
by the HSelectionInputPreferred
component. This is the value that will be returned by the
event object's getID
method.item
- The item which caused the change, or
null
if this information is not available. If the
event is sent to listeners, this
information shall be provided if the event id is one of
ITEM_SELECTED
, ITEM_CLEARED
,
ITEM_SET_NEXT
or ITEM_SET_PREVIOUS
.public Object getItem()
HItemEvent
. This information is
not available for the ITEM_SELECTION_CLEARED
event id.null
if this information is not available for this
event.Copyright © 2013 CableLabs. All Rights Reserved.