HTextEvent

Overview | Package | Class | Use | Tree | Deprecated | Index | Help

PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## org.havi.ui.event
Class HTextEvent

    java.lang.Object
      java.util.EventObject
          java.awt.AWTEvent
              org.havi.ui.event.HTextEvent

All Implemented Interfaces:
  Serializable

    public class HTextEvent

extends AWTEvent

An `HTextEvent` event is used to interact with a component implementing the `HKeyboardInputPreferred` interface as follows:

- An `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.
- An `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.

The parameters to the constructors are as follows, in cases where parameters are not used, then the constructor should use the default values.

### Default parameter values exposed in the constructors

Parameter | Description | Default value | Set method | Get method
--- | --- | --- | --- | ---
None.

### Default parameter values not exposed in the constructors

Description | Default value | Set method | Get method
--- | --- | --- | ---
None.

See Also:
  Serialized Form

Field Summary
`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.

Fields inherited from class java.awt.AWTEvent
`ACTION_EVENT_MASK, ADJUSTMENT_EVENT_MASK, COMPONENT_EVENT_MASK, CONTAINER_EVENT_MASK, FOCUS_EVENT_MASK, 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`

Constructor Summary
`HTextEvent(HKeyboardInputPreferred source, int id)` Constructs an `HTextEvent`.

Method Summary

Methods inherited from class java.awt.AWTEvent
`getID, paramString, toString`

Methods inherited from class java.util.EventObject
`getSource`

Methods inherited from class java.lang.Object
`equals, getClass, hashCode, notify, notifyAll, wait, wait, wait`

Field Detail

### TEXT_FIRST

    public static final int TEXT_FIRST

  The first integer id in the range of event ids supported by the `HTextEvent` class.

  See Also:
    Constant Field Values

### TEXT_LAST

    public static final int TEXT_LAST

  The last integer id in the range of event ids supported by the `HTextEvent` class.

  See Also:
    Constant Field Values

### TEXT_START_CHANGE

    public static final int TEXT_START_CHANGE

  A text event with this id indicates that the textual content of an `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.

  See Also:
    `HKeyboardInputPreferred.getEditMode()`, Constant Field Values

### TEXT_CHANGE

    public static final int TEXT_CHANGE

  A text event with this id is sent from the component whenever the textual content of an `HTextValue` component is changed.

  See Also:
    Constant Field Values

### TEXT_CARET_CHANGE

    public static final 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. 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.

  See Also:
    Constant Field Values

### TEXT_END_CHANGE

    public static final int TEXT_END_CHANGE

  A text event with this id indicates that the textual content of an `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.

  See Also:
    `HKeyboardInputPreferred.getEditMode()`, Constant Field Values

### CARET_NEXT_CHAR

    public static final 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. If such an event is sent from a component to `HTextListeners`, then it was moved.

  See Also:
    Constant Field Values

### CARET_NEXT_LINE

    public static final 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. 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.

  See Also:
    Constant Field Values

### CARET_PREV_CHAR

    public static final 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. If such an event is sent from a component to `HTextListeners`, then it was moved.

  See Also:
    Constant Field Values

### CARET_PREV_LINE

    public static final 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. 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.

  See Also:
    Constant Field Values

### CARET_NEXT_PAGE

    public static final 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. 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.

  See Also:
    Constant Field Values

### CARET_PREV_PAGE

    public static final 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. 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.

  See Also:
    Constant Field Values

Constructor Detail

### HTextEvent

    public HTextEvent(HKeyboardInputPreferred source,
                      int id)

  Constructs an `HTextEvent`.

  Parameters:
    `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.

Overview | Package | Class | Use | Tree | Deprecated | Index | Help

PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD