net.rim.device.api.ui.menu
Class SubMenu

java.lang.Object
  extended by net.rim.device.api.ui.component.Menu
      extended by net.rim.device.api.ui.menu.SubMenu
Direct Known Subclasses:
ContentHandlerMenu

public class SubMenu
extends Menu

A submenu that can be added to a Menu instance by invoking Menu.add(SubMenu submenu).

Since:
BlackBerry API 6.0.0

Field Summary
 
Fields inherited from class net.rim.device.api.ui.component.Menu
CANCELLED, INSTANCE_CONTEXT, INSTANCE_CONTEXT_SELECTION, INSTANCE_DEFAULT, MENU_POPUP, SORTED, UNDEFINED
 
Constructor Summary
SubMenu(MenuItem[] items, String text, int ordering, int priority)
          Constructs a submenu.
SubMenu(MenuItem[] items, ResourceBundle rb, int rbId, int ordering, int priority)
          Constructs a submenu.
 
Method Summary
 MenuItem getMenuItem()
          Retrieves the menu item that is to be added to the parent menu and that causes the submenu to be displayed when invoked.
 
Methods inherited from class net.rim.device.api.ui.component.Menu
add, add, add, add, add, addSeparator, close, deleteAll, deleteItem, getBackground, getBorder, getCaretBackground, getDefault, getFont, getItem, getItemCookie, getItemId, getSelectedCookie, getSelectedId, getSelectedItem, getSize, isDisplayed, setBackground, setBorder, setCaretBackground, setDefault, setDefault, setFont, setItemHighlight, setTarget, show
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 



Constructor Detail

SubMenu

public SubMenu(MenuItem[] items,
               String text,
               int ordering,
               int priority)
Constructs a submenu.

Parameters:
items - Array of MenuItem objects to add to the menu.
text - Text to identify the submenu item in the parent menu.
ordering - Ordering of the submenu item relative to other items in the parent menu.
priority - Priority of the submenu item within the parent menu.
Since:
BlackBerry API 6.0.0

SubMenu

public SubMenu(MenuItem[] items,
               ResourceBundle rb,
               int rbId,
               int ordering,
               int priority)
Constructs a submenu.

Parameters:
items - Array of MenuItem objects to add to the menu.
rb - Resource bundle which contains the text string to identify the submenu in the parent menu.
rbId - Identifier of the submenu text string within the resource bundle rb.
ordering - Ordering of the submenu item relative to other items in the parent menu.
priority - Priority of the submenu item within the parent menu.
Since:
BlackBerry API 6.0.0


Method Detail

getMenuItem

public MenuItem getMenuItem()
Retrieves the menu item that is to be added to the parent menu and that causes the submenu to be displayed when invoked.

Returns:
Submenu item added to the parent menu item.
Since:
BlackBerry API 6.0.0





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.