public interface HTextValue extends HNavigable, HKeyboardInputPreferred
HComponent which
implement HTextValue must respond to
HFocusEvent, HKeyEvent
and HTextEvent events.
Applications should assume that classes which implement HTextValue can generate events of the
types HFocusEvent and HTextEvent in response to other
types of input event.
An application may add one or more HTextListener listeners to the
component. The textChanged method of the HTextListener is invoked whenever the text in the HTextValue is changed, and the caretMoved method of the
HTextListener is invoked whenever
the text caret position is altered.
HAVi text events are discussed in detail in the HTextEvent description.
HTextValue component:
The state machine diagram below shows the valid state
transitions for an HTextValue component.
![]() |
HTextValue interface. These classes shall all
generate both HFocusEvent and
HTextEvent events in
addition to any other events specified in the respective class
descriptions.
HNavigable,
HKeyboardInputPreferred,
HTextEvent,
HTextListenerINPUT_ALPHA, INPUT_ANY, INPUT_CUSTOMIZED, INPUT_NUMERIC| Modifier and Type | Method and Description |
|---|---|
void |
addHKeyListener(HKeyListener l)
Adds the specified
HKeyListener to
receive HKeyEvent events sent from this
HTextValue: 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. |
void |
addHTextListener(HTextListener l)
Adds the specified
HTextListener to
receive HTextEvent events sent from this
HTextValue: 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. |
void |
removeHKeyListener(HKeyListener l)
Removes the specified
HKeyListener so
that it no longer receives HKeyEvent
events from this HTextValue. |
void |
removeHTextListener(HTextListener l)
Removes the specified
HTextListener
so that it no longer receives HTextEvent
events from this HTextValue. |
addHFocusListener, getGainFocusSound, getLoseFocusSound, getMove, isSelected, removeHFocusListener, setFocusTraversal, setGainFocusSound, setLoseFocusSound, setMovegetNavigationKeys, processHFocusEventgetEditMode, getType, getValidInput, processHKeyEvent, processHTextEvent, setEditModevoid addHKeyListener(HKeyListener l)
HKeyListener to
receive HKeyEvent events sent from this
HTextValue: 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 HKeyListener to addvoid removeHKeyListener(HKeyListener l)
HKeyListener so
that it no longer receives HKeyEvent
events from this HTextValue. 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 HKeyListener to removevoid addHTextListener(HTextListener l)
HTextListener to
receive HTextEvent events sent from this
HTextValue: 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 HTextListener to addvoid removeHTextListener(HTextListener l)
HTextListener
so that it no longer receives HTextEvent
events from this HTextValue. 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 HTextListener to removeCopyright © 2012 code4tv.com. All Rights Reserved.