com.sap.ui.table.client.web
Class Toolbar

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.table.client.web.Toolbar

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

The class Toolbar is the GWT wrapper for the Phoenix control: sap.ui.table.web.Toolbar.

This Toolbar control was designed to be used as a header in a web.Table control. As a matter of fact, it can only used in this context as events bubble to the parent Table control.

Version:
0.18.0-SNAPSHOT
Author:
GENERATOR (JavaScript control: sap.ui.table.web.Toolbar)

Constructor Summary
protected Toolbar()
          constructs the class Toolbar
hidden due to JavaScriptObject restriction
 
Method Summary
 Toolbar addItem(ToolbarItem item)
          Appends a item to the aggregation items.
 Toolbar attachSubItemSelectedEvent(com.sap.ui.core.client.event.EventListener listener)
          attach an EventListener This event will be fired when an item item is clicked.
static Toolbar create()
          creates a new instance of the class Toolbar
static Toolbar create(String idOrConfig)
          creates a new instance of the class Toolbar
static Toolbar create(String id, String config)
          creates a new instance of the class Toolbar
 Toolbar destroyItems()
          Destroys all the items in the Items-aggregation.
 Toolbar detachSubItemSelectedEvent(com.sap.ui.core.client.event.EventListener listener)
          detach an EventListener This event will be fired when an item item is clicked.
 com.sap.ui.core.client.js.JsArray<ToolbarItem> getItems()
          Getter for aggregation items Items in Toolbar
 String getSelected()
          Getter for property selected Holds the id of the current selected toolbaritem
 ToolbarType getType()
          Getter for property type Type of the Toolbar: header / footer (affects design)
 int indexOfItem(ToolbarItem item)
          Checks for the provided com.sap.ui.table.client.web.ToolbarItem in the items-aggregation and returns its index if found or -1 otherwise.
 Toolbar insertItem(ToolbarItem item, int index)
          Inserts some item into the aggregation named items.
 boolean isIsSubtoolbar()
          Getter for property isSubtoolbar Indicates if Toolbar is a Subtoolbar.
 boolean isVisible()
          Getter for property visible Show / Hide the control
 com.sap.ui.core.client.js.JsArray<com.sap.ui.core.client.js.JsArray<ToolbarItem>> removeAllItems()
          Removes all the items in the items-aggregation.
 com.sap.ui.core.client.js.JsArray<ToolbarItem> removeItem(int index)
          Removes a item from the aggregation named items.
 Toolbar setIsSubtoolbar(boolean value)
          Setter for property isSubtoolbar
Default value is: false
 Toolbar setSelected(String value)
          Setter for property selected
 Toolbar setType(ToolbarType value)
          Setter for property type
Default value is: sap.ui.table.web.ToolbarType.Header
 Toolbar setVisible(boolean value)
          Setter for property visible
Default 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

Toolbar

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

Method Detail

create

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


create

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

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

create

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

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

isVisible

public final boolean isVisible()
Getter for property visible Show / Hide the control

Returns:
the value of property visible

setVisible

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

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

getSelected

public final String getSelected()
Getter for property selected Holds the id of the current selected toolbaritem

Returns:
the value of property selected

setSelected

public final Toolbar setSelected(String value)
Setter for property selected

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

isIsSubtoolbar

public final boolean isIsSubtoolbar()
Getter for property isSubtoolbar Indicates if Toolbar is a Subtoolbar. Subtoolbars can not have (sub)subtoolbars. This value is set automatically when a Toolbar is added to an other Toolbar control as Subtoolbar.

Returns:
the value of property isSubtoolbar

setIsSubtoolbar

public final Toolbar setIsSubtoolbar(boolean value)
Setter for property isSubtoolbar
Default value is: false

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

getType

public final ToolbarType getType()
Getter for property type Type of the Toolbar: header / footer (affects design)

Returns:
the value of property type

setType

public final Toolbar setType(ToolbarType value)
Setter for property type
Default value is: sap.ui.table.web.ToolbarType.Header

Parameters:
value - com.sap.ui.table.client.web.ToolbarType
Returns:
this to allow method chaining

getItems

public final com.sap.ui.core.client.js.JsArray<ToolbarItem> getItems()
Getter for aggregation items Items in Toolbar

Returns:
com.sap.ui.table.client.web.ToolbarItem[]

insertItem

public final Toolbar insertItem(ToolbarItem 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 Toolbar addItem(ToolbarItem item)
Appends a item to the aggregation items.

Parameters:
item - com.sap.ui.table.client.web.ToolbarItem the item to add
Returns:
this to allow method chaining

removeItem

public final com.sap.ui.core.client.js.JsArray<ToolbarItem> 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<ToolbarItem>> removeAllItems()
Removes all the items in the items-aggregation.

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

indexOfItem

public final int indexOfItem(ToolbarItem item)
Checks for the provided com.sap.ui.table.client.web.ToolbarItem 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 Toolbar destroyItems()
Destroys all the items in the Items-aggregation.

Returns:
this to allow method chaining

attachSubItemSelectedEvent

public final Toolbar attachSubItemSelectedEvent(com.sap.ui.core.client.event.EventListener listener)
attach an EventListener This event will be fired when an item item is clicked.
Event Parameters:
{sap.ui.core/string} key Gives the 'key'-property of the sub-item that has been selected.
{sap.ui.core/string} itemId Gives the id of the sub-item that has been selected.

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

detachSubItemSelectedEvent

public final Toolbar detachSubItemSelectedEvent(com.sap.ui.core.client.event.EventListener listener)
detach an EventListener This event will be fired when an item item is clicked.

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


Copyright © 2011 SAP. All Rights Reserved.