| Modifier and Type | Field and Description |
|---|---|
static String |
CONTEXT_ACTION |
static String |
CONTEXT_MENU |
protected boolean |
m_enabled
The menu's enabled flag.
|
protected String |
m_form
The form name string for the entry.
|
protected String |
m_icon
The menu's icon.
|
protected List |
m_items
The MenuItems, in order.
|
protected String |
m_linkBaseUrl
The base url for any action taken after clicking on the menu.
|
protected String |
m_resourceBaseUrl
The base url for any resources (images, etc.) required by the menu.
|
protected boolean |
m_showDisabled
The menu's flag for whether to display disabled entries
|
protected String |
m_title
The menu's title.
|
static String |
STATE_MENU |
CHECKED_FALSE, CHECKED_NA, CHECKED_TRUE| Constructor and Description |
|---|
MenuImpl()
Construct a menu (good for a menu bar).
|
MenuImpl(String title,
String icon,
boolean enabled)
Construct a menu (good for sub-menus).
|
MenuImpl(String title,
String icon,
boolean enabled,
String form)
Construct a menu (good for sub-menus).
|
MenuImpl(VelocityPortlet p,
RunData r,
String action) |
| Modifier and Type | Method and Description |
|---|---|
MenuItem |
add(MenuItem item)
Add a menu item to the bar.
|
void |
adjustDividers()
Adjust by removing any dividers at the start or end.
|
void |
clear()
Clear the menu of all items.
|
String |
getAccessibilityLabel() |
String |
getAction()
Access the action string for this item; what to do when the user clicks.
|
int |
getChecked()
Access the checked status of this item.
|
String |
getForm()
Access the form name whose values will be used when this item is selected.
|
String |
getIcon()
Access the icon name for the item (or null if no icon).
|
boolean |
getIsContainer()
Does this item act as a container for other items?
|
boolean |
getIsDivider()
Is this item a divider ?
|
boolean |
getIsEnabled()
Access the enabled flag for the item.
|
boolean |
getIsField()
Access the is-field (not a button) flag.
|
MenuItem |
getItem(int index)
Access one sub-items of the item.
|
List |
getItems()
Access the sub-items of the item.
|
boolean |
getShowdisabled()
Access whether disabled items in this menu should be shown.
|
String |
getTitle()
Access the display title for the item.
|
String |
getUrl()
Access the full URL string for this item; what to do when the user clicks.
|
boolean |
isEmpty()
Check if there are any sub-items.
|
Menu |
setShowdisabled(boolean value)
Set whether disabled items in this menu should be shown.
|
int |
size()
Count the sub-items of the item.
|
protected String m_title
protected String m_icon
protected boolean m_enabled
protected List m_items
protected String m_form
protected String m_linkBaseUrl
protected String m_resourceBaseUrl
protected boolean m_showDisabled
public static final String CONTEXT_ACTION
public static final String CONTEXT_MENU
public static final String STATE_MENU
public MenuImpl(VelocityPortlet p, RunData r, String action)
public MenuImpl(String title, String icon, boolean enabled)
public MenuImpl(String title, String icon, boolean enabled, String form)
public MenuImpl()
public boolean getIsContainer()
getIsContainer in interface MenuItempublic boolean getIsDivider()
getIsDivider in interface MenuItempublic String getTitle()
public String getIcon()
public boolean getIsEnabled()
getIsEnabled in interface MenuItempublic String getAction()
public String getUrl()
public String getForm()
public List getItems()
public int size()
public boolean isEmpty()
public MenuItem getItem(int index)
public int getChecked()
getChecked in interface MenuItemMenuItempublic boolean getIsField()
getIsField in interface MenuItempublic void adjustDividers()
adjustDividers in interface Menupublic Menu setShowdisabled(boolean value)
setShowdisabled in interface Menuvalue - True to show disabled items, False otherwise.public boolean getShowdisabled()
getShowdisabled in interface Menupublic String getAccessibilityLabel()
getAccessibilityLabel in interface MenuItemCopyright © 2003–2017 The Sakai Foundation. All rights reserved.