org.gwtbootstrap3.client.ui
Class RadioButton

java.lang.Object
  extended by com.google.gwt.user.client.ui.UIObject
      extended by com.google.gwt.user.client.ui.Widget
          extended by com.google.gwt.user.client.ui.FocusWidget
              extended by com.google.gwt.user.client.ui.ButtonBase
                  extended by org.gwtbootstrap3.client.ui.gwt.ButtonBase
                      extended by org.gwtbootstrap3.client.ui.CheckBox
                          extended by org.gwtbootstrap3.client.ui.Radio
                              extended by org.gwtbootstrap3.client.ui.RadioButton
All Implemented Interfaces:
IsEditor<LeafValueEditor<Boolean>>, HasAllDragAndDropHandlers, HasAllFocusHandlers, HasAllGestureHandlers, HasAllKeyHandlers, HasAllMouseHandlers, HasAllTouchHandlers, HasBlurHandlers, HasChangeHandlers, 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, HasActive, HasFormValue, HasIcon, HasIconPosition, HasId, HasPull, HasResponsiveness, HasSize<ButtonSize>, HasType<ButtonType>

public class RadioButton
extends Radio
implements HasActive, HasType<ButtonType>, HasSize<ButtonSize>, HasIcon, HasIconPosition

Button representing a radio button used within a ButtonGroup that has toggle set to Toogle.BUTTONS.

If you are looking for a classic radio button see RadioButton.

Author:
Sven Jacobs

Nested Class Summary
 
Nested classes/interfaces inherited from class com.google.gwt.user.client.ui.UIObject
UIObject.DebugIdImpl, UIObject.DebugIdImplEnabled
 
Field Summary
 
Fields inherited from class org.gwtbootstrap3.client.ui.CheckBox
inputElem, labelElem
 
Fields inherited from class com.google.gwt.user.client.ui.UIObject
DEBUG_ID_PREFIX
 
Constructor Summary
protected RadioButton(InputElement element)
           
  RadioButton(String 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)
           
 
Method Summary
protected  void ensureDomEventHandlers()
           
 IconType getIcon()
           
 IconFlip getIconFlip()
           
 IconPosition getIconPosition()
           
 IconRotate getIconRotate()
           
 IconSize getIconSize()
           
 ButtonSize getSize()
          Get the size of the widget
 ButtonType getType()
          Gets the type of the widget
 boolean isActive()
          Gets whether or not the widget has the active styles
 boolean isIconBordered()
           
 boolean isIconFixedWidth()
           
 boolean isIconLight()
           
 boolean isIconMuted()
           
 boolean isIconSpin()
           
 void setActive(boolean active)
          Sets the widget with the active styles or not
 void setIcon(IconType iconType)
           
 void setIconBordered(boolean iconBordered)
           
 void setIconFixedWidth(boolean iconFixedWidth)
           
 void setIconFlip(IconFlip iconFlip)
           
 void setIconLight(boolean iconLight)
           
 void setIconMuted(boolean iconMuted)
           
 void setIconPosition(IconPosition iconPosition)
           
 void setIconRotate(IconRotate iconRotate)
           
 void setIconSize(IconSize iconSize)
           
 void setIconSpin(boolean iconSpin)
           
 void setSize(ButtonSize size)
          Set the size of the widget
 void setType(ButtonType type)
          Sets the type on the widget
 void sinkEvents(int eventBitsToAdd)
           
 
Methods inherited from class org.gwtbootstrap3.client.ui.Radio
setName
 
Methods inherited from class org.gwtbootstrap3.client.ui.CheckBox
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
 
Methods inherited from class org.gwtbootstrap3.client.ui.gwt.ButtonBase
getId, getPull, setHiddenOn, setId, setPull, setVisibleOn
 
Methods inherited from class com.google.gwt.user.client.ui.ButtonBase
setHTML
 
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, onBrowserEvent, onDetach, removeFromParent, setLayoutData, 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, removeStyleDependentName, removeStyleName, resolvePotentialElement, setElement, setElement, setHeight, setPixelSize, setSize, setStyleDependentName, setStyleName, setStyleName, setStyleName, setStyleName, setStylePrimaryName, setStylePrimaryName, setTitle, setVisible, setVisible, setWidth, sinkBitlessEvent, toString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface com.google.gwt.event.shared.HasHandlers
fireEvent
 
Methods inherited from interface com.google.gwt.safehtml.client.HasSafeHtml
setHTML
 

Constructor Detail

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 button
label - 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 button
label - this radio button's html label
dir - the text's direction. Note that DEFAULT means direction should be inherited from the widget's parent element.
See Also:
#RadioButtonToggle(String, SafeHtml)

RadioButton

public RadioButton(String name,
                   SafeHtml label,
                   DirectionEstimator directionEstimator)
