|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
This interface is implemented by all HAVi UI components which have some form of adjustable numerical value (e.g. a range control).
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.
HAdjustmentValue
component:
The state machine diagram below shows the valid state
transitions for an HAdjustmentValue
component.
![]() |
HAdjustmentValue
interface. These classes shall all
generate both HFocusEvent
and
HAdjustmentEvent
events in
addition to any other events specified in the respective class
descriptions.
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 |
public void setUnitIncrement(int increment)
HAdjustmentValue
.
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.public int getUnitIncrement()
HAdjustmentValue
.
1
shall be returned if this method is called
before its corresponding set method.
HAdjustmentValue
.public void setBlockIncrement(int increment)
HAdjustmentValue
.
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.public int getBlockIncrement()
HAdjustmentValue
.
1
shall be returned if this method is called before its
corresponding set method.
HAdjustmentValue
.public void addAdjustmentListener(HAdjustmentListener l)
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.
l
- the HAdjustmentListener to be notified.public void removeAdjustmentListener(HAdjustmentListener l)
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.
l
- the HAdjustmentListener to be removed from notification.public void setAdjustmentSound(HSound sound)
HAdjustmentEvent
is sent to one or more listeners.
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
.public HSound getAdjustmentSound()
null
shall be returned if this method is called
before its corresponding set method.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |