com.extjs.gxt.ui.client.widget.toolbar
Class ToolBar

java.lang.Object
  extended by com.google.gwt.user.client.ui.UIObject
      extended by com.google.gwt.user.client.ui.Widget
          extended by com.extjs.gxt.ui.client.widget.Component
              extended by com.extjs.gxt.ui.client.widget.BoxComponent
                  extended by com.extjs.gxt.ui.client.widget.Container<ToolItem>
                      extended by com.extjs.gxt.ui.client.widget.toolbar.ToolBar
All Implemented Interfaces:
Observable, com.google.gwt.user.client.EventListener

public class ToolBar
extends Container<ToolItem>

A standard tool bar.

Events:
BeforeAdd : ToolBarEvent(toolBar, item, index)
Fires before a item is added or inserted. Listeners can set the doit field to false to cancel the action.
BeforeRemove : ToolBarEvent(toolBar, item)
Fires before a item is removed. Listeners can set the doit field to false to cancel the action.
Add : ToolBarEvent(toolBar, item, index)
Fires after a item has been added or inserted.
Remove : ToolBarEvent(toolBar, item)
Fires after a item has been removed.
CSS:
x-toolbar (the tool bar)

See Also:
ToolItem, ToggleToolItem, SplitToolItem

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
ToolBar()
          Creates a new tool bar.
 
Method Summary
 boolean add(ToolItem item)
          Adds a item to the tool bar.
 Style.HorizontalAlignment getButtonAlign()
          Returns the button alignment.
 boolean insert(ToolItem item, int index)
          Inserts a item into the tool bar.
 boolean remove(ToolItem item)
          Removes a component from the tool bar.
 void setButtonAlign(Style.HorizontalAlignment buttonAlign)
          Specifies the cell's horizontal alignment (defaults to LEFT).
 
Methods inherited from class com.extjs.gxt.ui.client.widget.Container
findItem, getItem, getItemByItemId, getItemCount, getItems, getWidget, indexOf, iterator, removeAll, scrollIntoView
 
Methods inherited from class com.extjs.gxt.ui.client.widget.BoxComponent
getBounds, getHeight, getHeight, getPosition, getShadow, getSize, getWidth, getWidth, isAutoHeight, isAutoWidth, isDeferHeight, isShim, setAutoHeight, setAutoWidth, setBounds, setBounds, setDeferHeight, setHeight, setHeight, setPagePosition, setPagePosition, setPixelSize, setPosition, setShadow, setShim, setSize, setSize, setWidth, setWidth
 
Methods inherited from class com.extjs.gxt.ui.client.widget.Component
addListener, addStyleName, addWidgetListener, disable, disableEvents, disableTextSelection, el, enable, enableEvents, fireEvent, fireEvent, fireEvent, fly, focus, getBaseStyle, getBorders, getData, getData, getElement, getId, getItemId, getModel, getState, getToolTip, hide, hideToolTip, isEnabled, isRendered, isVisible, onBrowserEvent, onComponentEvent, recalculate, removeAllListeners, removeFromParent, removeListener, removeStyleName, removeWidgetListener, render, render, saveState, setBorders, setData, setData, setElement, setEnabled, setEnableState, setId, setIntStyleAttribute, setItemId, setStyleAttribute, setStyleName, setTitle, setToolTip, setToolTip, setVisible, show, toString
 
Methods inherited from class com.google.gwt.user.client.ui.Widget
getParent, isAttached
 
Methods inherited from class com.google.gwt.user.client.ui.UIObject
addStyleDependentName, ensureDebugId, ensureDebugId, getAbsoluteLeft, getAbsoluteTop, getOffsetHeight, getOffsetWidth, getStyleName, getStylePrimaryName, getTitle, isVisible, removeStyleDependentName, setStylePrimaryName, setVisible, sinkEvents, unsinkEvents
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

ToolBar

public ToolBar()
Creates a new tool bar.

Method Detail

add

public boolean add(ToolItem item)
Adds a item to the tool bar.

Parameters:
item - the item to add

getButtonAlign

public Style.HorizontalAlignment getButtonAlign()
Returns the button alignment.

Returns:
the button alignment

insert

public boolean insert(ToolItem item,
                      int index)
Inserts a item into the tool bar.

Parameters:
item - the item to add
index - the insert location

remove

public boolean remove(ToolItem item)
Removes a component from the tool bar.

Parameters:
item - the item to be removed
Returns:
true if the item was removed

setButtonAlign

public void setButtonAlign(Style.HorizontalAlignment buttonAlign)
Specifies the cell's horizontal alignment (defaults to LEFT).

Parameters:
buttonAlign - the button alignment