public interface HSwitchable extends HActionable
HComponent
which implement HSwitchable
must respond to HFocusEvent
and HActionEvent
events. Applications should assume that classes which implement HSwitchable
can generate events of the types HFocusEvent
and HActionEvent
in response to other types of input event.
An application may add one or more HActionListener
listeners to the component. The actionPerformed
method of the HActionListener
is invoked whenever the HSwitchable
is actioned.
HAVi action events are discussed in detail in the HActionInputPreferred
interface description.
HSwitchable
component: NORMAL_STATE
FOCUSED_STATE
ACTIONED_STATE
ACTIONED_FOCUSED_STATE
DISABLED_STATE
DISABLED_FOCUSED_STATE
DISABLED_ACTIONED_STATE
DISABLED_ACTIONED_FOCUSED_STATE
The state machine diagram below shows the valid state transitions for an HSwitchable
component.
![]() |
Unlike HActionable
components there are no automatic transitions to other states. Actioned states (i.e. those with the ACTIONED_STATE_BIT
bit set may persist after any registered HActionListener
listeners have been called, until a further HActionEvent
is received.
HSwitchable
interface. These classes shall all generate both HFocusEvent
and HActionEvent
events in addition to any other events specified in the respective class descriptions. Modifier and Type | Method and Description |
---|---|
boolean |
getSwitchableState()
Returns the current switchable state of this
HSwitchable . |
HSound |
getUnsetActionSound()
Get the sound to be played when the interaction state of
the
HSwitchable makes the
following transitions: |
void |
setSwitchableState(boolean state)
Sets the current state of the button.
|
void |
setUnsetActionSound(HSound sound)
Associate a sound to be played when the interaction state of the
HSwitchable makes the following transitions: |
addHActionListener, getActionSound, removeHActionListener, setActionCommand, setActionSound
addHFocusListener, getGainFocusSound, getLoseFocusSound, getMove, isSelected, removeHFocusListener, setFocusTraversal, setGainFocusSound, setLoseFocusSound, setMove
getNavigationKeys, processHFocusEvent
getActionCommand, processHActionEvent
boolean getSwitchableState()
HSwitchable
.HSwitchable
.void setSwitchableState(boolean state)
processActionEvent
, they are not called by setSwitchableState
.void setUnsetActionSound(HSound sound)
HSwitchable
makes the following transitions: sound
- a sound to be played when the HSwitchable
transitions from an actioned state. If sound content is already set, the original content is replaced. To remove the sound specify a null HSound
.HSound getUnsetActionSound()
HSwitchable
makes the
following transitions:
HSwitchable
transitions from an
actioned state.Copyright © 2013 CableLabs. All rights reserved.