com.github.gwtbootstrap.client.ui
Class ButtonToolbar

java.lang.Object
  extended by com.google.gwt.user.client.ui.UIObject
      extended by com.google.gwt.user.client.ui.Widget
          extended by com.google.gwt.user.client.ui.Panel
              extended by com.google.gwt.user.client.ui.ComplexPanel
                  extended by com.google.gwt.user.client.ui.FlowPanel
                      extended by com.github.gwtbootstrap.client.ui.base.DivWidget
                          extended by com.github.gwtbootstrap.client.ui.ButtonToolbar
All Implemented Interfaces:
HasStyle, IsResponsive, HasAttachHandlers, HasHandlers, EventListener, HasVisibility, HasWidgets, HasWidgets.ForIsWidget, IndexedPanel, IndexedPanel.ForIsWidget, InsertPanel, InsertPanel.ForIsWidget, IsWidget, Iterable<Widget>

public class ButtonToolbar
extends DivWidget

Toolbar that places different Buttons in a horizontal line.

UiBinder Usage:

 <b:ButtonToolbar>
     <b:ButtonGroup>
         <b:Button>1</b:Button>
         <b:Button>2</b:Button>
         <b:Button>3</b:Button>
     </b:ButtonGroup>
     <b:Button>4</b:Button>
     <b:Button>5</b:Button>
     <b:DropdownButton text="6">
         <b:NavLink>Some NavLink</b:NavLink>
         <b:NavLink>Another NavLink</b:NavLink>
     </b:DropdownButton>
     <b:SplitDropdownButton text="7">
         <b:NavLink>Some NavLink</b:NavLink>
         <b:NavLink>Another NavLink</b:NavLink>
     </b:SplitDropdownButton>
 </b:ButtonToolbar>
 
 

Since:
2.0.4.0
Author:
Carlos Alexandro Becker, Dominik Mayer
See Also:
Bootstrap documentation, Button, ButtonGroup, DropdownButton, SplitDropdownButton

Nested Class Summary
 
Nested classes/interfaces inherited from class com.google.gwt.user.client.ui.UIObject
UIObject.DebugIdImpl, UIObject.DebugIdImplEnabled
 
Nested classes/interfaces inherited from interface com.google.gwt.user.client.ui.InsertPanel
InsertPanel.ForIsWidget
 
Nested classes/interfaces inherited from interface com.google.gwt.user.client.ui.HasWidgets
HasWidgets.ForIsWidget
 
Field Summary
 
Fields inherited from class com.google.gwt.user.client.ui.UIObject
DEBUG_ID_PREFIX
 
Constructor Summary
ButtonToolbar()
          Creates an empty toolbar.
 
Method Summary
 void add(Widget widget)
          Adds a new widget to the toolbar.
protected  boolean canBeAdded(Widget widget)
          This method decides whether a widget can be added to the toolbar or not.
 
Methods inherited from class com.github.gwtbootstrap.client.ui.base.DivWidget
addStyle, pullRight, removeStyle, setHideOn, setShowOn, setStyle
 
Methods inherited from class com.google.gwt.user.client.ui.FlowPanel
clear, insert, insert
 
Methods inherited from class com.google.gwt.user.client.ui.ComplexPanel
add, adjustIndex, checkIndexBoundsForAccess, checkIndexBoundsForInsertion, getChildren, getWidget, getWidgetCount, getWidgetIndex, getWidgetIndex, insert, insert, iterator, remove, remove
 
Methods inherited from class com.google.gwt.user.client.ui.Panel
add, adopt, adopt, disown, doAttachChildren, doDetachChildren, orphan, remove
 
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, isVisible, onEnsureDebugId, removeStyleDependentName, removeStyleName, resolvePotentialElement, setElement, setElement, setHeight, setPixelSize, setSize, setStyleDependentName, setStyleName, setStyleName, setStyleName, setStyleName, setStylePrimaryName, setStylePrimaryName, setTitle, setVisible, setVisible, setWidth, sinkBitlessEvent, toString, unsinkEvents
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface com.google.gwt.user.client.ui.InsertPanel.ForIsWidget
add
 
Methods inherited from interface com.google.gwt.user.client.ui.IndexedPanel.ForIsWidget
getWidgetIndex
 
Methods inherited from interface com.google.gwt.user.client.ui.IndexedPanel
getWidget, getWidgetCount, getWidgetIndex, remove
 

Constructor Detail

ButtonToolbar

public ButtonToolbar()
Creates an empty toolbar.

Method Detail

add

public void add(Widget widget)
Adds a new widget to the toolbar.

Specified by:
add in interface HasWidgets
Specified by:
add in interface InsertPanel
Overrides:
add in class FlowPanel
Parameters:
widget - the widget to be added

canBeAdded

protected boolean canBeAdded(Widget widget)
This method decides whether a widget can be added to the toolbar or not.

Override it to allow other than the default widgets.

Parameters:
widget - the widget that should be added to the toolbar.
Returns:
true if the widget can be added to the toolbar.


Copyright © 2012 gwtbootstrap. All Rights Reserved.