|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Object | +--net.rim.blackberry.api.menuitem.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 when the
menu item appears, as defined by the constants in
ApplicationMenuItemRepository.
| 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(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).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).| Method Detail |
public 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
toString().
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.
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
Copyright 1999-2007 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.
Copyright 2002-2003 Nokia Corporation All Rights Reserved.
Java is a trademark or registered trademark of Sun Microsystems, Inc. in the US and other countries.