com.sap.ui.commons.client
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.commons.client.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.commons.Toolbar.

A single, horizontal row of immediate, always visible items. In many cases, a toolbar item is a button with an icon. All controls having interface sap.ui.commons.ToolbarItem can be used as item.

Version:
0.18.0-SNAPSHOT
Author:
GENERATOR (JavaScript control: SAP AG)

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 destroyItems()
          Destroys all the items in the Items-aggregation.
 Toolbar getControl()
          returns the reference to the Phoenix Control
 ToolbarDesign getDesign()
          Getter for property design Design settings are theme-dependent.
 com.sap.ui.core.client.js.JsArray<ToolbarItem> getItems()
          Getter for aggregation items Aggregating the toolbar items.
 String getWidth()
          Getter for property width When there is not enough space for the toolbar to display all items, the rightmost items are overflowing into a drop-down menu.
 int indexOfItem(ToolbarItem item)
          Checks for the provided com.sap.ui.commons.client.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 isStandalone()
          Getter for property standalone Alternatively, toolbars can be nested in controls from which they inherit the design.
 boolean isVisible()
          Getter for property visible Invisible controls are not rendered.
 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 setDesign(ToolbarDesign value)
          Setter for property design
Default value is: Flat
 void setStandalone(boolean value)
          Setter for property standalone
Default value is: true
 void setVisible(boolean value)
          Setter for property visible
Default value is: true
 void setWidth(String value)
          Setter for property width
Default value is: auto
 
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, 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 Invisible controls are not rendered.

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

getWidth

public String getWidth()
Getter for property width When there is not enough space for the toolbar to display all items, the rightmost items are overflowing into a drop-down menu.

Returns:
the value of property width

setWidth

public void setWidth(String value)
Setter for property width
Default value is: auto

Overrides:
setWidth in class com.google.gwt.user.client.ui.UIObject
Parameters:
value - String

getDesign

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

Returns:
the value of property design

setDesign

public void setDesign(ToolbarDesign value)
Setter for property design
Default value is: Flat

Parameters:
value - com.sap.ui.commons.client.ToolbarDesign

isStandalone

public boolean isStandalone()
Getter for property standalone Alternatively, toolbars can be nested in controls from which they inherit the design.

Returns:
the value of property standalone

setStandalone

public void setStandalone(boolean value)
Setter for property standalone
Default value is: true

Parameters:
value - boolean

getItems

public com.sap.ui.core.client.js.JsArray<ToolbarItem> getItems()
Getter for aggregation items Aggregating the toolbar items.

Returns:
com.sap.ui.commons.client.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.commons.client.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.commons.client.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.



Copyright © 2011 SAP. All Rights Reserved.