com.github.gwtbootstrap.client.ui
Class DropdownButton

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.github.gwtbootstrap.client.ui.base.ComplexWidget
                      extended by com.github.gwtbootstrap.client.ui.base.DropdownBase
                          extended by com.github.gwtbootstrap.client.ui.DropdownButton
All Implemented Interfaces:
HasStyle, IsResponsive, HasChangeHandlers, HasClickHandlers, HasAttachHandlers, HasHandlers, EventListener, HasText, HasVisibility, HasWidgets, HasWidgets.ForIsWidget, IndexedPanel, IndexedPanel.ForIsWidget, IsWidget, Iterable<Widget>

public class DropdownButton
extends DropdownBase

Button with a dropdown menu.

UiBinder Usage:

 <b:DropdownButton text="I am the Caption">
     <b:NavHeader>Header</b:NavHeader>
     <b:NavLink>Link 1</b:NavLink>
     <b:NavLink>Link 2</b:NavLink>
 </b:DropdownButton>
 
 

Since:
2.0.4.0
Author:
Dominik Mayer
See Also:
Bootstrap documentation, Dropdown, 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.HasWidgets
HasWidgets.ForIsWidget
 
Nested classes/interfaces inherited from interface com.google.gwt.user.client.ui.IndexedPanel
IndexedPanel.ForIsWidget
 
Field Summary
 
Fields inherited from class com.google.gwt.user.client.ui.UIObject
DEBUG_ID_PREFIX
 
Constructor Summary
DropdownButton()
          Creates a DropdownButton without a caption.
DropdownButton(String caption)
          Creates a DropdownButton with the given caption.
 
Method Summary
 HandlerRegistration addClickHandler(ClickHandler handler)
           
protected  IconAnchor createTrigger()
          Implement this method to create the trigger appropriate for your widget.
 void setIcon(IconType type)
          Sets the button's icon.
 void setSize(ButtonSize size)
          Sets the button's size.
 void setType(ButtonType type)
          Sets the button's type.
 
Methods inherited from class com.github.gwtbootstrap.client.ui.base.DropdownBase
add, addChangeHandler, addWidget, clear, getLastSelectedNavLink, getText, onLoad, setDropup, setRightDropdown, setText
 
Methods inherited from class com.github.gwtbootstrap.client.ui.base.ComplexWidget
addStyle, insert, removeStyle, setHideOn, setShowOn, setStyle
 
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, 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.event.shared.HasHandlers
fireEvent
 
Methods inherited from interface com.google.gwt.user.client.ui.HasWidgets
iterator, remove
 

Constructor Detail

DropdownButton

public DropdownButton()
Creates a DropdownButton without a caption.


DropdownButton

public DropdownButton(String caption)
Creates a DropdownButton with the given caption.

Parameters:
caption - the button's caption
Method Detail

createTrigger

protected IconAnchor createTrigger()
Implement this method to create the trigger appropriate for your widget. It has to be an IconAnchor or a subtype.

Specified by:
createTrigger in class DropdownBase
Returns:
the created trigger

setSize

public void setSize(ButtonSize size)
Sets the button's size.

Parameters:
size - the button's size

setType

public void setType(ButtonType type)
Sets the button's type.

Parameters:
type - the button's type

setIcon

public void setIcon(IconType type)
Sets the button's icon.

Parameters:
type - the icon's type

addClickHandler

public HandlerRegistration addClickHandler(ClickHandler handler)
Specified by:
addClickHandler in interface HasClickHandlers
Overrides:
addClickHandler in class DropdownBase


Copyright © 2012 gwtbootstrap. All Rights Reserved.