|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.google.gwt.user.client.ui.UIObject
com.google.gwt.user.client.ui.Widget
com.sap.ui.core.client.ControlWidget
com.sap.ui.commons.client.MenuWidget
public class MenuWidget
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.
| Nested Class Summary |
|---|
| Nested classes/interfaces inherited from class com.google.gwt.user.client.ui.UIObject |
|---|
com.google.gwt.user.client.ui.UIObject.DebugIdImpl, com.google.gwt.user.client.ui.UIObject.DebugIdImplEnabled |
| Field Summary |
|---|
| Fields inherited from class com.google.gwt.user.client.ui.UIObject |
|---|
DEBUG_ID_PREFIX |
| Constructor Summary | |
|---|---|
|
MenuWidget()
constructs the class MenuWidget |
protected |
MenuWidget(Menu control)
constructs the class MenuWidget |
|
MenuWidget(String id)
constructs the class MenuWidget |
| Method Summary | |
|---|---|
void |
addItem(MenuItemBase item)
Appends some item to the items-aggregation. |
void |
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. |
void |
destroyItems()
Destroys all the items in the Items-aggregation. |
void |
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 |
Menu |
getControl()
returns the reference to the Phoenix Control |
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. |
void |
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. |
void |
removeAllItems()
Removes all the items in the items-aggregation. |
void |
removeItem(int index)
Removes the item at position index in the items-aggregation named. |
void |
setAriaDescription(String value)
Setter for property ariaDescription |
void |
setEnabled(boolean value)
Setter for property enabledDefault value is: true |
| Methods inherited from class com.sap.ui.core.client.ControlWidget |
|---|
destroy, doAttachChildren, doDetachChildren, isDesignTime, wrap |
| Methods inherited from class com.google.gwt.user.client.ui.Widget |
|---|
addAttachHandler, addBitlessDomHandler, addDomHandler, addHandler, asWidget, asWidgetOrNull, createHandlerManager, delegateEvent, fireEvent, getHandlerCount, getLayoutData, getParent, isAttached, isOrWasAttached, onAttach, onBrowserEvent, onDetach, onLoad, onUnload, removeFromParent, setLayoutData, sinkEvents |
| Methods inherited from class com.google.gwt.user.client.ui.UIObject |
|---|
addStyleDependentName, addStyleName, ensureDebugId, ensureDebugId, ensureDebugId, getAbsoluteLeft, getAbsoluteTop, getElement, getOffsetHeight, getOffsetWidth, getStyleElement, getStyleName, getStyleName, getStylePrimaryName, getStylePrimaryName, getTitle, isVisible, isVisible, onEnsureDebugId, removeStyleDependentName, removeStyleName, setElement, setElement, setHeight, setPixelSize, setSize, setStyleDependentName, setStyleName, setStyleName, setStyleName, setStyleName, setStylePrimaryName, setStylePrimaryName, setTitle, setVisible, setVisible, setWidth, sinkBitlessEvent, toString, unsinkEvents |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
|---|
public MenuWidget()
MenuWidget
public MenuWidget(String id)
MenuWidget
id - id of the MenuWidgetprotected MenuWidget(Menu control)
MenuWidget
control - reference to an existing Menu| Method Detail |
|---|
public Menu getControl()
Control
getControl in class com.sap.ui.core.client.ControlWidgetControlpublic boolean isEnabled()
enabled
Disabled menus have other colors than enabled ones, depending on customer settings.
public void setEnabled(boolean value)
enabledtrue
value - booleanpublic String getAriaDescription()
ariaDescription
The label/description provided for screenreaders
public void setAriaDescription(String value)
ariaDescription
value - Stringpublic com.sap.ui.core.client.js.JsArray<MenuItemBase> getItems()
public void insertItem(MenuItemBase item,
int index)
item - the item to insertindex - int the 0-based index the item should be inserted at.public void addItem(MenuItemBase item)
item - com.sap.ui.commons.client.MenuItemBase the item to addpublic void removeItem(int index)
index in the items-aggregation named.
index - int the position of the item to remove.public void removeAllItems()
public 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 void destroyItems()
public void 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 EventListenerpublic void 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
public 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 void close()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||