|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objecteu.webtoolkit.jwt.WObject
eu.webtoolkit.jwt.WWidget
eu.webtoolkit.jwt.WWebWidget
eu.webtoolkit.jwt.WInteractWidget
eu.webtoolkit.jwt.WFormWidget
eu.webtoolkit.jwt.WAbstractToggleButton
public abstract class WAbstractToggleButton
An abstract base class for radio buttons and check boxes.
A toggle button provides a button with a boolean state (checked or unchecked), and a text label.
To act on a change of the state, either connect a slot to the
WFormWidget#changed() signal, or connect a slot
to the checked() or
unChecked() signals.
The current state (checked or unchecked) may be inspected using the
isChecked() method.
| Constructor Summary | |
|---|---|
protected |
WAbstractToggleButton()
Creates an unchecked toggle button without label. |
protected |
WAbstractToggleButton(java.lang.CharSequence text)
Creates an unchecked toggle button with given text label. |
protected |
WAbstractToggleButton(java.lang.CharSequence text,
WContainerWidget parent)
Creates an unchecked toggle button with given text label. |
protected |
WAbstractToggleButton(WContainerWidget parent)
Creates an unchecked toggle button without label. |
| Method Summary | |
|---|---|
EventSignal |
checked()
Signal emitted when the button gets checked. |
WString |
getText()
Returns the label text. |
java.lang.String |
getValueText()
Returns the current value. |
boolean |
isChecked()
Returns the button state. |
void |
remove()
Destructor. |
void |
setChecked()
Checks the button. |
void |
setChecked(boolean how)
Sets the button state. |
void |
setText(java.lang.CharSequence text)
Sets the label text. |
void |
setUnChecked()
Unchecks the button. |
void |
setValueText(java.lang.String text)
Sets the current value. |
EventSignal |
unChecked()
Signal emitted when the button gets unChecked. |
| Methods inherited from class eu.webtoolkit.jwt.WFormWidget |
|---|
blurred, changed, enableAjax, focussed, getEmptyText, getLabel, getTabIndex, getValidator, hasFocus, isReadOnly, propagateSetEnabled, refresh, render, selected, setEmptyText, setEnabled, setFocus, setFocus, setHidden, setReadOnly, setTabIndex, setValidator, validate, validated |
| Methods inherited from class eu.webtoolkit.jwt.WInteractWidget |
|---|
clicked, doubleClicked, enterPressed, escapePressed, gestureChanged, gestureEnded, gestureStarted, isEnabled, keyPressed, keyWentDown, keyWentUp, load, mouseDragged, mouseMoved, mouseWentDown, mouseWentOut, mouseWentOver, mouseWentUp, mouseWheel, setDraggable, setDraggable, setDraggable, setDraggable, touchEnded, touchMoved, touchStarted |
| Methods inherited from class eu.webtoolkit.jwt.WWidget |
|---|
acceptDrops, acceptDrops, addCssRule, addCssRule, addStyleClass, animateHide, animateShow, boxBorder, boxPadding, containsExposed, disable, dropEvent, enable, getDrop, getJsRef, getParent, hide, htmlText, isLayoutSizeAware, layoutSizeChanged, positionAt, positionAt, removeStyleClass, resize, setClearSides, setHeight, setHidden, setLayoutSizeAware, setMargin, setMargin, setMargin, setMargin, setMargin, setOffsets, setOffsets, setOffsets, setOffsets, setOffsets, setToolTip, setVerticalAlignment, setWidth, show, stopAcceptDrops, toggleStyleClass, toggleStyleClass, tr |
| Methods inherited from class eu.webtoolkit.jwt.WObject |
|---|
addChild, getObjectName, setObjectName |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
protected WAbstractToggleButton(WContainerWidget parent)
protected WAbstractToggleButton()
Calls this((WContainerWidget)null)
protected WAbstractToggleButton(java.lang.CharSequence text,
WContainerWidget parent)
The text label is rendered to the right side of the button.
protected WAbstractToggleButton(java.lang.CharSequence text)
Calls
this(text, (WContainerWidget)null)
| Method Detail |
|---|
public void remove()
remove in class WFormWidgetWContainerWidget.removeWidget(WWidget widget)public void setText(java.lang.CharSequence text)
The label is rendered to the right fo the button.
public WString getText()
setText(CharSequence text)public boolean isChecked()
setChecked()public void setChecked(boolean how)
This method does not emit one of the
checked() or
unChecked() signals.
setChecked(),
setUnChecked()public void setChecked()
Does not emit the checked()
signal.
setChecked(boolean how)public void setUnChecked()
Does not emit the unChecked()
signal.
setChecked(boolean how)public java.lang.String getValueText()
Returns "yes" when checked, "maybe" when partially checked, and "no" when unchecked.
getValueText in class WFormWidgetpublic void setValueText(java.lang.String text)
This interprets text values of "yes", "maybe" or "no".
setValueText in class WFormWidgetpublic EventSignal checked()
This signal is emitted when the user checks the button.
You can use the WFormWidget#changed()
signal to react to any change of the button state.
public EventSignal unChecked()
This signal is emitted when the user unchecks the button.
You can use the WFormWidget#changed()
signal to react to any change of the button state.
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||