|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectnet.rim.device.api.media.BluetoothHeadsetMediaActionContext
public class BluetoothHeadsetMediaActionContext
The context object for media actions generated from Bluetooth headsets. All media actions
generated from MediaActionHandler.SOURCE_BLUETOOTH_HEADSET
will have context objects that
are instances of this class.
Field Summary | ||
---|---|---|
static int |
BUTTON_BACKWARD
The button indicating that the media action was generated as a result of a Bluetooth backward button. |
|
static int |
BUTTON_EJECT
The button indicating that the media action was generated as a result of a Bluetooth eject button. |
|
static int |
BUTTON_FAST_FORWARD
The button indicating that the media action was generated as a result of a Bluetooth fast forward button. |
|
static int |
BUTTON_FORWARD
The button indicating that the media action was generated as a result of a Bluetooth forward button. |
|
static int |
BUTTON_MUTE
The button indicating that the media action was generated as a result of a Bluetooth mute button. |
|
static int |
BUTTON_PAUSE
The button indicating that the media action was generated as a result of a Bluetooth pause button. |
|
static int |
BUTTON_PLAY
The button indicating that the media action was generated as a result of a Bluetooth play button. |
|
static int |
BUTTON_REWIND
The button indicating that the media action was generated as a result of a Bluetooth rewind button. |
|
static int |
BUTTON_STOP
The button indicating that the media action was generated as a result of a Bluetooth stop button. |
|
static int |
BUTTON_UNDEFINED
The button indicating that the media action was generated as a result of a undefined Bluetooth button. |
|
static int |
BUTTON_VOLUME_DOWN
The button indicating that the media action was generated as a result of a Bluetooth volume down button. |
|
static int |
BUTTON_VOLUME_UP
The button indicating that the media action was generated as a result of a Bluetooth volume up button. |
Constructor Summary | ||
---|---|---|
BluetoothHeadsetMediaActionContext(int button)
Creates a new instance of BluetoothHeadsetMediaActionContext . |
Method Summary | ||
---|---|---|
boolean |
equals(Object obj)
Tests an object for equality with this object. |
|
int |
getButton()
Returns the button of the media action. |
|
static String |
getButtonName(int button)
Returns the name of a "button" constant. |
|
int |
hashCode()
Returns a hash code value for the object. |
|
String |
toString()
Generates and returns a String representation of this object. |
Methods inherited from class java.lang.Object |
---|
getClass, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
public static final int BUTTON_UNDEFINED
public static final int BUTTON_VOLUME_UP
BluetoothHeadsetMediaActionContext.BUTTON_VOLUME_DOWN
,
Constant Field Valuespublic static final int BUTTON_VOLUME_DOWN
BluetoothHeadsetMediaActionContext.BUTTON_VOLUME_UP
,
Constant Field Valuespublic static final int BUTTON_MUTE
public static final int BUTTON_PLAY
BluetoothHeadsetMediaActionContext.BUTTON_PAUSE
,
BluetoothHeadsetMediaActionContext.BUTTON_STOP
,
Constant Field Valuespublic static final int BUTTON_STOP
BluetoothHeadsetMediaActionContext.BUTTON_PLAY
,
BluetoothHeadsetMediaActionContext.BUTTON_PAUSE
,
Constant Field Valuespublic static final int BUTTON_PAUSE
BluetoothHeadsetMediaActionContext.BUTTON_PLAY
,
BluetoothHeadsetMediaActionContext.BUTTON_STOP
,
Constant Field Valuespublic static final int BUTTON_REWIND
BluetoothHeadsetMediaActionContext.BUTTON_FAST_FORWARD
,
Constant Field Valuespublic static final int BUTTON_FAST_FORWARD
BluetoothHeadsetMediaActionContext.BUTTON_REWIND
,
Constant Field Valuespublic static final int BUTTON_EJECT
public static final int BUTTON_FORWARD
public static final int BUTTON_BACKWARD
Constructor Detail |
---|
public BluetoothHeadsetMediaActionContext(int button)
BluetoothHeadsetMediaActionContext
.
button
- the value to return from BluetoothHeadsetMediaActionContext.getButton()
; should be one of the BUTTON_
constants defined in this class, but this is not enforced.Method Detail |
---|
public boolean equals(Object obj)
equals
in class Object
obj
- the object to test for equality with this object; may be null.
Boolean.hashCode()
,
Hashtable
public int getButton()
public int hashCode()
Object
java.util.Hashtable
.
The general contract of hashCode
is:
hashCode
method on each of
the two objects must produce the same integer result.
Object.equals(java.lang.Object)
method, then calling the hashCode method on each of the
two objects must produce distinct integer results. However, the
programmer should be aware that producing distinct integer results
for unequal objects may improve the performance of hashtables.
As much as is reasonably practical, the hashCode method defined by class Object does return distinct integers for distinct objects. (This is typically implemented by converting the internal address of the object into an integer, but this implementation technique is not required by the JavaTM programming language.)
hashCode
in class Object
Object.equals(java.lang.Object)
,
Hashtable
public String toString()
toString
in class Object
public static String getButtonName(int button)
button
- the button whose name to return; known values are the BUTTON_ constants defined
in this class.
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
Copyright 1999-2011 Research In Motion Limited. 295 Phillip Street, Waterloo, Ontario, Canada, N2L 3W8. All Rights Reserved.
Java is a trademark of Oracle America Inc. in the US and other countries.
Legal