|
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--com.ibm.commerce.tools.common.ui.DynamicTreeMenuType
Creates an menu type to be matched in DynamicTreeNode.menuType.
A DynamicTreeNode can define its own menus or it can specify a menuType. If the DynamicTreeNode.menuType is set, a matching DynamicTreeMenuType must be set. When a match is found, the menu items and their corresponding actions are assigned to the DynamicTreeNode n JavaScript. When the node is selected, and if menus are enabled, the context menu will appear and be populated with data from the matching DynamicTreeMenuType.
If no matching DynamicTreeMenuType exists for a DynamicTreeNode, the DynamicTreeNode must supply its own menus or an error message will be displayed when the user attempts to display the context menu.
Field Summary | |
protected java.lang.String[][] |
menu
Defines the menu items and their associated actions. |
protected java.lang.String |
menuType
Defines the name of the DynamicTreeMenuType. |
Constructor Summary | |
DynamicTreeMenuType()
Default constructor. |
|
DynamicTreeMenuType(java.lang.String[][] menu,
java.lang.String menuType)
Creates a DynamicTreeMenuType, loading it with a name and menu array. |
Method Summary | |
java.lang.String[][] |
copyStringArray(java.lang.String[][] str)
Copies an array of String arrays into a new array of String arrays. |
java.lang.String[][] |
getMenu()
Returns the list of menu items and their associated actions. |
java.lang.String |
getMenuType()
Returns the name of this DynamicTreeMenuType |
void |
setMenu(java.lang.String[][] newMenu)
Sets the menu field which is a list of menu items and associated actions. |
void |
setMenuType(java.lang.String newMenuType)
Sets the name of this DynamicTreeMenuType. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
protected java.lang.String[][] menu
Each array should consist of two values.
First, the NLS enabled menu name, which will be displayed to the user.
Second, the action, in the form of a fully qualified URL, which will be launched when the user selects this menu item. If associated DynamicTreeNode.contextMenuParams is set, this value will be appended to the action by adding the following: "?" + node.contextMenuParams
An array with empty quotes yields a seperator line in the context menu.
For example:
{ {"Open", "http://www.ibm.com"},
{"", ""},
{"Copy", "http://www.ibm.com/copyAction"} }
protected java.lang.String menuType
DynamicTreeNode.menuType
Constructor Detail |
public DynamicTreeMenuType()
public DynamicTreeMenuType(java.lang.String[][] menu, java.lang.String menuType)
menu
- The list of menus and their associated actions.menuType
- The name of this DynamicTreeMenuType.Method Detail |
public java.lang.String[][] copyStringArray(java.lang.String[][] str)
Typically used by the constructor to create new Strings for the array of String arrays refernced as a parameter. argument to create a fresh copy of the Strings.
str
- The array of String arrays.public java.lang.String[][] getMenu()
public java.lang.String getMenuType()
public void setMenu(java.lang.String[][] newMenu)
menu
field which is a list of menu items and associated actions.newMenu
- The list of menu items and associated actions.public void setMenuType(java.lang.String newMenuType)
newMenuType
- The new name of this DynamicTreeMenuType.
|
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |