public class RadioButton extends CheckboxBase<RadioStyle>
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.
CheckboxBase.setDirectionEstimator(boolean)
or passing a DirectionEstimator parameter
to the constructor, and is off by default.
Constructor and Description |
---|
RadioButton(String name)
Creates a new radio associated with a particular group name.
|
RadioButton(String name,
com.google.gwt.safehtml.shared.SafeHtml label)
Creates a new radio associated with a particular group, and initialized
with the given HTML label.
|
RadioButton(String name,
com.google.gwt.safehtml.shared.SafeHtml label,
com.google.gwt.i18n.shared.DirectionEstimator directionEstimator) |
RadioButton(String name,
com.google.gwt.safehtml.shared.SafeHtml label,
com.google.gwt.i18n.client.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,
com.google.gwt.i18n.shared.DirectionEstimator directionEstimator) |
RadioButton(String name,
String label,
com.google.gwt.i18n.client.HasDirection.Direction dir) |
Modifier and Type | Method and Description |
---|---|
protected void |
ensureDomEventHandlers()
No-op.
|
void |
onBrowserEvent(com.google.gwt.user.client.Event event)
Overridden to send ValueChangeEvents only when appropriate.
|
void |
setName(String name)
Change the group name of this radio button.
|
addValueChangeHandler, asEditor, getContainer, getDirectionEstimator, getFormValue, getHTML, getInput, getLabel, getName, getRipple, getTabIndex, getText, getTextDirection, getToggle, getValue, getWordWrap, isChecked, isEnabled, isUpgraded, onEnsureDebugId, onLoad, onUnload, replaceInputElement, replaceInputElement, setAccessKey, setChecked, setDirectionEstimator, setDirectionEstimator, setEnabled, setFocus, setFormValue, setHTML, setHTML, setRipple, setTabIndex, setText, setText, setValue, setValue, setWordWrap, upgrade
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, onDetach, removeFromParent, setLayoutData, sinkEvents, 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
@UiConstructor public RadioButton(String name)
name
- the group name with which to associate the radio buttonpublic RadioButton(String name, com.google.gwt.safehtml.shared.SafeHtml label)
name
- the group name with which to associate the radio buttonlabel
- this radio button's html labelpublic RadioButton(String name, com.google.gwt.safehtml.shared.SafeHtml label, com.google.gwt.i18n.client.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 RadioButton(String name, com.google.gwt.safehtml.shared.SafeHtml label, com.google.gwt.i18n.shared.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.RadioButton(String, SafeHtml)
public RadioButton(String name, String label)
name
- the group name with which to associate the radio buttonlabel
- this radio button's labelpublic RadioButton(String name, String label, com.google.gwt.i18n.client.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 RadioButton(String name, String label, com.google.gwt.i18n.shared.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.RadioButton(String, SafeHtml)
public RadioButton(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 HTMLpublic void onBrowserEvent(com.google.gwt.user.client.Event event)
onBrowserEvent
in interface com.google.gwt.user.client.EventListener
onBrowserEvent
in class com.google.gwt.user.client.ui.Widget
public void setName(String name)
setName
in interface com.google.gwt.user.client.ui.HasName
setName
in class CheckboxBase<RadioStyle>
name
- name the group with which to associate the radio buttonprotected void ensureDomEventHandlers()
onBrowserEvent(com.google.gwt.user.client.Event)
ensureDomEventHandlers
in class CheckboxBase<RadioStyle>
Copyright © 2016 com.github.ilyes4j. All rights reserved.