com.sap.ui.commons.client
Class MenuButton

java.lang.Object
  extended by com.google.gwt.core.client.JavaScriptObject
      extended by com.sap.ui.core.client.Element
          extended by com.sap.ui.core.client.Control
              extended by com.sap.ui.commons.client.Button
                  extended by com.sap.ui.commons.client.MenuButton
All Implemented Interfaces:
ToolbarItem

public class MenuButton
extends Button

The class MenuButton is the GWT wrapper for the Phoenix control: sap.ui.commons.MenuButton.

Button that opens a menu upon click

For further parameters see {@link com.sap.ui.commons.client.Button

Version:
0.18.0-SNAPSHOT
Author:
GENERATOR (JavaScript control: sap.ui.commons.MenuButton)

Constructor Summary
protected MenuButton()
          constructs the class MenuButton
hidden due to JavaScriptObject restriction
 
Method Summary
 MenuButton attachItemSelectedEvent(com.sap.ui.core.client.event.EventListener listener)
          attach an EventListener Fired when an item from the menu was selected.
static MenuButton create()
          creates a new instance of the class MenuButton
static MenuButton create(String idOrConfig)
          creates a new instance of the class MenuButton
static MenuButton create(String id, String config)
          creates a new instance of the class MenuButton
 MenuButton destroyMenu()
          Destroys the menu in the Menu-aggregation.
 MenuButton detachItemSelectedEvent(com.sap.ui.core.client.event.EventListener listener)
          detach an EventListener Fired when an item from the menu was selected.
 Menu getMenu()
          Getter for aggregation menu Menu to open when click button
 MenuButton setMenu(Menu menu)
          Setter for the aggregated menu.
 
Methods inherited from class com.sap.ui.commons.client.Button
attachPressEvent, detachPressEvent, focus, getHeight, getHelpId, getIcon, getText, getWidth, isEnabled, isIconFirst, isVisible, setEnabled, setHeight, setHelpId, setIcon, setIconFirst, setText, setVisible, setWidth
 
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

MenuButton

protected MenuButton()
constructs the class MenuButton
hidden due to JavaScriptObject restriction

Method Detail

create

public static MenuButton create()
creates a new instance of the class MenuButton


create

public static MenuButton create(String idOrConfig)
creates a new instance of the class MenuButton

Parameters:
id - id of the MenuButton or configuration JSON string

create

public static MenuButton create(String id,
                                String config)
creates a new instance of the class MenuButton

Parameters:
id - id of the MenuButton
config - configuration JSON string

getMenu

public final Menu getMenu()
Getter for aggregation menu Menu to open when click button

Returns:
com.sap.ui.commons.client.Menu

setMenu

public final MenuButton setMenu(Menu menu)
Setter for the aggregated menu.

Parameters:
omenu - {com.sap.ui.commons.client.Menu}
Returns:
this to allow method chaining

destroyMenu

public final MenuButton destroyMenu()
Destroys the menu in the Menu-aggregation.

Returns:
this to allow method chaining

attachItemSelectedEvent

public final MenuButton attachItemSelectedEvent(com.sap.ui.core.client.event.EventListener listener)
attach an EventListener Fired when an item from the menu was selected.
Event Parameters:
{sap.ui.core/string} itemId The id of the selected item
{sap.ui.commons/MenuItemBase} item The selected item

Parameters:
listener - reference to the EventListener
Returns:
this to allow method chaining

detachItemSelectedEvent

public final MenuButton detachItemSelectedEvent(com.sap.ui.core.client.event.EventListener listener)
detach an EventListener Fired when an item from the menu was selected.

Parameters:
listener - reference to the EventListener
Returns:
this to allow method chaining


Copyright © 2011 SAP. All Rights Reserved.