|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectnet.rim.device.api.media.WiredHeadsetMediaActionContext
public class WiredHeadsetMediaActionContext
The context object for media actions generated from wired headsets. All media actions generated
from MediaActionHandler.SOURCE_WIRED_HEADSET
will have context objects that are instances
of this class.
Field Summary | ||
---|---|---|
static int |
BUTTON_NEXT_TRACK
The "next track" button of a wired headset. |
|
static int |
BUTTON_PLAYPAUSE
The "play/pause" button of a wired headset. |
|
static int |
BUTTON_PREV_TRACK
The "previous track" button of a wired headset. |
|
static int |
BUTTON_UNDEFINED
An undefined or unknown wired headset button. |
|
static int |
BUTTON_VOLUME_DOWN
The "volume down" button of a wired headset. |
|
static int |
BUTTON_VOLUME_UP
The "volume up" button of a wired headset. |
Constructor Summary | ||
---|---|---|
WiredHeadsetMediaActionContext(int button)
Creates a new instance of WiredHeadsetMediaActionContext . |
Method Summary | ||
---|---|---|
boolean |
equals(Object obj)
Tests an object for equality with this object. |
|
int |
getButton()
Returns the button whose click generated the media action. |
|
static String |
getButtonName(int button)
Returns the name of a wired headset button. |
|
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_NEXT_TRACK
WiredHeadsetMediaActionContext.BUTTON_PREV_TRACK
,
Constant Field Valuespublic static final int BUTTON_PREV_TRACK
WiredHeadsetMediaActionContext.BUTTON_NEXT_TRACK
,
Constant Field Valuespublic static final int BUTTON_PLAYPAUSE
public static final int BUTTON_VOLUME_DOWN
WiredHeadsetMediaActionContext.BUTTON_VOLUME_UP
,
Constant Field Valuespublic static final int BUTTON_VOLUME_UP
WiredHeadsetMediaActionContext.BUTTON_VOLUME_DOWN
,
Constant Field ValuesConstructor Detail |
---|
public WiredHeadsetMediaActionContext(int button)
WiredHeadsetMediaActionContext
.
button
- the button that was pressed; should be one of the BUTTON_ constants defined in
this class, but this is not enforced; this value is returned from WiredHeadsetMediaActionContext.getButton()
.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