|
|||||||||||
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.ButtonBase
com.google.gwt.user.client.ui.CheckBox
A standard check box widget (also serves as a base class for
RadioButton
.
code
Field Summary |
Fields inherited from class java.lang.Object |
typeId, typeName |
Constructor Summary | |
|
CheckBox()
Creates a check box with no label. |
protected |
CheckBox(Element elem)
|
|
CheckBox(String label)
Creates a check box with the specified text label. |
|
CheckBox(String label,
boolean asHTML)
Creates a check box with the specified text label. |
Method Summary | |
String |
getHTML()
Gets this object's contents as HTML. |
String |
getText()
Gets this object's text. |
boolean |
isChecked()
Determines whether this check box is currently checked. |
boolean |
isEnabled()
Gets whether this widget is enabled. |
void |
setChecked(boolean checked)
Checks or unchecks this check box. |
void |
setEnabled(boolean enabled)
Sets whether this widget is enabled. |
void |
setHTML(String html)
Sets this object's contents via HTML. |
void |
setText(String text)
Sets this object's text. |
Methods inherited from class com.google.gwt.user.client.ui.FocusWidget |
addClickListener, addFocusListener, addKeyboardListener, getTabIndex, onBrowserEvent, removeClickListener, removeFocusListener, removeKeyboardListener, setAccessKey, setFocus, setTabIndex |
Methods inherited from class com.google.gwt.user.client.ui.Widget |
getParent, isAttached, onAttach, onDetach, onLoad |
Methods inherited from class com.google.gwt.user.client.ui.UIObject |
addStyleName, getAbsoluteLeft, getAbsoluteTop, getElement, getOffsetHeight, getOffsetWidth, getStyleName, isVisible, isVisible, removeStyleName, setElement, setHeight, setPixelSize, setSize, setStyleName, setStyleName, setVisible, setVisible, setWidth, sinkEvents, toString, unsinkEvents |
Methods inherited from class java.lang.Object |
equals, finalize, hashCode |
Constructor Detail |
public CheckBox()
public CheckBox(String label)
label
- the check box's labelpublic CheckBox(String label, boolean asHTML)
label
- the check box's labelprotected CheckBox(Element elem)
Method Detail |
public String getHTML()
HasHTML
getHTML
in interface HasHTML
getHTML
in class ButtonBase
public String getText()
HasText
getText
in interface HasText
getText
in class ButtonBase
public boolean isChecked()
true
if the check box is checkedpublic boolean isEnabled()
FocusWidget
isEnabled
in class FocusWidget
true
if the widget is enabledpublic void setChecked(boolean checked)
checked
- true
to check the check boxpublic void setEnabled(boolean enabled)
FocusWidget
setEnabled
in class FocusWidget
enabled
- true
to enable the widget, false
to disable itpublic void setHTML(String html)
HasHTML
HasText.setText(java.lang.String)
whenever possible.
setHTML
in interface HasHTML
setHTML
in class ButtonBase
public void setText(String text)
HasText
setText
in interface HasText
setText
in class ButtonBase
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |