com.github.gwtbootstrap.client.ui
Class RadioButton
java.lang.Object
com.google.gwt.user.client.ui.UIObject
com.google.gwt.user.client.ui.Widget
com.google.gwt.user.client.ui.FocusWidget
com.google.gwt.user.client.ui.ButtonBase
com.github.gwtbootstrap.client.ui.CheckBox
com.github.gwtbootstrap.client.ui.RadioButton
- All Implemented Interfaces:
- HasId, HasStyle, IsResponsive, IsSearchQuery, IsEditor<LeafValueEditor<Boolean>>, HasAllDragAndDropHandlers, HasAllFocusHandlers, HasAllGestureHandlers, HasAllKeyHandlers, HasAllMouseHandlers, HasAllTouchHandlers, HasBlurHandlers, HasClickHandlers, HasDoubleClickHandlers, HasDragEndHandlers, HasDragEnterHandlers, HasDragHandlers, HasDragLeaveHandlers, HasDragOverHandlers, HasDragStartHandlers, HasDropHandlers, HasFocusHandlers, HasGestureChangeHandlers, HasGestureEndHandlers, HasGestureStartHandlers, HasKeyDownHandlers, HasKeyPressHandlers, HasKeyUpHandlers, HasMouseDownHandlers, HasMouseMoveHandlers, HasMouseOutHandlers, HasMouseOverHandlers, HasMouseUpHandlers, HasMouseWheelHandlers, HasTouchCancelHandlers, HasTouchEndHandlers, HasTouchMoveHandlers, HasTouchStartHandlers, HasAttachHandlers, HasValueChangeHandlers<Boolean>, HasHandlers, HasDirectionEstimator, HasSafeHtml, EventListener, TakesValue<Boolean>, Focusable, HasDirectionalSafeHtml, HasDirectionalText, HasEnabled, HasFocus, HasHTML, HasName, HasText, HasValue<Boolean>, HasVisibility, HasWordWrap, IsWidget, SourcesClickEvents, SourcesFocusEvents, SourcesKeyboardEvents, SourcesMouseEvents
public class RadioButton
- extends CheckBox
RadioButton widgets.
Re-design for Bootstrap.
- Since:
- 2.0.4.0
- Author:
- ohashi keisuke
Constructor Summary |
RadioButton(String name)
Creates a new radio associated with a particular group name. |
RadioButton(String name,
SafeHtml label)
Creates a new radio associated with a particular group, and initialized
with the given HTML label. |
RadioButton(String name,
SafeHtml label,
DirectionEstimator directionEstimator)
|
RadioButton(String name,
SafeHtml label,
HasDirection.Direction dir)
|
RadioButton(String name,
String label)
Creates a new radio associated with a particular group, and initialized
with the given HTML label. |
RadioButton(String name,
String label,
boolean asHTML)
Creates a new radio button associated with a particular group, and
initialized with the given label (optionally treated as HTML). |
RadioButton(String name,
String label,
DirectionEstimator directionEstimator)
|
RadioButton(String name,
String label,
HasDirection.Direction dir)
|
Methods inherited from class com.github.gwtbootstrap.client.ui.CheckBox |
addStyle, addValueChangeHandler, asEditor, asLabel, getDirectionEstimator, getFormValue, getHTML, getId, getName, getTabIndex, getText, getTextDirection, getValue, getWordWrap, isChecked, isEnabled, isSearchQuery, onEnsureDebugId, onLoad, onUnload, removeStyle, replaceInputElement, setAccessKey, setChecked, setDirectionEstimator, setDirectionEstimator, setEnabled, setFocus, setFormValue, setHideOn, setHTML, setHTML, setId, setInline, setSearchQuery, setShowOn, setStyle, setTabIndex, setText, setText, setValue, setValue, setWordWrap |
Methods inherited from class com.google.gwt.user.client.ui.FocusWidget |
addBlurHandler, addClickHandler, addClickListener, addDoubleClickHandler, addDragEndHandler, addDragEnterHandler, addDragHandler, addDragLeaveHandler, addDragOverHandler, addDragStartHandler, addDropHandler, addFocusHandler, addFocusListener, addGestureChangeHandler, addGestureEndHandler, addGestureStartHandler, addKeyboardListener, addKeyDownHandler, addKeyPressHandler, addKeyUpHandler, addMouseDownHandler, addMouseListener, addMouseMoveHandler, addMouseOutHandler, addMouseOverHandler, addMouseUpHandler, addMouseWheelHandler, addMouseWheelListener, addTouchCancelHandler, addTouchEndHandler, addTouchMoveHandler, addTouchStartHandler, getFocusImpl, onAttach, removeClickListener, removeFocusListener, removeKeyboardListener, removeMouseListener, removeMouseWheelListener |
Methods inherited from class com.google.gwt.user.client.ui.Widget |
addAttachHandler, addBitlessDomHandler, addDomHandler, addHandler, asWidget, asWidgetOrNull, createHandlerManager, delegateEvent, doAttachChildren, doDetachChildren, fireEvent, getHandlerCount, getLayoutData, getParent, isAttached, isOrWasAttached, onDetach, removeFromParent, setLayoutData |
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, removeStyleDependentName, removeStyleName, resolvePotentialElement, setElement, setElement, setHeight, setPixelSize, setSize, setStyleDependentName, setStyleName, setStyleName, setStyleName, setStyleName, setStylePrimaryName, setStylePrimaryName, setTitle, setVisible, setVisible, setWidth, sinkBitlessEvent, toString, unsinkEvents |
DEFAULT_DIRECTION_ESTIMATOR
public static final DirectionEstimator DEFAULT_DIRECTION_ESTIMATOR
RadioButton
@UiConstructor
public RadioButton(String name)
- Creates a new radio associated with a particular group name. All radio
buttons associated with the same group name belong to a
mutually-exclusive set.
Radio buttons are grouped by their name attribute, so changing their name
using the setName() method will also change their associated group.
- Parameters:
name
- the group name with which to associate the radio button
RadioButton
public RadioButton(String name,
SafeHtml label)
- Creates a new radio associated with a particular group, and initialized
with the given HTML label. All radio buttons associated with the same
group name belong to a mutually-exclusive set.
Radio buttons are grouped by their name attribute, so changing their name
using the setName() method will also change their associated group.
- Parameters:
name
- the group name with which to associate the radio buttonlabel
- this radio button's html label
RadioButton
public RadioButton(String name,
SafeHtml label,
HasDirection.Direction dir)
- Parameters:
name
- the group name with which to associate the radio buttonlabel
- this radio button's html labeldir
- the text's direction. Note that DEFAULT
means
direction should be inherited from the widget's parent
element.- See Also:
RadioButton(String, SafeHtml)
RadioButton
public RadioButton(String name,
SafeHtml label,
DirectionEstimator directionEstimator)
- Parameters:
name
- the group name with which to associate the radio buttonlabel
- this radio button's html labeldirectionEstimator
- A DirectionEstimator object used for automatic direction
adjustment. For convenience,
DEFAULT_DIRECTION_ESTIMATOR
can be used.- See Also:
RadioButton(String, SafeHtml)
RadioButton
public RadioButton(String name,
String label)
- Creates a new radio associated with a particular group, and initialized
with the given HTML label. All radio buttons associated with the same
group name belong to a mutually-exclusive set.
Radio buttons are grouped by their name attribute, so changing their name
using the setName() method will also change their associated group.
- Parameters:
name
- the group name with which to associate the radio buttonlabel
- this radio button's label
RadioButton
public RadioButton(String name,
String label,
HasDirection.Direction dir)
- Parameters:
name
- the group name with which to associate the radio buttonlabel
- this radio button's labeldir
- the text's direction. Note that DEFAULT
means
direction should be inherited from the widget's parent
element.- See Also:
RadioButton(String, SafeHtml)
RadioButton
public RadioButton(String name,
String label,
DirectionEstimator directionEstimator)
- Parameters:
name
- the group name with which to associate the radio buttonlabel
- this radio button's labeldirectionEstimator
- A DirectionEstimator object used for automatic direction
adjustment. For convenience,
DEFAULT_DIRECTION_ESTIMATOR
can be used.- See Also:
RadioButton(String, SafeHtml)
RadioButton
public RadioButton(String name,
String label,
boolean asHTML)
- Creates a new radio button associated with a particular group, and
initialized with the given label (optionally treated as HTML). All radio
buttons associated with the same group name belong to a
mutually-exclusive set.
Radio buttons are grouped by their name attribute, so changing their name
using the setName() method will also change their associated group.
- Parameters:
name
- name the group with which to associate the radio buttonlabel
- this radio button's labelasHTML
- true
to treat the specified label as HTML
onBrowserEvent
public void onBrowserEvent(Event event)
- Overridden to send ValueChangeEvents only when appropriate.
- Specified by:
onBrowserEvent
in interface EventListener
- Overrides:
onBrowserEvent
in class Widget
setName
public void setName(String name)
- Change the group name of this radio button.
Radio buttons are grouped by their name attribute, so changing their name
using the setName() method will also change their associated group.
If changing this group name results in a new radio group with multiple
radio buttons selected, this radio button will remain selected and the
other radio buttons will be unselected.
- Specified by:
setName
in interface HasName
- Overrides:
setName
in class CheckBox
- Parameters:
name
- name the group with which to associate the radio button
sinkEvents
public void sinkEvents(int eventBitsToAdd)
- Overrides:
sinkEvents
in class CheckBox
ensureDomEventHandlers
protected void ensureDomEventHandlers()
- No-op. CheckBox's click handler is no good for radio button, so don't use
it. Our event handling is all done in
onBrowserEvent(com.google.gwt.user.client.Event)
- Overrides:
ensureDomEventHandlers
in class CheckBox
Copyright © 2012 gwtbootstrap. All Rights Reserved.