| java.lang.Object org.sakaiproject.cheftool.menu.MenuImpl
MenuImpl | public class MenuImpl implements Menu(Code) | |
Menu is an ordered list of MenuItems.
|
Method Summary | |
public MenuItem | add(MenuItem item) Add a menu item to the bar.
Parameters: entry - The menu item to add. | public void | adjustDividers() Adjust by removing any dividers at the start or end. | public void | clear() Clear the menu of all items. | public String | getAction() Access the action string for this item; what to do when the user clicks. | public int | getChecked() Access the checked status of this item. | public String | getForm() Access the form name whose values will be used when this item is selected. | public String | getIcon() Access the icon name for the item (or null if no icon). | public boolean | getIsContainer() | public boolean | getIsDivider() | public boolean | getIsEnabled() Access the enabled flag for the item. | public boolean | getIsField() Access the is-field (not a button) flag. | public MenuItem | getItem(int index) Access one sub-items of the item. | public List | getItems() Access the sub-items of the item. | public boolean | getShowdisabled() Access whether disabled items in this menu should be shown. | public String | getTitle() Access the display title for the item. | public String | getUrl() Access the full URL string for this item; what to do when the user clicks. | public boolean | isEmpty() Check if there are any sub-items. | public Menu | setShowdisabled(boolean value) Set whether disabled items in this menu should be shown.
Parameters: value - True to show disabled items, False otherwise. | public int | size() Count the sub-items of the item. |
CONTEXT_ACTION | final public static String CONTEXT_ACTION(Code) | | |
m_enabled | protected boolean m_enabled(Code) | | The menu's enabled flag.
|
m_form | protected String m_form(Code) | | The form name string for the entry.
|
m_items | protected List m_items(Code) | | The MenuItems, in order.
|
m_linkBaseUrl | protected String m_linkBaseUrl(Code) | | The base url for any action taken after clicking on the menu.
|
m_resourceBaseUrl | protected String m_resourceBaseUrl(Code) | | The base url for any resources (images, etc.) required by the menu.
|
m_showDisabled | protected boolean m_showDisabled(Code) | | The menu's flag for whether to display disabled entries
|
MenuImpl | public MenuImpl(String title, String icon, boolean enabled)(Code) | | Construct a menu (good for sub-menus).
|
MenuImpl | public MenuImpl(String title, String icon, boolean enabled, String form)(Code) | | Construct a menu (good for sub-menus).
|
MenuImpl | public MenuImpl()(Code) | | Construct a menu (good for a menu bar).
|
add | public MenuItem add(MenuItem item)(Code) | | Add a menu item to the bar.
Parameters: entry - The menu item to add. the item. |
adjustDividers | public void adjustDividers()(Code) | | Adjust by removing any dividers at the start or end.
|
clear | public void clear()(Code) | | Clear the menu of all items.
|
getAction | public String getAction()(Code) | | Access the action string for this item; what to do when the user clicks. Note: if getIsMenu(), there will not be an action string (will return "").
The action string for this item. |
getChecked | public int getChecked()(Code) | | Access the checked status of this item. Possible values:
See Also: MenuItem The the checked status of this item. |
getForm | public String getForm()(Code) | | Access the form name whose values will be used when this item is selected.
The form name whose values will be used when this item is selected. |
getIcon | public String getIcon()(Code) | | Access the icon name for the item (or null if no icon).
The icon name for the item (or null if no icon). |
getIsContainer | public boolean getIsContainer()(Code) | | Does this item act as a container for other items?
true if this MenuItem is a container for other items, false if not. |
getIsDivider | public boolean getIsDivider()(Code) | | Is this item a divider ?
true if this MenuItem is a divider, false if not. |
getIsEnabled | public boolean getIsEnabled()(Code) | | Access the enabled flag for the item.
True if the item is enabled, false if not. |
getIsField | public boolean getIsField()(Code) | | Access the is-field (not a button) flag.
True if the item is a field, false if not. |
getItem | public MenuItem getItem(int index)(Code) | | Access one sub-items of the item. Note: if !isContainer(), there will be no sub-items (will return null).
Parameters: index - The index position (0 based) for the sub-item to get. The sub-item of the item. |
getItems | public List getItems()(Code) | | Access the sub-items of the item. Note: if !isContainer(), there will be no sub-items (will return EmptyIterator).
The sub-items of the item. |
getShowdisabled | public boolean getShowdisabled()(Code) | | Access whether disabled items in this menu should be shown.
Current setting for show-disabled status (true to show disabled items, false to NOT show disabled items). |
getTitle | public String getTitle()(Code) | | Access the display title for the item.
The display title for the item. |
getUrl | public String getUrl()(Code) | | Access the full URL string for this item; what to do when the user clicks. Note: this if defined overrides getAction() which should be "". Note: if getIsMenu(), there will not be a URL string (will return "").
The full URL string for this item. |
isEmpty | public boolean isEmpty()(Code) | | Check if there are any sub-items. Note: if !isContainer(), this is empty.
true of there are no sub-items, false if there are. |
setShowdisabled | public Menu setShowdisabled(boolean value)(Code) | | Set whether disabled items in this menu should be shown.
Parameters: value - True to show disabled items, False otherwise. This, for convenience. |
size | public int size()(Code) | | Count the sub-items of the item. Note: if !isContainer(), the count is 0.
The count of sub-items of the item. |
|
|