org.havi.ui
Interface HTextValue

All Superinterfaces:
HKeyboardInputPreferred, HNavigable, HNavigationInputPreferred
All Known Implementing Classes:
HMultilineEntry, HSinglelineEntry

public interface HTextValue
extends HNavigable, HKeyboardInputPreferred

This interface is implemented by all HAVi UI components which have have editable text content (e.g. a text entry control).

Event Behavior

Subclasses of 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 org.havi.ui.HTextEvent description.

Interaction States

The following interaction states are valid for this HTextValue component:

The state machine diagram below shows the valid state transitions for an HTextValue component.

Platform Classes

The following HAVi platform classes implement or inherit the HTextValue interface. These classes shall all generate both HFocusEvent and HTextEvent events in addition to any other events specified in the respective class descriptions.

See Also:
HNavigable, HKeyboardInputPreferred, HTextEvent, HTextListener

Field Summary
 
Fields inherited from interface org.havi.ui.HKeyboardInputPreferred
INPUT_ALPHA, INPUT_ANY, INPUT_CUSTOMIZED, INPUT_NUMERIC
 
Method Summary
 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.
 
Methods inherited from interface org.havi.ui.HNavigable
addHFocusListener, getGainFocusSound, getLoseFocusSound, getMove, isSelected, removeHFocusListener, setFocusTraversal, setGainFocusSound, setLoseFocusSound, setMove
 
Methods inherited from interface org.havi.ui.HNavigationInputPreferred
getNavigationKeys, processHFocusEvent
 
Methods inherited from interface org.havi.ui.HKeyboardInputPreferred
getEditMode, getType, getValidInput, processHKeyEvent, processHTextEvent, setEditMode
 

Method Detail

addHKeyListener

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.

Parameters:
l - the HKeyListener to add

removeHKeyListener

void removeHKeyListener(HKeyListener l)
Removes the specified 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.

Parameters:
l - the HKeyListener to remove

addHTextListener

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.

Parameters:
l - the HTextListener to add

removeHTextListener

void removeHTextListener(HTextListener l)
Removes the specified 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.

Parameters:
l - the HTextListener to remove