com.vaadin.client.ui.
Class VRadioButtonGroup
- java.lang.Object
-
- com.google.gwt.user.client.ui.UIObject
-
- com.google.gwt.user.client.ui.Widget
-
- com.google.gwt.user.client.ui.Composite
-
- com.vaadin.client.widgets.FocusableFlowPanelComposite
-
- com.vaadin.client.ui.VRadioButtonGroup
-
All Implemented Interfaces:
com.google.gwt.event.dom.client.ClickHandler, com.google.gwt.event.dom.client.HasAllFocusHandlers, com.google.gwt.event.dom.client.HasBlurHandlers, com.google.gwt.event.dom.client.HasFocusHandlers, com.google.gwt.event.logical.shared.HasAttachHandlers, com.google.gwt.event.shared.EventHandler, com.google.gwt.event.shared.HasHandlers, com.google.gwt.user.client.EventListener, com.google.gwt.user.client.ui.HasEnabled, com.google.gwt.user.client.ui.HasVisibility, com.google.gwt.user.client.ui.IsRenderable, com.google.gwt.user.client.ui.IsWidget, Focusable, Field
public class VRadioButtonGroup extends FocusableFlowPanelComposite implements Field, com.google.gwt.event.dom.client.ClickHandler, com.google.gwt.user.client.ui.HasEnabled
The client-side widget for the
RadioButtonGroup
component.Since:
8.0
Author:
Vaadin Ltd.
-
-
Field Summary
Fields Modifier and Type Field and Description static String
CLASSNAME
static String
CLASSNAME_OPTION
static String
CLASSNAME_OPTION_SELECTED
ApplicationConnection
client
For internal use only.
-
Constructor Summary
Constructors Constructor and Description VRadioButtonGroup()
-
Method Summary
All Methods Modifier and Type Method and Description Registration
addSelectionChangeHandler(Consumer<JsonObject> selectionChanged)
void
buildOptions(List<JsonObject> items)
void
focus()
Set focus to the selected radio button (or first radio button if there is no selection).
JsonObject
getItem(com.google.gwt.dom.client.Element element)
Returns the JsonObject used to populate the RadioButton widget that contains given Element.
boolean
isEnabled()
boolean
isHtmlContentAllowed()
boolean
isReadonly()
void
onClick(com.google.gwt.event.dom.client.ClickEvent event)
void
selectItemKey(String selectedItemKey)
void
setEnabled(boolean enabled)
void
setHtmlContentAllowed(boolean htmlContentAllowed)
void
setReadonly(boolean readonly)
void
setTabIndex(int tabIndex)
protected void
updateEnabledState()
protected void
updateItemEnabled(com.google.gwt.user.client.ui.RadioButton radioButton, boolean value)
Updates the enabled state of a radio button.
protected void
updateItemSelection(com.google.gwt.user.client.ui.RadioButton radioButton, boolean value)
Updates the selected state of a radio button.
-
Methods inherited from class com.vaadin.client.widgets.FocusableFlowPanelComposite
addBlurHandler, addFocusHandler, getWidget
-
Methods inherited from class com.google.gwt.user.client.ui.Composite
claimElement, initializeClaimedElement, initWidget, isAttached, onAttach, onBrowserEvent, onDetach, render, render, resolvePotentialElement, setWidget
-
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, isOrWasAttached, onLoad, onUnload, removeFromParent, setLayoutData, sinkEvents, unsinkEvents
-
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, onEnsureDebugId, removeStyleDependentName, removeStyleName, setElement, setElement, setHeight, setPixelSize, setSize, setStyleDependentName, setStyleName, setStyleName, setStyleName, setStyleName, setStylePrimaryName, setStylePrimaryName, setTitle, setVisible, setVisible, setWidth, sinkBitlessEvent, toString
-
-
-
-
Field Detail
-
CLASSNAME
public static final String CLASSNAME
See Also:
-
CLASSNAME_OPTION
public static final String CLASSNAME_OPTION
See Also:
-
CLASSNAME_OPTION_SELECTED
public static final String CLASSNAME_OPTION_SELECTED
See Also:
-
client
public ApplicationConnection client
For internal use only. May be removed or replaced in the future.
-
-
Method Detail
-
buildOptions
public void buildOptions(List<JsonObject> items)
-
getItem
public JsonObject getItem(com.google.gwt.dom.client.Element element)
Returns the JsonObject used to populate the RadioButton widget that contains given Element.
Parameters:
element
- the element to search forReturns:
the related JsonObject;
null
if not foundSince:
8.2
-
onClick
public void onClick(com.google.gwt.event.dom.client.ClickEvent event)
Specified by:
onClick
in interfacecom.google.gwt.event.dom.client.ClickHandler
-
setTabIndex
public void setTabIndex(int tabIndex)
-
updateEnabledState
protected void updateEnabledState()
-
isHtmlContentAllowed
public boolean isHtmlContentAllowed()
-
setHtmlContentAllowed
public void setHtmlContentAllowed(boolean htmlContentAllowed)
-
isEnabled
public boolean isEnabled()
Specified by:
isEnabled
in interfacecom.google.gwt.user.client.ui.HasEnabled
-
isReadonly
public boolean isReadonly()
-
setReadonly
public void setReadonly(boolean readonly)
-
setEnabled
public void setEnabled(boolean enabled)
Specified by:
setEnabled
in interfacecom.google.gwt.user.client.ui.HasEnabled
-
addSelectionChangeHandler
public Registration addSelectionChangeHandler(Consumer<JsonObject> selectionChanged)
-
selectItemKey
public void selectItemKey(String selectedItemKey)
-
focus
public void focus()
Set focus to the selected radio button (or first radio button if there is no selection).
Specified by:
Overrides:
focus
in classFocusableFlowPanelComposite
-
updateItemSelection
protected void updateItemSelection(com.google.gwt.user.client.ui.RadioButton radioButton, boolean value)
Updates the selected state of a radio button.
Parameters:
radioButton
- the radio button to updatevalue
-true
if selected;false
if not
-
updateItemEnabled
protected void updateItemEnabled(com.google.gwt.user.client.ui.RadioButton radioButton, boolean value)
Updates the enabled state of a radio button.
Parameters:
radioButton
- the radio button to updatevalue
-true
if enabled;false
if notSince:
8.3.3
-
-