|
Java DTV API 1.3 18-Nov-2009 |
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectjava.util.EventObject
java.awt.AWTEvent
java.awt.event.ComponentEvent
java.awt.event.InputEvent
java.awt.event.KeyEvent
com.sun.dtv.ui.event.KeyEvent
com.sun.dtv.ui.event.RemoteControlEvent
public class RemoteControlEvent
This class extends the KeyEvent
class by adding
TV remote specific key codes.
Field Summary | |
---|---|
static int |
VK_ARROWS
Any arrow key. |
static int |
VK_BACK
Back key code. |
static int |
VK_BALANCE_LEFT
Balance left key code. |
static int |
VK_BALANCE_RIGHT
Balance right key code. |
static int |
VK_BASS_DOWN
Bass down key code. |
static int |
VK_BASS_UP
Bass up key code. |
static int |
VK_CHANNEL_DOWN
Channel down key code. |
static int |
VK_CHANNEL_UP
Channel up key code. |
static int |
VK_COLORED
Any colored key. |
static int |
VK_COLORED_KEY_0
Colored key 0 key code. |
static int |
VK_COLORED_KEY_1
Colored key 1 key code. |
static int |
VK_COLORED_KEY_2
Colored key 2 key code. |
static int |
VK_COLORED_KEY_3
Colored key 3 key code. |
static int |
VK_COLORED_KEY_4
Colored key 4 key code. |
static int |
VK_COLORED_KEY_5
Colored key 5 key code. |
static int |
VK_CONFIRM
Confirm key code. |
static int |
VK_DIMMER
Device dimmer key code. |
static int |
VK_DISPLAY_SWAP
Display swap key code. |
static int |
VK_EJECT
Eject button key code. |
static int |
VK_FADER_FRONT
Fader front key code. |
static int |
VK_FADER_REAR
Fader rear key code. |
static int |
VK_FF
Fast forward (FF) button key code. |
static int |
VK_GO_TO_END
Go to end position key code. |
static int |
VK_GO_TO_NEXT
Go to next position key code. |
static int |
VK_GO_TO_PREV
Go to previous position key code. |
static int |
VK_GO_TO_START
Go to start position key code. |
static int |
VK_GUIDE
Program guide key code. |
static int |
VK_INFO
Info key code. |
static int |
VK_MENU
Menu key code. |
static int |
VK_MUTE
Mute key code. |
static int |
VK_PIP
Picture in picture (PIP) key code. |
static int |
VK_PLAY
Play (PLAY) button key code. |
static int |
VK_PLAY_SPEED_DOWN
Decrease media speed key code. |
static int |
VK_PLAY_SPEED_RESET
Reset media speed key code. |
static int |
VK_PLAY_SPEED_UP
Increase media speed key code. |
static int |
VK_POWER
Device power on/off key code. |
static int |
VK_RANDOM_PLAY
Random play key code. |
static int |
VK_RECORD
Record (REC) button key code. |
static int |
VK_REWIND
Rewind (REW) button key code. |
static int |
VK_SCAN_CHANNEL
Scan channel key code. |
static int |
VK_SCREEN_MODE
Screen mode change key code. |
static int |
VK_SPLIT_SCREEN
Split screen key code. |
static int |
VK_STOP
Stop (STOP) button key code. |
static int |
VK_SUBTITLE_MODE
Subtitle mode change key code. |
static int |
VK_SURROUND_MODE
Surround mode change key code. |
static int |
VK_TELETEXT
Teletext key code. |
static int |
VK_VIDEO_MODE
Video mode change key code. |
static int |
VK_VOLUME_DOWN
Volume down key code. |
static int |
VK_VOLUME_UP
Volume up key code. |
static int |
VK_WINK
Device wink key code. |
Fields inherited from class java.awt.event.InputEvent |
---|
ALT_DOWN_MASK, ALT_GRAPH_DOWN_MASK, ALT_GRAPH_MASK, ALT_MASK, BUTTON1_DOWN_MASK, BUTTON1_MASK, BUTTON2_DOWN_MASK, BUTTON2_MASK, BUTTON3_DOWN_MASK, BUTTON3_MASK, CTRL_DOWN_MASK, CTRL_MASK, META_DOWN_MASK, META_MASK, SHIFT_DOWN_MASK, SHIFT_MASK |
Fields inherited from class java.awt.event.ComponentEvent |
---|
COMPONENT_FIRST, COMPONENT_HIDDEN, COMPONENT_LAST, COMPONENT_MOVED, COMPONENT_RESIZED, COMPONENT_SHOWN |
Fields inherited from class java.util.EventObject |
---|
source |
Constructor Summary | |
---|---|
RemoteControlEvent(Component source,
int id,
long when,
int modifiers,
int keyCode,
char keyChar)
Constructs a RemoteControlEvent object. |
Method Summary | |
---|---|
static void |
addResourceTypeListener(ResourceTypeListener listener)
Adds a ResourceTypeListener to the implementation. |
static KeyEvent[] |
getInstances()
Return the list of all existing instances of RemoteControlEvent , whether they are already
reserved or not. |
static void |
removeResourceTypeListener(ResourceTypeListener listener)
Removes a previously attached listener. |
static KeyEvent |
reserveOne(int keyCode,
boolean force,
long timeoutms,
ScarceResourceListener listener)
Returns a reserved instance out of the pool of all RemoteControlEvent instances. |
Methods inherited from class com.sun.dtv.ui.event.KeyEvent |
---|
isAvailable, release, reserve |
Methods inherited from class java.awt.event.KeyEvent |
---|
getKeyChar, getKeyCode, getKeyModifiersText, getKeyText, isActionKey, paramString, setKeyChar, setKeyCode, setSource |
Methods inherited from class java.awt.event.InputEvent |
---|
consume, getModifiers, getModifiersEx, getModifiersExText, getWhen, isAltDown, isAltGraphDown, isConsumed, isControlDown, isMetaDown, isShiftDown |
Methods inherited from class java.awt.event.ComponentEvent |
---|
getComponent |
Methods inherited from class java.awt.AWTEvent |
---|
getID, toString |
Methods inherited from class java.util.EventObject |
---|
getSource |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
public static final int VK_COLORED_KEY_0
public static final int VK_COLORED_KEY_1
public static final int VK_COLORED_KEY_2
public static final int VK_COLORED_KEY_3
public static final int VK_COLORED_KEY_4
public static final int VK_COLORED_KEY_5
public static final int VK_POWER
public static final int VK_DIMMER
public static final int VK_WINK
public static final int VK_REWIND
public static final int VK_STOP
public static final int VK_EJECT
public static final int VK_PLAY
public static final int VK_RECORD
public static final int VK_FF
public static final int VK_PLAY_SPEED_UP
public static final int VK_PLAY_SPEED_DOWN
public static final int VK_PLAY_SPEED_RESET
public static final int VK_GO_TO_NEXT
public static final int VK_GO_TO_START
public static final int VK_GO_TO_END
public static final int VK_GO_TO_PREV
public static final int VK_RANDOM_PLAY
public static final int VK_CHANNEL_UP
public static final int VK_CHANNEL_DOWN
public static final int VK_SCAN_CHANNEL
public static final int VK_PIP
public static final int VK_SPLIT_SCREEN
public static final int VK_DISPLAY_SWAP
public static final int VK_SCREEN_MODE
public static final int VK_VIDEO_MODE
public static final int VK_VOLUME_UP
public static final int VK_VOLUME_DOWN
public static final int VK_MUTE
public static final int VK_SURROUND_MODE
public static final int VK_BALANCE_RIGHT
public static final int VK_BALANCE_LEFT
public static final int VK_FADER_FRONT
public static final int VK_FADER_REAR
public static final int VK_BASS_UP
public static final int VK_BASS_DOWN
public static final int VK_INFO
public static final int VK_GUIDE
public static final int VK_TELETEXT
public static final int VK_SUBTITLE_MODE
public static final int VK_CONFIRM
public static final int VK_BACK
public static final int VK_MENU
public static final int VK_COLORED
public static final int VK_ARROWS
Constructor Detail |
---|
public RemoteControlEvent(Component source, int id, long when, int modifiers, int keyCode, char keyChar)
source
- the Component that originated the eventid
- an integer identifying the type of eventwhen
- a long integer that specifies the time the event occurredmodifiers
- the modifier keys down during event (shift, ctrl, alt,
meta) Either extended _DOWN_MASK or old _MASK modifiers should be used,
but both models should not be mixed in one event. Use of the extended
modifiers is preferred.keyCode
- the integer code for an actual key, or VK_UNDEFINED
(for a key-typed event) (as defined in java.awt.event.KeyEvent)keyChar
- the Unicode character generated by this event, or
CHAR_UNDEFINED (for key-pressed and key-released events which do not map
to a valid Unicode character) (as defined in java.awt.event.KeyEvent)KeyEvent
Method Detail |
---|
public static KeyEvent reserveOne(int keyCode, boolean force, long timeoutms, ScarceResourceListener listener) throws IllegalArgumentException, TimeoutException
RemoteControlEvent
instances. This method either returns
with the instance or throws an exception according to the situation.
This method behaves exactly as the reserve()
method.
KeyEvent
.
keyCode
- the integer code for an actual key, or VK_UNDEFINED
(for a key-typed event) (as defined in java.awt.event.KeyEvent)force
- If true
, this method is allowed to withdraw
any given resource from its current owner. If false
, the
implementation will block and wait until a resource of the given
type
is made available (using release()
) or
until timeoutms
milliseconds.timeoutms
- A positive amount of time in millisecond until
which this method will wait for any resource to be released by its
current owner. The value of -1
indicates that the
implementation will wait forever.listener
- The listener to be attached to receive
notification about the status of the resource.
RemoteControlEvent
that has been
reserved.
IllegalArgumentException
- If listener
is
null
or if the value specified in
timeoutms
is not valid i.e. not either a positive integer
or -1
.
TimeoutException
- If the time specified in
timeoutms
is over and the resource could not be reserved.KeyEvent.reserve(boolean, long, com.sun.dtv.resources.ScarceResourceListener)
public static KeyEvent[] getInstances()
RemoteControlEvent
, whether they are already
reserved or not.
This method overrides the one defined in KeyEvent
.
RemoteControlEvent
public static void addResourceTypeListener(ResourceTypeListener listener) throws NullPointerException
ResourceTypeListener
to the implementation.
Whenever a reserve()
or a release()
is
called on any resources of the same type, the implementation will
call the listener's corresponding methods.
listener
- The listener that is triggered for events on resources
of the same type.
NullPointerException
- If listener
is
null
.removeResourceTypeListener(com.sun.dtv.resources.ResourceTypeListener)
public static void removeResourceTypeListener(ResourceTypeListener listener) throws NullPointerException
listener
- The listener that is triggered for events on resources
of the same type.
NullPointerException
- If listener
is
null
.addResourceTypeListener(com.sun.dtv.resources.ResourceTypeListener)
|
Java DTV API 1.3 18-Nov-2009 |
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |