|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectnet.rim.blackberry.api.menuitem.ApplicationMenuItem
public abstract class ApplicationMenuItem
Provides the functionality to add items to application menus.
Developers should extend an instance of this class and register the
instance with the ApplicationMenuItemRepository. Register the
instance along with an appropriate context ID, which defines where the
menu item appears, as defined by the constants in
ApplicationMenuItemRepository. To add menu items for the purpose
of sending image or video files, the preferred method is to use the JSR 211
ContentHandler API.
Applications registering with ContentHandler.ACTION_SEND
and providing an ActionNameMap
will have items added to dialogs and/or menus to be invoked as handlers
for sending the selected file.
| Constructor Summary | ||
|---|---|---|
|
ApplicationMenuItem(int order)
Creates a new ApplicationMenuItem instance with provided menu position. |
|
|
ApplicationMenuItem(Object context,
int order)
Creates a new ApplicationMenuItem instance with provided context and menu position. |
|
| Method Summary | ||
|---|---|---|
|
int |
hashCode()
Retrieves a hash code value for this menu item. |
|
abstract Object |
run(Object context)
Runs the menu item given the context. |
|
abstract String |
toString()
Retrieves name menu item should use for display in a menu. |
| Methods inherited from class java.lang.Object |
|---|
equals, getClass, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
|---|
public ApplicationMenuItem(Object context,
int order)
This constructor builds a new ApplicationMenuItem given the item information and an integer representing the position of the item within the menu.
Developers should override this method to take custom actions on the context parameter.
context - Generic object containing context specific data.order - Display order of this item, lower numbers correspond to
higher placement in the menu (relative, an entry of 0 won't necessarily
result in the top most item).public ApplicationMenuItem(int order)
order - Display order of this item, lower numbers correspond to
higher placement in the menu (relative, an entry of 0 won't necessarily
result in the top most item).| Method Detail |
|---|
public abstract Object run(Object context)
Developers should override this method and implement specific menu handling.
context - Object containing the context specific information.
public abstract String toString()
Sub-classes should override this to provide the name the menu item should use for display in a menu.
toString in class Objectpublic int hashCode()
Note: this method builds a hash out of this menu item's current
position, a hash of its cookie, and a hash of the results of
ApplicationMenuItem.toString().
hashCode in class ObjectObject.equals(java.lang.Object),
Hashtable
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
Copyright 1999-2010 Research In Motion Limited. 295 Phillip Street, Waterloo, Ontario, Canada, N2L 3W8. All Rights Reserved.
Copyright 1993-2003 Sun Microsystems, Inc. 901 San Antonio Road, Palo Alto, California, 94303, U.S.A. All Rights Reserved.
Copyright 2002-2003 Nokia Corporation All Rights Reserved.
Java is a trademark of Sun Microsystems, Inc.