|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.google.gwt.core.client.JavaScriptObject
com.sap.ui.core.client.Element
com.sap.ui.core.client.Control
com.sap.ui.commons.client.Menu
public class Menu
The class Menu is the GWT wrapper
for the Phoenix control: sap.ui.commons.Menu.
A container for menu items. When the space in the browser is not large enough to display all defined items, a scroll bar is provided.
| Constructor Summary | |
|---|---|
protected |
Menu()
constructs the class Menuhidden due to JavaScriptObject restriction |
| Method Summary | |
|---|---|
Menu |
addItem(MenuItemBase item)
Appends a item to the aggregation items. |
Menu |
attachItemSelectEvent(com.sap.ui.core.client.event.EventListener listener)
attach an EventListener
This event is redundant to the select event of a MenuItem and provides the application an
alternative option to listen to select events. |
void |
close()
Closes the menu. |
static Menu |
create()
creates a new instance of the class Menu |
static Menu |
create(String idOrConfig)
creates a new instance of the class Menu |
static Menu |
create(String id,
String config)
creates a new instance of the class Menu |
Menu |
destroyItems()
Destroys all the items in the Items-aggregation. |
Menu |
detachItemSelectEvent(com.sap.ui.core.client.event.EventListener listener)
detach an EventListener
This event is redundant to the select event of a MenuItem and provides the application an
alternative option to listen to select events. |
String |
getAriaDescription()
Getter for property ariaDescription
The label/description provided for screenreaders |
com.sap.ui.core.client.js.JsArray<MenuItemBase> |
getItems()
Getter for aggregation items Aggregation of menu items. |
int |
indexOfItem(MenuItemBase item)
Checks for the provided com.sap.ui.commons.client.MenuItemBase in the items-aggregation and
returns its index if found or -1 otherwise. |
Menu |
insertItem(MenuItemBase item,
int index)
Inserts some item into the aggregation named items. |
boolean |
isEnabled()
Getter for property enabled
Disabled menus have other colors than enabled ones, depending on customer settings. |
void |
open(boolean withKeyboard,
Object openerRef,
String my,
String at,
String of,
String offset)
Opens the menu. |
com.sap.ui.core.client.js.JsArray<com.sap.ui.core.client.js.JsArray<MenuItemBase>> |
removeAllItems()
Removes all the items in the items-aggregation. |
com.sap.ui.core.client.js.JsArray<MenuItemBase> |
removeItem(int index)
Removes a item from the aggregation named items. |
Menu |
setAriaDescription(String value)
Setter for property ariaDescription |
Menu |
setEnabled(boolean value)
Setter for property enabledDefault value is: true |
| Methods inherited from class com.sap.ui.core.client.Control |
|---|
addStyleClass, hasStyleClass, invalidate, placeAt, placeAt, removeStyleClass, rerender |
| Methods inherited from class com.sap.ui.core.client.Element |
|---|
_convertArray, _convertArray, _convertArray, _convertArray, _convertArray, attachBrowserEvent, attachEvent, bindAggregation, bindContext, bindProperty, bindProperty, destroy, detachBrowserEvent, detachEvent, getDomRef, getElementName, getId, getLibraryName, getModel, getParent, getProperty, getTooltip_AsString, getTooltip_Text, getTooltip, isActive, setModel, setProperty, setTooltip, setTooltip, unbindAggregation, unbindContext, unbindProperty |
| Methods inherited from class com.google.gwt.core.client.JavaScriptObject |
|---|
cast, createArray, createFunction, createObject, equals, hashCode, toSource, toString |
| Methods inherited from class java.lang.Object |
|---|
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
|---|
protected Menu()
MenuJavaScriptObject restriction
| Method Detail |
|---|
public static Menu create()
Menu
public static Menu create(String idOrConfig)
Menu
id - id of the Menu or configuration JSON string
public static Menu create(String id,
String config)
Menu
id - id of the Menuconfig - configuration JSON stringpublic final boolean isEnabled()
enabled
Disabled menus have other colors than enabled ones, depending on customer settings.
public final Menu setEnabled(boolean value)
enabledtrue
value - boolean
this to allow method chainingpublic final String getAriaDescription()
ariaDescription
The label/description provided for screenreaders
public final Menu setAriaDescription(String value)
ariaDescription
value - String
this to allow method chainingpublic final com.sap.ui.core.client.js.JsArray<MenuItemBase> getItems()
public final Menu insertItem(MenuItemBase item,
int index)
items.
item - the item to insertindex - int the 0-based index the item should be inserted at.
this to allow method chainingpublic final Menu addItem(MenuItemBase item)
items.
item - com.sap.ui.commons.client.MenuItemBase the item to add
this to allow method chainingpublic final com.sap.ui.core.client.js.JsArray<MenuItemBase> removeItem(int index)
items.
index - int the position of the item to remove.
public final com.sap.ui.core.client.js.JsArray<com.sap.ui.core.client.js.JsArray<MenuItemBase>> removeAllItems()
public final int indexOfItem(MenuItemBase item)
com.sap.ui.commons.client.MenuItemBase in the items-aggregation and
returns its index if found or -1 otherwise.
item - the item whose index is looked for.
public final Menu destroyItems()
this to allow method chainingpublic final Menu attachItemSelectEvent(com.sap.ui.core.client.event.EventListener listener)
EventListener
This event is redundant to the select event of a MenuItem and provides the application an
alternative option to listen to select events. This event is only fired on the root menu of a
menu hierarchy.
listener - reference to the EventListener
this to allow method chainingpublic final Menu detachItemSelectEvent(com.sap.ui.core.client.event.EventListener listener)
EventListener
This event is redundant to the select event of a MenuItem and provides the application an
alternative option to listen to select events. This event is only fired on the root menu of a
menu hierarchy.
listener - reference to the EventListener
this to allow method chaining
public final void open(boolean withKeyboard,
Object openerRef,
String my,
String at,
String of,
String offset)
withKeyboard - Whether the menu has been opened with the keyboard. If so, then the first item is selected after opening the menu.openerRef - (Optional) DomNode that openes the menu (will be focused again after the menu is closed).my - see sap.ui.core.Popup.setPositionat - see sap.ui.core.Popup.setPositionof - see sap.ui.core.Popup.setPositionoffset - see sap.ui.core.Popup.setPositionpublic final void close()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||