com.sybase.uep.bobclient.controls
Class MenuGroup

java.lang.Object
  extended by com.sybase.uep.bobclient.controls.MenuGroup

public class MenuGroup
extends java.lang.Object

Menu Action class to hold properties of a menu item

Author:
tdang

Field Summary
static int MENU_GROUP_TYPE_ABOVE_CONTEXT
           
static int MENU_GROUP_TYPE_BELOW_CONTEXT
           
static int MENU_GROUP_TYPE_CONTROL_CONTEXT
           
 
Constructor Summary
MenuGroup()
          Constructor to create Menu Action object
 
Method Summary
 void addMenuAction(net.rim.device.api.ui.MenuItem menu, int type)
          Add menu action
 void addSeperator(int type)
          Add seperator
 void deleteMenuByName(java.lang.String menuName)
           
 net.rim.device.api.ui.MenuItem disableMenuByName(java.lang.String menuName)
          Disable a menu by name
 int getAboveContextOrdinal()
          Get the current above control context ordinal
 int getAboveContextPriority()
          Get the current above control context priority
 net.rim.device.api.ui.MenuItem[] getAllMenus()
          Get all the menus
 int getBelowContextOrdinal()
          Get the current below control context ordinal
 int getBelowContextPriority()
          Get the current below control context priority
 int getContextOrdinal()
          Get the current control context ordinal
 int getContextPriority()
          Get the current control context priority
 int getControlContextOrdinal()
          Get the control context ordinal
 int getControlContextPriority()
          Get the control context priority
 net.rim.device.api.ui.MenuItem getMenuByName(java.lang.String menuName)
          Get the Menu by name
 int getSize()
          Get the size of all the menus
 void removeAllMenus()
          Remove all Menus
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

MENU_GROUP_TYPE_ABOVE_CONTEXT

public static final int MENU_GROUP_TYPE_ABOVE_CONTEXT
See Also:
Constant Field Values

MENU_GROUP_TYPE_CONTROL_CONTEXT

public static final int MENU_GROUP_TYPE_CONTROL_CONTEXT
See Also:
Constant Field Values

MENU_GROUP_TYPE_BELOW_CONTEXT

public static final int MENU_GROUP_TYPE_BELOW_CONTEXT
See Also:
Constant Field Values
Constructor Detail

MenuGroup

public MenuGroup()
Constructor to create Menu Action object

Method Detail

getControlContextOrdinal

public int getControlContextOrdinal()
Get the control context ordinal

Returns:
int value of the ordinal

getControlContextPriority

public int getControlContextPriority()
Get the control context priority

Returns:
int value of the priority

addMenuAction

public void addMenuAction(net.rim.device.api.ui.MenuItem menu,
                          int type)
Add menu action

Parameters:
menu - - MenuItem object
type - - menu group type Can be MenuGroup.MENU_GROUP_TYPE_ABOVE_CONTEXT or MenuGroup.MENU_GROUP_TYPE_BELOW_CONTEXT

addSeperator

public void addSeperator(int type)
Add seperator

Parameters:
type - - menu group type Can be MenuGroup.MENU_GROUP_TYPE_ABOVE_CONTEXT or MenuGroup.MENU_GROUP_TYPE_BELOW_CONTEXT

getSize

public int getSize()
Get the size of all the menus

Returns:
int value of the size

removeAllMenus

public void removeAllMenus()
Remove all Menus


deleteMenuByName

public void deleteMenuByName(java.lang.String menuName)

getAllMenus

public net.rim.device.api.ui.MenuItem[] getAllMenus()
Get all the menus

Returns:
array list of MenuItem objects

getMenuByName

public net.rim.device.api.ui.MenuItem getMenuByName(java.lang.String menuName)
Get the Menu by name

Returns:
MenuItem that matches the menu name

disableMenuByName

public net.rim.device.api.ui.MenuItem disableMenuByName(java.lang.String menuName)
Disable a menu by name

Returns:
the disabled MenuItem object

getContextOrdinal

public int getContextOrdinal()
Get the current control context ordinal

Returns:
ordinal value

getAboveContextOrdinal

public int getAboveContextOrdinal()
Get the current above control context ordinal

Returns:
ordinal value

getBelowContextOrdinal

public int getBelowContextOrdinal()
Get the current below control context ordinal

Returns:
ordinal value

getContextPriority

public int getContextPriority()
Get the current control context priority

Returns:
ordinal value

getAboveContextPriority

public int getAboveContextPriority()
Get the current above control context priority

Returns:
ordinal value

getBelowContextPriority

public int getBelowContextPriority()
Get the current below control context priority

Returns:
ordinal value