org.gwtbootstrap3.extras.toggleswitch.client.ui.base
Class ToggleSwitchBase

java.lang.Object
  extended by com.google.gwt.user.client.ui.UIObject
      extended by com.google.gwt.user.client.ui.Widget
          extended by org.gwtbootstrap3.extras.toggleswitch.client.ui.base.ToggleSwitchBase
All Implemented Interfaces:
IsEditor<LeafValueEditor<Boolean>>, HasAttachHandlers, HasValueChangeHandlers<Boolean>, HasHandlers, EventListener, TakesValue<Boolean>, HasEnabled, HasName, HasValue<Boolean>, HasVisibility, IsWidget, org.gwtbootstrap3.client.ui.base.HasId, org.gwtbootstrap3.client.ui.base.HasResponsiveness, org.gwtbootstrap3.client.ui.base.HasSize<SizeType>
Direct Known Subclasses:
ToggleSwitch, ToggleSwitchRadio

public class ToggleSwitchBase
extends Widget
implements org.gwtbootstrap3.client.ui.base.HasSize<SizeType>, HasValue<Boolean>, HasValueChangeHandlers<Boolean>, HasEnabled, HasVisibility, org.gwtbootstrap3.client.ui.base.HasId, HasName, org.gwtbootstrap3.client.ui.base.HasResponsiveness, IsEditor<LeafValueEditor<Boolean>>

Original source from http://www.bootstrap-switch.org/

Author:
Grant Slender

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 com.google.gwt.user.client.ui.UIObject
DEBUG_ID_PREFIX
 
Constructor Summary
protected ToggleSwitchBase(SimpleCheckBox checkBox)
           
 
Method Summary
 HandlerRegistration addValueChangeHandler(ValueChangeHandler<Boolean> handler)
           
 LeafValueEditor<Boolean> asEditor()
           
 String getId()
           
 String getLabelText()
           
 String getName()
           
 ColorType getOffColor()
           
 String getOffText()
           
 ColorType getOnColor()
           
 String getOnText()
           
 SizeType getSize()
           
 Boolean getValue()
           
 boolean isAnimate()
           
 boolean isEnabled()
           
 boolean isIndeterminate()
           
 boolean isInverse()
           
 boolean isRadioAllOff()
           
 boolean isReadOnly()
           
 void onChange(boolean value)
           
protected  void onLoad()
           
protected  void onUnload()
           
 void setAnimate(boolean animate)
           
 void setEnabled(boolean enabled)
           
 void setHandleWidth(String handleWidth)
          Sets the handle's width.
 void setHiddenOn(org.gwtbootstrap3.client.ui.constants.DeviceSize deviceSize)
           
 void setId(String id)
           
 void setIndeterminate(boolean indeterminate)
          Indeterminate state.
 void setInverse(boolean inverse)
          Inverse switch direction.
 void setLabelText(String labelText)
           
 void setLabelWidth(String labelWidth)
          Sets the label's width (the space between handles).
 void setName(String name)
           
 void setOffColor(ColorType offColor)
           
 void setOffIcon(org.gwtbootstrap3.client.ui.constants.IconType iconType)
           
 void setOffText(String offText)
           
 void setOnColor(ColorType onColor)
           
 void setOnIcon(org.gwtbootstrap3.client.ui.constants.IconType iconType)
           
 void setOnText(String onText)
           
 void setRadioAllOff(boolean radioAllOff)
          Allow this radio button to be unchecked by the user.
 void setReadOnly(boolean readOnly)
           
 void setSize(SizeType size)
           
 void setValue(Boolean value)
           
 void setValue(Boolean value, boolean fireEvents)
           
 void setVisibleOn(org.gwtbootstrap3.client.ui.constants.DeviceSize deviceSize)
           
 
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, onAttach, onBrowserEvent, onDetach, 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, 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.user.client.ui.HasVisibility
isVisible, setVisible
 

Constructor Detail

ToggleSwitchBase

protected ToggleSwitchBase(SimpleCheckBox checkBox)
Method Detail

onLoad

