public class SwitchButton extends com.google.gwt.user.client.ui.Composite implements com.google.gwt.user.client.ui.HasName, com.google.gwt.user.client.ui.HasValue<Boolean>
| Constructor and Description |
|---|
SwitchButton() |
SwitchButton(boolean initialValue) |
| Modifier and Type | Method and Description |
|---|---|
com.google.gwt.event.shared.HandlerRegistration |
addValueChangeHandler(com.google.gwt.event.logical.shared.ValueChangeHandler<Boolean> handler) |
protected void |
ensureDomEventHandlers() |
String |
getName() |
Boolean |
getValue() |
void |
setName(String name) |
void |
setValue(Boolean value)
Checks or unchecks the switch button box, firing
ValueChangeEvent if
appropriate. |
void |
setValue(Boolean value,
boolean fireEvents)
Checks or unchecks the switch button box, firing
ValueChangeEvent if
appropriate. |
getWidget, initWidget, isAttached, onAttach, onBrowserEvent, onDetach, performDetachedInitialization, render, render, resolvePotentialElement, setWidget, wrapElementaddAttachHandler, addBitlessDomHandler, addDomHandler, addHandler, asWidget, asWidgetOrNull, createHandlerManager, delegateEvent, doAttachChildren, doDetachChildren, fireEvent, getHandlerCount, getLayoutData, getParent, isOrWasAttached, onLoad, onUnload, removeFromParent, setLayoutData, sinkEventsaddStyleDependentName, 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, unsinkEventspublic SwitchButton()
public SwitchButton(boolean initialValue)
public com.google.gwt.event.shared.HandlerRegistration addValueChangeHandler(com.google.gwt.event.logical.shared.ValueChangeHandler<Boolean> handler)
addValueChangeHandler in interface com.google.gwt.event.logical.shared.HasValueChangeHandlers<Boolean>public Boolean getValue()
public void setValue(Boolean value)
ValueChangeEvent if
appropriate.
Note that this does not set the value property of the checkbox
input element wrapped by this widget. For access to that property, see
#setFormValue(String)
public void setValue(Boolean value, boolean fireEvents)
ValueChangeEvent if
appropriate.
setValue in interface com.google.gwt.user.client.ui.HasValue<Boolean>value - true to set on, false to set off; null value implies falsefireEvents - If true, and value has changed, fire a
ValueChangeEventprotected void ensureDomEventHandlers()
public void setName(String name)
setName in interface com.google.gwt.user.client.ui.HasNamepublic String getName()
getName in interface com.google.gwt.user.client.ui.HasNameCopyright © 2013. All Rights Reserved.