public class Radio extends CheckBox
ClickEvents
when the radio
button is clicked, and ValueChangeEvents
when the
button becomes checked. Note, however, that browser limitations prevent
ValueChangeEvents from being sent when the radio button is cleared as a side
effect of another in the group being clicked.
CheckBox.setDirectionEstimator(boolean)
or
passing a DirectionEstimator parameter to the constructor, and is off by
default.
UIObject.DebugIdImpl, UIObject.DebugIdImplEnabled
DEBUG_ID_PREFIX
Modifier | Constructor and Description |
---|---|
protected |
Radio(Element elem,
InputElement inputElement) |
|
Radio(String name)
Creates a new radio associated with a particular group name.
|
|
Radio(String name,
SafeHtml label)
Creates a new radio associated with a particular group, and initialized
with the given HTML label.
|
|
Radio(String name,
SafeHtml label,
DirectionEstimator directionEstimator) |
|
Radio(String name,
SafeHtml label,
HasDirection.Direction dir) |
|
Radio(String name,
String label)
Creates a new radio associated with a particular group, and initialized
with the given HTML label.
|
|
Radio(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).
|
|
Radio(String name,
String label,
DirectionEstimator directionEstimator) |
|
Radio(String name,
String label,
HasDirection.Direction dir) |
Modifier and Type | Method and Description |
---|---|
protected void |
ensureDomEventHandlers() |
void |
setName(String name)
Change the group name of this radio button.
|
void |
sinkEvents(int eventBitsToAdd) |
addChangeHandler, addValueChangeHandler, asEditor, getDirectionEstimator, getFormValue, getHTML, getName, getTabIndex, getText, getTextDirection, getValue, getWordWrap, isEnabled, onEnsureDebugId, onLoad, onUnload, setAccessKey, setDirectionEstimator, setDirectionEstimator, setEnabled, setFocus, setFormValue, setHTML, setHTML, setTabIndex, setText, setText, setValue, setValue, setWordWrap
getId, getPull, setHiddenOn, setId, setPull, setVisibleOn
setHTML
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
addAttachHandler, addBitlessDomHandler, addDomHandler, addHandler, asWidget, asWidgetOrNull, createHandlerManager, delegateEvent, doAttachChildren, doDetachChildren, fireEvent, getHandlerCount, getLayoutData, getParent, isAttached, isOrWasAttached, onBrowserEvent, onDetach, removeFromParent, setLayoutData, unsinkEvents
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
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
fireEvent
setHTML
public Radio(String name, SafeHtml label)
name
- the group name with which to associate the radio buttonlabel
- this radio button's html labelpublic Radio(String name, SafeHtml label, HasDirection.Direction dir)
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.#RadioButton(String, SafeHtml)
public Radio(String name, SafeHtml label, DirectionEstimator directionEstimator)
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.#RadioButton(String, SafeHtml)
public Radio(String name, String label)
name
- the group name with which to associate the radio buttonlabel
- this radio button's labelpublic Radio(String name, String label, HasDirection.Direction dir)
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.#RadioButton(String, SafeHtml)
public Radio(String name, String label, DirectionEstimator directionEstimator)
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.#RadioButton(String, SafeHtml)
public Radio(String name, String label, boolean asHTML)
name
- name the group with which to associate the radio buttonlabel
- this radio button's labelasHTML
- true
to treat the specified label as HTML@UiConstructor public Radio(String name)
name
- the group name with which to associate the radio buttonprotected Radio(Element elem, InputElement inputElement)
public void setName(String name)
protected void ensureDomEventHandlers()
ensureDomEventHandlers
in class CheckBox
public void sinkEvents(int eventBitsToAdd)
sinkEvents
in class CheckBox
Copyright © 2017. All rights reserved.