HAdjustmentValue

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
Interface HAdjustmentValue

All Superinterfaces:
  HAdjustmentInputPreferred, HNavigable, HNavigationInputPreferred, HOrientable

All Known Implementing Classes:
  HRangeValue

    public interface HAdjustmentValue

extends HNavigable, HAdjustmentInputPreferred

This interface is implemented by all HAVi UI components which have some form of adjustable numerical value (e.g. a range control).

### Event Behavior

Subclasses of `HComponent` which implement `HAdjustmentValue` must respond to `HFocusEvent` and `HAdjustmentEvent` events.

Applications should assume that classes which implement `HAdjustmentValue` can generate events of the types `HFocusEvent` and `HAdjustmentEvent` in response to other types of input event.

An application may add one or more `HAdjustmentListener` listeners to the component. The `HAdjustmentListener.valueChanged(org.havi.ui.event.HAdjustmentEvent)` method of the `HAdjustmentListener` is invoked whenever the value of the `HAdjustmentValue` is modified.

HAVi adjustment events are discussed in detail in the `HAdjustmentInputPreferred` interface description.

### Interaction States

The following interaction states are valid for this `HAdjustmentValue` component:

- `NORMAL_STATE`
- `FOCUSED_STATE`
- `DISABLED_STATE`
- `DISABLED_FOCUSED_STATE`

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

### Platform Classes

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

- `HRangeValue`

See Also:
  `HNavigable`, `HOrientable`, `HAdjustmentInputPreferred`, `HAdjustmentEvent`, `HAdjustmentListener`

Field Summary

Fields inherited from interface org.havi.ui.HOrientable
`ORIENT_BOTTOM_TO_TOP, ORIENT_LEFT_TO_RIGHT, ORIENT_RIGHT_TO_LEFT, ORIENT_TOP_TO_BOTTOM`

Method Summary
`void` | `addAdjustmentListener(HAdjustmentListener l)` Adds the specified HAdjustmentListener to receive `HAdjustmentEvents` sent from this object.
`HSound` | `getAdjustmentSound()` Get the sound to be played when the value changes.
`int` | `getBlockIncrement()` Get the block increment for this `HAdjustmentValue`.
`int` | `getUnitIncrement()` Get the unit increment for this `HAdjustmentValue`.
`void` | `removeAdjustmentListener(HAdjustmentListener l)` Removes the specified HAdjustmentListener so that it no longer receives `HAdjustmentEvents` from this object.
`void` | `setAdjustmentSound(HSound sound)` Associate a sound to be played when the value is modified.
`void` | `setBlockIncrement(int increment)` Set the block increment for this `HAdjustmentValue`.
`void` | `setUnitIncrement(int increment)` Set the unit increment for this `HAdjustmentValue`.

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.HAdjustmentInputPreferred
`getAdjustMode, processHAdjustmentEvent, setAdjustMode`

Methods inherited from interface org.havi.ui.HOrientable
`getOrientation, setOrientation`

Method Detail

### setUnitIncrement

    void setUnitIncrement(int increment)

  Set the unit increment for this `HAdjustmentValue`.

  Parameters:
    `increment` - the amount by which the value of the `HAdjustmentValue` should change when an `HAdjustmentEvent.ADJUST_LESS` or `HAdjustmentEvent.ADJUST_MORE` event is received. Values of `increment` less than one shall be treated as a value of one.

### getUnitIncrement

    int getUnitIncrement()

  Get the unit increment for this `HAdjustmentValue`. `1` shall be returned if this method is called before its corresponding set method.

  Returns:
    the increment value for this `HAdjustmentValue`.

### setBlockIncrement

    void setBlockIncrement(int increment)

  Set the block increment for this `HAdjustmentValue`.

  Parameters:
    `increment` - the amount by which the value of the `HAdjustmentValue` should change when an `HAdjustmentEvent.ADJUST_PAGE_LESS` or `HAdjustmentEvent.ADJUST_PAGE_MORE` event is received. Values of `increment` less than one shall be treated as a value of one.

### getBlockIncrement

    int getBlockIncrement()

  Get the block increment for this `HAdjustmentValue`. `1` shall be returned if this method is called before its corresponding set method.

  Returns:
    the block increment value for this `HAdjustmentValue`.

### addAdjustmentListener

    void addAdjustmentListener(HAdjustmentListener l)

  Adds the specified HAdjustmentListener to receive `HAdjustmentEvents` sent from this object. 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 HAdjustmentListener to be notified.

### removeAdjustmentListener

    void removeAdjustmentListener(HAdjustmentListener l)

  Removes the specified HAdjustmentListener so that it no longer receives `HAdjustmentEvents` from this object. 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 HAdjustmentListener to be removed from notification.

### setAdjustmentSound

    void setAdjustmentSound(HSound sound)

  Associate a sound to be played when the value is modified. The sound is played irrespective of whether an `HAdjustmentEvent` is sent to one or more listeners.

  Parameters:
    `sound` - the sound to be played, when the value is modified. If sound content is already set, the original content is replaced. To remove the sound specify a null `HSound` .

### getAdjustmentSound

    HSound getAdjustmentSound()

  Get the sound to be played when the value changes. `null` shall be returned if this method is called before its corresponding set method.

  Returns:
    The sound played when the value changes

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

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