|
|||||||||
| 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 for adding items to application menus.
Developers should extend an instance of this class and register your
instance with the ApplicationMenuItemRepository. Register your
instance along with an appropriate context ID, which will define when your
item will appear, as defined by the contants in MenuItemRepository.
| 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 | ||
|
boolean |
equals(Object o)
Determines if this menu item is equal to the provided object. |
|
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 |
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.
public boolean equals(Object o)
o - Object to test against this menu item.public int hashCode()
Note: this method builds a hash out this menu item's current
position, a hash of it's cookie, and a hash of the results of
toString().
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
Copyright 1999-2004 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.