com.sap.netweaver.bc.uwl.config

Class MenuItem

java.lang.Object
  extended bycom.sap.netweaver.bc.uwl.config.MenuItem
All Implemented Interfaces:
Cloneable, Serializable

public final class MenuItem
extends Object
implements Cloneable, Serializable

 Allow create menu items which can be related to a UWL DisplayAttribute.
 
 Example:
	<DisplayAttribute name="priority" type ="user" ...>
		<Menu>
			<MenuItem name="Low" actionRef="priorityLow" referenceBundle="menu_priority_low" />
			<MenuItem name="Normal" actionRef="priorityNormal" referenceBundle="menu_priority_normal" />
			<MenuItem name="High" actionRef="priorityHigh" referenceBundle="menu_priority_high" />
		</Menu>
	</DisplayAttribute>
 

See Also:
Serialized Form

Constructor Summary
MenuItem(String name, String actionRef)
          Create a MenuItem with a unique name and the corresponding action name for this menuitem
 
Method Summary
 String getActionRef()
          Get the Action name.
 Descriptions getDescriptions()
          Get display text for this menu item This could be null, in which case text from the Action attached has to be taken
 String getLongText(Locale locale)
          Get the tooltip for this menu item
 String getName()
          Get the unique ID for this menu item.
 String getReferenceBundle()
          Used Internally
 String getShortText(Locale locale)
          Get the menu display text.
 MenuItemCollection getSubMenuItemCollection()
          Get access to the sub MenuItemCollection
 MenuItem[] getSubMenuItems()
          This will return all the sub MenuItem which are under this Menutem.
 boolean hasSubMenus()
          If there are submenu under this menu this will return true.
 void setActionRef(String string)
          Used internally to allow specifing action name in the xml file.
 void setDescriptions(Descriptions descriptions)
          Set the Description for the display text.
 void setName(String string)
          Set the unique ID for this menu item
 void setReferenceBundle(String string)
          Used Internally
 void setSubMenuItemCollection(MenuItemCollection c)
          Set the sub menu with a list of ItemMenu using a MenuCollection.
 void setSubMenuItems(ArrayList list)
          Set the sub Menu with the list of MenuItems
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

MenuItem

public MenuItem(String name,
                String actionRef)
Create a MenuItem with a unique name and the corresponding action name for this menuitem

Parameters:
name -
actionRef -
Method Detail

hasSubMenus

public boolean hasSubMenus()
If there are submenu under this menu this will return true.

Returns:

getSubMenuItems

public MenuItem[] getSubMenuItems()
This will return all the sub MenuItem which are under this Menutem.

Returns:

setSubMenuItems

public void setSubMenuItems(ArrayList list)
Set the sub Menu with the list of MenuItems

Parameters:
list -

getSubMenuItemCollection

public MenuItemCollection getSubMenuItemCollection()
Get access to the sub MenuItemCollection

Returns:
See Also:
getSubMenuItems()

setSubMenuItemCollection

public void setSubMenuItemCollection(MenuItemCollection c)
Set the sub menu with a list of ItemMenu using a MenuCollection.

Parameters:
c - Passing in null to create an empty collection
See Also:
setSubMenuItems(ArrayList)

getShortText

public String getShortText(Locale locale)
Get the menu display text.

Parameters:
locale -
Returns:

getLongText

public String getLongText(Locale locale)
Get the tooltip for this menu item

Parameters:
locale -
Returns:

getDescriptions

public Descriptions getDescriptions()
Get display text for this menu item This could be null, in which case text from the Action attached has to be taken

Returns:

getName

public String getName()
Get the unique ID for this menu item.

Returns:

setDescriptions

public void setDescriptions(Descriptions descriptions)
Set the Description for the display text.

Parameters:
descriptions -

setName

public void setName(String string)
Set the unique ID for this menu item

Parameters:
string -

getActionRef

public String getActionRef()
Get the Action name. Used internaly to look up Action

Returns:
Maybe null

setActionRef

public void setActionRef(String string)
Used internally to allow specifing action name in the xml file.

Parameters:
string -

getReferenceBundle

public String getReferenceBundle()
Used Internally

Returns:

setReferenceBundle

public void setReferenceBundle(String string)
Used Internally

Parameters:
string -


Copyright 2006 SAP AG Complete Copyright Notice