Parameters:
name - the group name with which to associate the radio button
label - this radio button's html label
directionEstimator - A DirectionEstimator object used for automatic direction adjustment. For convenience, #DEFAULT_DIRECTION_ESTIMATOR can be used.
See Also:
#RadioButtonToggle(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 button
label - 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 button
label - this radio button's label
dir - the text's direction. Note that DEFAULT means direction should be inherited from the widget's parent element.
See Also:
#RadioButtonToggle(String, SafeHtml)

RadioButton

public RadioButton(String name,
                   String label,
                   DirectionEstimator directionEstimator)
Parameters:
name - the group name with which to associate the radio button
label - this radio button's label
directionEstimator - A DirectionEstimator object used for automatic direction adjustment. For convenience, #DEFAULT_DIRECTION_ESTIMATOR can be used.
See Also:
#RadioButtonToggle(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 button
label - this radio button's label
asHTML - true to treat the specified label as HTML

RadioButton

@UiConstructor
public RadioButton(String name)

RadioButton

protected RadioButton(InputElement element)
Method Detail

ensureDomEventHandlers

protected void ensureDomEventHandlers()
Overrides:
ensureDomEventHandlers in class Radio

sinkEvents

public void sinkEvents(int eventBitsToAdd)
Overrides:
sinkEvents in class Radio

setSize

public void setSize(ButtonSize size)
Description copied from interface: HasSize
Set the size of the widget

Specified by:
setSize in interface HasSize<ButtonSize>
Parameters:
size - T size of the widget

getSize

public ButtonSize getSize()
Description copied from interface: HasSize
Get the size of the widget

Specified by:
getSize in interface HasSize<ButtonSize>
Returns:
T size of the widget

setType

public void setType(ButtonType type)
Description copied from interface: HasType
Sets the type on the widget

Specified by:
setType in interface HasType<ButtonType>
Parameters:
type - T type

getType

public ButtonType getType()
Description copied from interface: HasType
Gets the type of the widget

Specified by:
getType in interface HasType<ButtonType>
Returns:
type of the widget

setActive

public void setActive(boolean active)
Description copied from interface: HasActive
Sets the widget with the active styles or not

Specified by:
setActive in interface HasActive
Parameters:
active - true=gets active styles, false=removes active styles

isActive

public boolean isActive()
Description copied from interface: HasActive
Gets whether or not the widget has the active styles

Specified by:
isActive in interface HasActive
Returns:
true=has active styles, false=does not have active styles

setIconPosition

public void setIconPosition(IconPosition iconPosition)
Specified by:
setIconPosition in interface HasIconPosition

getIconPosition

public IconPosition getIconPosition()
Specified by:
getIconPosition in interface HasIconPosition

setIcon

public void setIcon(IconType iconType)
Specified by:
setIcon in interface HasIcon

getIcon

public IconType getIcon()
Specified by:
getIcon in interface HasIcon

setIconSize

public void setIconSize(IconSize iconSize)
Specified by:
setIconSize in interface HasIcon

getIconSize

public IconSize getIconSize()
Specified by:
getIconSize in interface HasIcon

setIconFlip

public void setIconFlip(IconFlip iconFlip)
Specified by:
setIconFlip in interface HasIcon

getIconFlip

public IconFlip getIconFlip()
Specified by:
getIconFlip in interface HasIcon

setIconRotate

public void setIconRotate(IconRotate iconRotate)
Specified by:
setIconRotate in interface HasIcon

getIconRotate

public IconRotate getIconRotate()
Specified by:
getIconRotate in interface HasIcon

setIconBordered

public void setIconBordered(boolean iconBordered)
Specified by:
setIconBordered in interface HasIcon

isIconBordered

public boolean isIconBordered()
Specified by:
isIconBordered in interface HasIcon

setIconMuted

public void setIconMuted(boolean iconMuted)
Specified by:
setIconMuted in interface HasIcon

isIconMuted

public boolean isIconMuted()
Specified by:
isIconMuted in interface HasIcon

setIconLight

public void setIconLight(boolean iconLight)
Specified by:
setIconLight in interface HasIcon

isIconLight

public boolean isIconLight()
Specified by:
isIconLight in interface HasIcon

setIconSpin

public void setIconSpin(boolean iconSpin)
Specified by:
setIconSpin in interface HasIcon

isIconSpin

public boolean isIconSpin()
Specified by:
isIconSpin in interface HasIcon

setIconFixedWidth

public void setIconFixedWidth(boolean iconFixedWidth)
Specified by:
setIconFixedWidth in interface HasIcon

isIconFixedWidth

public boolean isIconFixedWidth()
Specified by:
isIconFixedWidth in interface HasIcon


Copyright © 2015. All rights reserved.