public class ButtonGroup extends DivWidget
<b:ButtonGroup>
<b:Button>First Button</b:Button>
<b:Button>Second Button</b:Button>
<b:Button>Third Button</b:Button>
</b:ButtonGroup>
You can also use the buttons as checkboxes or radio buttons:
<b:ButtonGroup toggle="radio">
<b:Button text="1" />
<b:Button text="2" />
<b:Button text="3" />
<b:Button text="4" />
</b:ButtonGroup>
Button
,
ButtonToolbar
UIObject.DebugIdImpl, UIObject.DebugIdImplEnabled
InsertPanel.ForIsWidget
HasWidgets.ForIsWidget
DEBUG_ID_PREFIX
Constructor and Description |
---|
ButtonGroup()
Creates an empty ButtonGroup.
|
ButtonGroup(Button... buttons)
Creates a ButtonGroup containing the provided Buttons.
|
Modifier and Type | Method and Description |
---|---|
void |
add(Widget widget)
Adds a new
Button to the group. |
void |
setToggle(String toggle)
Set/unset the data-toggle behavior.
|
void |
setToggle(ToggleType type)
Set/unset the data-toggle behavior.
|
void |
setVertical(boolean vertical)
Set vertical style
|
addStyle, getId, pullRight, removeStyle, setHideOn, setId, setShowOn, setStyle
add, adjustIndex, checkIndexBoundsForAccess, checkIndexBoundsForInsertion, getChildren, getWidget, getWidgetCount, getWidgetIndex, getWidgetIndex, insert, insert, iterator, remove, remove
add, adopt, adopt, disown, doAttachChildren, doDetachChildren, orphan, remove
addAttachHandler, addBitlessDomHandler, addDomHandler, addHandler, asWidget, asWidgetOrNull, createHandlerManager, delegateEvent, fireEvent, getHandlerCount, getLayoutData, getParent, isAttached, isOrWasAttached, onAttach, onBrowserEvent, onDetach, onLoad, onUnload, removeFromParent, setLayoutData, sinkEvents
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
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
add
getWidgetIndex
getWidget, getWidgetCount, getWidgetIndex, remove
public ButtonGroup()
public ButtonGroup(Button... buttons)
buttons
- the widgets to be added to the ButtonGrouppublic void add(Widget widget)
Button
to the group.add
in interface HasWidgets
add
in interface InsertPanel
add
in class FlowPanel
widget
- the Button to be added.public void setToggle(ToggleType type)
type
- public void setToggle(String toggle)
toggle
- public void setVertical(boolean vertical)
vertical
- true:Set , false:UnsetCopyright © 2012 gwtbootstrap. All Rights Reserved.