com.sap.ui.commons.client
Class MenuBar

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.MenuBar

public class MenuBar
extends com.sap.ui.core.client.Control

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

Used to present actions in a structure. It represents a UI area which is the container for the menus and menu items. The menu bar contains the menu titles from where users navigate to the single items. The control supports for example long menu item texts, automated scrolling for menu items when the browser space is not large enough to display all items, defining images for single or all items in a menu, automated layouting of items with or w/o image, and active/non-active out-greyed items.

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

Constructor Summary
protected MenuBar()
          constructs the class MenuBar
hidden due to JavaScriptObject restriction
 
Method Summary
 MenuBar addItem(MenuItem item)
          Appends a item to the aggregation items.
static MenuBar create()
          creates a new instance of the class MenuBar
static MenuBar create(String idOrConfig)
          creates a new instance of the class MenuBar
static MenuBar create(String id, String config)
          creates a new instance of the class MenuBar
 MenuBar destroyItems()
          Destroys all the items in the Items-aggregation.
 MenuBarDesign getDesign()
          Getter for property design Design settings are theme-dependent.
 com.sap.ui.core.client.js.JsArray<MenuItem> getItems()
          Getter for aggregation items Aggregation of menu items.
 String getWidth()
          Getter for property width Sets the width of the control
 int indexOfItem(MenuItem item)
          Checks for the provided com.sap.ui.commons.client.MenuItem in the items-aggregation and returns its index if found or -1 otherwise.
 MenuBar insertItem(MenuItem item, int index)
          Inserts some item into the aggregation named items.
 boolean isEnabled()
          Getter for property enabled When the MenuBar is not enabled all menu items are displayed disabled.
 boolean isVisible()
          Getter for property visible Invisible controls are not rendered.
 com.sap.ui.core.client.js.JsArray<com.sap.ui.core.client.js.JsArray<MenuItem>> removeAllItems()
          Removes all the items in the items-aggregation.
 com.sap.ui.core.client.js.JsArray<MenuItem> removeItem(int index)
          Removes a item from the aggregation named items.
 MenuBar setDesign(MenuBarDesign value)
          Setter for property design
Default value is: Standard
 MenuBar setEnabled(boolean value)
          Setter for property enabled
Default value is: true
 MenuBar setVisible(boolean value)
          Setter for property visible
Default value is: true
 MenuBar setWidth(String value)
          Setter for property width
Default value is: 100%
 
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

MenuBar

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

Method Detail

create

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


create

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

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

create

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

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

isEnabled

public final boolean isEnabled()
Getter for property enabled When the MenuBar is not enabled all menu items are displayed disabled.

Returns:
the value of property enabled

setEnabled

public final MenuBar setEnabled(boolean value)
Setter for property enabled
Default value is: true

Parameters:
value - boolean
Returns:
this to allow method chaining

isVisible

public final boolean isVisible()
Getter for property visible Invisible controls are not rendered.

Returns:
the value of property visible

setVisible

public final MenuBar setVisible(boolean value)
Setter for property visible
Default value is: true

Parameters:
value - boolean
Returns:
this to allow method chaining

getWidth

public final String getWidth()
Getter for property width Sets the width of the control

Returns:
the value of property width

setWidth

public final MenuBar setWidth(String value)
Setter for property width
Default value is: 100%

Parameters:
value - String
Returns:
this to allow method chaining

getDesign

public final MenuBarDesign getDesign()
Getter for property design Design settings are theme-dependent.

Returns:
the value of property design

setDesign

public final MenuBar setDesign(MenuBarDesign value)
Setter for property design
Default value is: Standard

Parameters:
value - com.sap.ui.commons.client.MenuBarDesign
Returns:
this to allow method chaining

getItems

public final com.sap.ui.core.client.js.JsArray<MenuItem> getItems()
Getter for aggregation items Aggregation of menu items.

Returns:
com.sap.ui.commons.client.MenuItem[]

insertItem

public final MenuBar insertItem(MenuItem item,
                                int index)
Inserts some item into the aggregation named items.

Parameters:
item - the item to insert
index - int the 0-based index the item should be inserted at.
Returns:
this to allow method chaining

addItem

public final MenuBar addItem(MenuItem item)
Appends a item to the aggregation items.

Parameters:
item - com.sap.ui.commons.client.MenuItem the item to add
Returns:
this to allow method chaining

removeItem

public final com.sap.ui.core.client.js.JsArray<MenuItem> removeItem(int index)
Removes a item from the aggregation named items.

Parameters:
index - int the position of the item to remove.
Returns:
reference to this instance

removeAllItems

public final com.sap.ui.core.client.js.JsArray<com.sap.ui.core.client.js.JsArray<MenuItem>> removeAllItems()
Removes all the items in the items-aggregation.

Returns:
an array of the removed elements (might be empty)

indexOfItem

public final int indexOfItem(MenuItem item)
Checks for the provided com.sap.ui.commons.client.MenuItem in the items-aggregation and returns its index if found or -1 otherwise.

Parameters:
item - the item whose index is looked for.
Returns:
the index of the provided control in the aggregation.

destroyItems

public final MenuBar destroyItems()
Destroys all the items in the Items-aggregation.

Returns:
this to allow method chaining


Copyright © 2011 SAP. All Rights Reserved.