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(IsWidget child) |
void |
add(Widget widget)
Adds a new
Button to the group. |
boolean |
remove(Widget w) |
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, setPullRight, setShowOn, setStyle
add, adjustIndex, checkIndexBoundsForAccess, checkIndexBoundsForInsertion, getChildren, getWidget, getWidgetCount, getWidgetIndex, getWidgetIndex, insert, insert, iterator, remove
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
getWidgetIndex
getWidget, getWidgetCount, getWidgetIndex, remove
public ButtonGroup()
public ButtonGroup(Button... buttons)
buttons
- the widgets to be added to the ButtonGrouppublic void add(IsWidget child)
add
in interface HasWidgets.ForIsWidget
add
in interface InsertPanel.ForIsWidget
add
in class Panel
public 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 boolean remove(Widget w)
remove
in interface HasWidgets
remove
in class ComplexPanel
public void setToggle(ToggleType type)
type
- public void setToggle(String toggle)
toggle
- public void setVertical(boolean vertical)
vertical
- true:Set , false:UnsetCopyright © 2012-2014 gwtbootstrap. All Rights Reserved.