public class HTextEvent extends AWTEvent
HTextEvent event is used to
interact with a component implementing the HKeyboardInputPreferred
interface as follows:
HTextEvent event may be sent
from the HAVi system to the component to cause a change to the
caret position or editable mode of the component as a result of
user interaction. For example, a platform which lacks suitable
caret positioning or mode switching keys may choose to generate
this using a virtual keyboard user interface.
HTextEvent event is sent
from the component to all registered HTextListeners when a change to
the text content, caret position or editable mode of the component
occurs.
All interoperable HAVi components which expect to receive HTextEvent events should implement the
HKeyboardInputPreferred interface.
| Parameter | Description | Default value | Set method | Get method |
|---|---|---|---|---|
| None. | ||||
| Description | Default value | Set method | Get method |
|---|---|---|---|
| None. | |||
| Modifier and Type | Field and Description |
|---|---|
static int |
CARET_NEXT_CHAR
When a text event with this id is sent to a
HTextValue component, then its
caret position should move one character forward. |
static int |
CARET_NEXT_LINE
When a text event with this id is sent to a
HTextValue component, then its
caret position should move down one line. |
static int |
CARET_NEXT_PAGE
When a text event with this id is sent to a
HTextValue component, then its
caret position should move down to the last possible line in
the visible window. |
static int |
CARET_PREV_CHAR
When a text event with this id is sent to a
HTextValue component, then its
caret position should move one character backward. |
static int |
CARET_PREV_LINE
When a text event with this id is sent to a
HTextValue component, then its
caret position should move up one line. |
static int |
CARET_PREV_PAGE
When a text event with this id is sent to a
HTextValue component, then its
caret position should move up to the first possible line in
the visible window. |
static int |
TEXT_CARET_CHANGE
A text event with this id is sent from the component whenever the
caret position of an
HTextValue component is changed. |
static int |
TEXT_CHANGE
A text event with this id is sent from the component whenever the
textual content of an
HTextValue component is changed. |
static int |
TEXT_END_CHANGE
A text event with this id indicates that the textual content of
an
HTextValue component has been
finally set. |
static int |
TEXT_FIRST
The first integer id in the range of event ids supported by
the
HTextEvent class. |
static int |
TEXT_LAST
The last integer id in the range of event ids supported by
the
HTextEvent class. |
static int |
TEXT_START_CHANGE
A text event with this id indicates that the textual content of
an
HTextValue component may be
about to change. |
ACTION_EVENT_MASK, ADJUSTMENT_EVENT_MASK, COMPONENT_EVENT_MASK, consumed, CONTAINER_EVENT_MASK, FOCUS_EVENT_MASK, HIERARCHY_BOUNDS_EVENT_MASK, HIERARCHY_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, WINDOW_STATE_EVENT_MASKsource| Constructor and Description |
|---|
HTextEvent(HKeyboardInputPreferred source,
int id)
Constructs an
HTextEvent. |
consume, getID, isConsumed, paramString, setSource, toStringgetSourcepublic static final int TEXT_FIRST
HTextEvent class.public static final int TEXT_LAST
HTextEvent class.public static final int TEXT_START_CHANGE
HTextValue component may be
about to change. This event is sent to or from the component
when the user causes the
component to enter its editable mode. Note that it is a
platform specific implementation option for such components to
enter editable mode automatically e.g. when they receive input
focus. In such a case the order in which the HFocusEvent and HTextEvent are sent is platform
specific.public static final int TEXT_CHANGE
HTextValue component is changed.public static final int TEXT_CARET_CHANGE
HTextValue component is changed. This event will be sent only if the
caret position changed in a manner not notified by the
CARET_NEXT_CHAR, CARET_NEXT_LINE, CARET_PREV_CHAR, CARET_PREV_LINE, CARET_NEXT_PAGE, or CARET_PREV_PAGE events.public static final int TEXT_END_CHANGE
HTextValue component has been
finally set. This event is sent to or from the component when the user causes the
component to leave its editable mode. Note that it is a
platform specific implementation option for such components to
leave editable mode automatically e.g. when they lose input
focus. In such a case the order in which the HFocusEvent and HTextEvent are sent is platform
specific.public static final int CARET_NEXT_CHAR
HTextValue component, then its
caret position should move one character forward. If such
an event is sent from a component to HTextListeners, then it was moved.public static final int CARET_NEXT_LINE
HTextValue component, then its
caret position should move down one line. If such
an event is sent from a component to HTextListeners, then it was moved. It is widget specific, if
the caret remains at the same column or at an approximate
horizontal pixel position for non-fixed-width fonts.public static final int CARET_PREV_CHAR
HTextValue component, then its
caret position should move one character backward. If such
an event is sent from a component to HTextListeners, then it was moved.public static final int CARET_PREV_LINE
HTextValue component, then its
caret position should move up one line. If such
an event is sent from a component to HTextListeners, then it was moved. It is widget specific, if
the caret remains at the same column or at an approximate
horizontal pixel position for non-fixed-width fonts.public static final int CARET_NEXT_PAGE
HTextValue component, then its
caret position should move down to the last possible line in
the visible window. If the caret position is already on the
last visible line then the caret should move down so that the
last visible line scrolls up to the top of the visible window. If
such an event is sent from a component to HTextListeners, then it was moved. It is widget specific, if
the caret remains at the same column or at an approximate
horizontal pixel position for non-fixed-width fonts.public static final int CARET_PREV_PAGE
HTextValue component, then its
caret position should move up to the first possible line in
the visible window. If the caret position is already on the
first visible line then the caret should move down so that the
first visible line scrolls down to the bottom of the visible
window. If such an event is sent from a component to
HTextListeners, then it was moved. It is
widget specific, if the caret remains at the same column or at
an approximate horizontal pixel position for non-fixed-width
fonts.public HTextEvent(HKeyboardInputPreferred source, int id)
HTextEvent.source - The HKeyboardInputPreferred component whose value has been modified.id - The event id of the HTextEvent generated
by the
HKeyboardInputPreferred
component. This is the value that will be returned by the
event object's getID method.Copyright © 2012 code4tv.com. All Rights Reserved.