protected void onLoad()
Overrides:
onLoad in class Widget

onUnload

protected void onUnload()
Overrides:
onUnload in class Widget

setVisibleOn

public void setVisibleOn(org.gwtbootstrap3.client.ui.constants.DeviceSize deviceSize)
Specified by:
setVisibleOn in interface org.gwtbootstrap3.client.ui.base.HasResponsiveness

setHiddenOn

public void setHiddenOn(org.gwtbootstrap3.client.ui.constants.DeviceSize deviceSize)
Specified by:
setHiddenOn in interface org.gwtbootstrap3.client.ui.base.HasResponsiveness

setId

public void setId(String id)
Specified by:
setId in interface org.gwtbootstrap3.client.ui.base.HasId

getId

public String getId()
Specified by:
getId in interface org.gwtbootstrap3.client.ui.base.HasId

setName

public void setName(String name)
Specified by:
setName in interface HasName

getName

public String getName()
Specified by:
getName in interface HasName

isEnabled

public boolean isEnabled()
Specified by:
isEnabled in interface HasEnabled

setEnabled

public void setEnabled(boolean enabled)
Specified by:
setEnabled in interface HasEnabled

getSize

public SizeType getSize()
Specified by:
getSize in interface org.gwtbootstrap3.client.ui.base.HasSize<SizeType>

setSize

public void setSize(SizeType size)
Specified by:
setSize in interface org.gwtbootstrap3.client.ui.base.HasSize<SizeType>

getOnColor

public ColorType getOnColor()

setOnColor

public void setOnColor(ColorType onColor)

getOffColor

public ColorType getOffColor()

setOffColor

public void setOffColor(ColorType offColor)

isAnimate

public boolean isAnimate()

setAnimate

public void setAnimate(boolean animate)

getOnText

public String getOnText()

setOnText

public void setOnText(String onText)

setOnIcon

public void setOnIcon(org.gwtbootstrap3.client.ui.constants.IconType iconType)

getOffText

public String getOffText()

setOffText

public void setOffText(String offText)

setOffIcon

public void setOffIcon(org.gwtbootstrap3.client.ui.constants.IconType iconType)

getLabelText

public String getLabelText()

setLabelText

public void setLabelText(String labelText)

addValueChangeHandler

public HandlerRegistration addValueChangeHandler(ValueChangeHandler<Boolean> handler)
Specified by:
addValueChangeHandler in interface HasValueChangeHandlers<Boolean>

getValue

public Boolean getValue()
Specified by:
getValue in interface TakesValue<Boolean>
Specified by:
getValue in interface HasValue<Boolean>

setValue

public void setValue(Boolean value)
Specified by:
setValue in interface TakesValue<Boolean>
Specified by:
setValue in interface HasValue<Boolean>

setValue

public void setValue(Boolean value,
                     boolean fireEvents)
Specified by:
setValue in interface HasValue<Boolean>

onChange

public void onChange(boolean value)

asEditor

public LeafValueEditor<Boolean> asEditor()
Specified by:
asEditor in interface IsEditor<LeafValueEditor<Boolean>>

isReadOnly

public boolean isReadOnly()

setReadOnly

public void setReadOnly(boolean readOnly)

isIndeterminate

public boolean isIndeterminate()

setIndeterminate

public void setIndeterminate(boolean indeterminate)
Indeterminate state.


isInverse

public boolean isInverse()

setInverse

public void setInverse(boolean inverse)
Inverse switch direction.


isRadioAllOff

public boolean isRadioAllOff()

setRadioAllOff

public void setRadioAllOff(boolean radioAllOff)
Allow this radio button to be unchecked by the user.


setHandleWidth

public void setHandleWidth(String handleWidth)
Sets the handle's width.

Parameters:
labelWidth - - set to "auto" (default) for automatic sizing, integer otherwise

setLabelWidth

public void setLabelWidth(String labelWidth)
Sets the label's width (the space between handles).

Parameters:
labelWidth - - set to "auto" (default) for automatic sizing, integer otherwise


Copyright © 2015. All rights reserved.