|
GWT 2.7.0 | |||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||
java.lang.Objectcom.google.gwt.user.client.ui.UIObject
com.google.gwt.user.client.ui.Widget
com.google.gwt.user.client.ui.FocusWidget
com.google.gwt.user.client.ui.SimpleCheckBox
public class SimpleCheckBox
A simple checkbox widget, with no label.
| 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.Widget |
|---|
eventsToSink |
| Fields inherited from class com.google.gwt.user.client.ui.UIObject |
|---|
DEBUG_ID_PREFIX, MISSING_ELEMENT_ERROR, SETELEMENT_TWICE_ERROR |
| Constructor Summary | |
|---|---|
|
SimpleCheckBox()
Creates a new simple checkbox. |
protected |
SimpleCheckBox(Element element)
This constructor may be used by subclasses to explicitly use an existing element. |
(package private) |
SimpleCheckBox(Element element,
java.lang.String styleName)
|
| Method Summary | |
|---|---|
HandlerRegistration |
addValueChangeHandler(ValueChangeHandler<java.lang.Boolean> handler)
Adds a ValueChangeEvent handler. |
LeafValueEditor<java.lang.Boolean> |
asEditor()
Returns the Editor encapsulated by the view object. |
protected void |
ensureDomEventHandlers()
|
java.lang.String |
getFormValue()
Returns the value property of the input element that backs this widget. |
java.lang.String |
getName()
Gets the widget's name. |
java.lang.Boolean |
getValue()
Determines whether this check box is currently checked. |
boolean |
isChecked()
Deprecated. Use getValue() instead |
protected void |
onUnload()
This method is called when a widget is detached from the browser's document. |
void |
setChecked(boolean checked)
Deprecated. Use setValue(Boolean) instead |
void |
setEnabled(boolean enabled)
Sets whether this widget is enabled. |
void |
setFormValue(java.lang.String value)
Set the value property on the input element that backs this widget. |
void |
setName(java.lang.String name)
Sets the widget's name. |
void |
setValue(java.lang.Boolean value)
Checks or unchecks the check box. |
void |
setValue(java.lang.Boolean value,
boolean fireEvents)
Checks or unchecks the check box, firing ValueChangeEvent if
appropriate. |
static SimpleCheckBox |
wrap(Element element)
Creates a SimpleCheckBox widget that wraps an existing <input type='checkbox'> element. |
| Methods inherited from class com.google.gwt.user.client.ui.Widget |
|---|
addAttachHandler, addBitlessDomHandler, addDomHandler, addHandler, asWidget, asWidgetOrNull, createHandlerManager, delegateEvent, doAttachChildren, doDetachChildren, ensureHandlers, fireEvent, getHandlerCount, getHandlerManager, getLayoutData, getParent, isAttached, isOrWasAttached, onBrowserEvent, onDetach, onLoad, removeFromParent, replaceElement, setLayoutData, setParent, 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 |
| Constructor Detail |
|---|
public SimpleCheckBox()
protected SimpleCheckBox(Element element)
element - the element to be used
SimpleCheckBox(Element element,
java.lang.String styleName)
| Method Detail |
|---|
public static SimpleCheckBox wrap(Element element)
RootPanel.detachNow(Widget).
element - the element to be wrappedpublic HandlerRegistration addValueChangeHandler(ValueChangeHandler<java.lang.Boolean> handler)
HasValueChangeHandlersValueChangeEvent handler.
addValueChangeHandler in interface HasValueChangeHandlers<java.lang.Boolean>handler - the handler
public LeafValueEditor<java.lang.Boolean> asEditor()
IsEditor
asEditor in interface IsEditor<LeafValueEditor<java.lang.Boolean>>Editor of type Epublic java.lang.String getFormValue()
FormPanel that holds it is submitted
and the box is checked.
Don't confuse this with getValue(), which returns true or false if
the widget is checked.
public java.lang.String getName()
HasName
getName in interface HasNamepublic java.lang.Boolean getValue()
Note that this does not return the value property of the checkbox
input element wrapped by this widget. For access to that property, see
getFormValue()
getValue in interface TakesValue<java.lang.Boolean>getValue in interface HasValue<java.lang.Boolean>true if the check box is checked, false otherwise.
Will not return nullTakesValue.setValue(V)@Deprecated public boolean isChecked()
getValue() instead
true if the check box is checked@Deprecated public void setChecked(boolean checked)
setValue(Boolean) instead
checked - true to check the check boxpublic void setEnabled(boolean enabled)
FocusWidget
setEnabled in interface HasEnabledsetEnabled in class FocusWidgetenabled - true to enable the widget, false
to disable itpublic void setFormValue(java.lang.String value)
FormPanel that holds it is submitted and the box
is checked.
Don't confuse this with setValue(java.lang.Boolean), which actually checks and
unchecks the box.
value - public void setName(java.lang.String name)
HasName
setName in interface HasNamename - the widget's new namepublic void setValue(java.lang.Boolean value)
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)
setValue in interface TakesValue<java.lang.Boolean>setValue in interface HasValue<java.lang.Boolean>value - true to check, false to uncheck; null value implies falseTakesValue.getValue()
public void setValue(java.lang.Boolean value,
boolean fireEvents)
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)
setValue in interface HasValue<java.lang.Boolean>value - true to check, false to uncheck; null value implies falsefireEvents - If true, and value has changed, fire a
ValueChangeEventprotected void ensureDomEventHandlers()
protected void onUnload()
onUnload in class Widget
|
GWT 2.7.0 | |||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||