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

java.lang.Object
  extended by com.google.gwt.user.client.ui.UIObject
      extended by com.google.gwt.user.client.ui.Widget
          extended by com.sap.ui.core.client.ControlWidget
              extended by com.sap.ui.table.client.web.ToolbarWidget
All Implemented Interfaces:
com.google.gwt.event.logical.shared.HasAttachHandlers, com.google.gwt.event.shared.HasHandlers, com.google.gwt.user.client.EventListener, com.google.gwt.user.client.ui.IsWidget

public class ToolbarWidget
extends com.sap.ui.core.client.ControlWidget

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: )

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
  ToolbarWidget()
          constructs the class ToolbarWidget
  ToolbarWidget(String id)
          constructs the class ToolbarWidget
protected ToolbarWidget(Toolbar control)
          constructs the class ToolbarWidget
 
Method Summary
 void addItem(ToolbarItem item)
          Appends some item to the items-aggregation.
 void attachSubItemSelectedEvent(com.sap.ui.core.client.event.EventListener listener)
          attach an EventListener This event will be fired when an item item is clicked.
 void destroyItems()
          Destroys all the items in the Items-aggregation.
 void detachSubItemSelectedEvent(com.sap.ui.core.client.event.EventListener listener)
          detach an EventListener This event will be fired when an item item is clicked.
 Toolbar getControl()
          returns the reference to the Phoenix Control
 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.
 void 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
 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 setIsSubtoolbar(boolean value)
          Setter for property isSubtoolbar
Default value is: false
 void setSelected(String value)
          Setter for property selected
 void setType(ToolbarType value)
          Setter for property type
Default value is: sap.ui.table.web.ToolbarType.Header
 void setVisible(boolean value)
          Setter for property visible
Default 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, onEnsureDebugId, removeStyleDependentName, removeStyleName, setElement, setElement, setHeight, setPixelSize, setSize, setStyleDependentName, setStyleName, setStyleName, setStyleName, setStyleName, setStylePrimaryName, setStylePrimaryName, setTitle, setVisible, setWidth, sinkBitlessEvent, toString, unsinkEvents
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

ToolbarWidget

public ToolbarWidget()
constructs the class ToolbarWidget


ToolbarWidget

public ToolbarWidget(String id)
constructs the class ToolbarWidget

Parameters:
id - id of the ToolbarWidget

ToolbarWidget

protected ToolbarWidget(Toolbar control)
constructs the class ToolbarWidget

Parameters:
control - reference to an existing Toolbar
Method Detail

getControl

public Toolbar getControl()
returns the reference to the Phoenix Control

Overrides:
getControl in class com.sap.ui.core.client.ControlWidget
Returns:
reference to the Phoenix Control

isVisible

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

Overrides:
isVisible in class com.google.gwt.user.client.ui.UIObject
Returns:
the value of property visible

setVisible

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

Overrides:
setVisible in class com.google.gwt.user.client.ui.UIObject
Parameters:
value - boolean

getSelected

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

Returns:
the value of property selected

setSelected

public void setSelected(String value)
Setter for property selected

Parameters:
value - String

isIsSubtoolbar

public 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 void setIsSubtoolbar(boolean value)
Setter for property isSubtoolbar
Default value is: false

Parameters:
value - boolean

getType

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

Returns:
the value of property type

setType

public void 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

getItems

public 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 void 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.

addItem

public void addItem(ToolbarItem item)
Appends some item to the items-aggregation.

Parameters:
item - com.sap.ui.table.client.web.ToolbarItem the item to add

removeItem

public void removeItem(int index)
Removes the item at position index in the items-aggregation named.

Parameters:
index - int the position of the item to remove.

removeAllItems

public void removeAllItems()
Removes all the items in the items-aggregation.


indexOfItem

public 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 void destroyItems()
Destroys all the items in the Items-aggregation.


attachSubItemSelectedEvent

public void 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

detachSubItemSelectedEvent

public void 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


Copyright © 2011 SAP. All Rights Reserved.