|
||||||||||
| 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
eu.webtoolkit.jwt.WRadioButton
public class WRadioButton
A user control that represents a radio button.
Use a WButtonGroup to group together radio buttons that reflect
options that are mutually exclusive.
Usage example:
enum Vote { Republican, Democrate, NoVote };
// use a group box as widget container for 3 radio buttons, with a title
WGroupBox container = new WGroupBox("USA elections vote");
// use a button group to logically group the 3 options
WButtonGroup group = new WButtonGroup(this);
WRadioButton button;
button = new WRadioButton("I voted Republican", container);
new WBreak(container);
group.addButton(button, Vote.Republican.ordinal());
button = new WRadioButton("I voted Democrat", container);
new WBreak(container);
group.addButton(button, Vote.Democrate.ordinal());
button = new WRadioButton("I didn't vote", container);
new WBreak(container);
group.addButton(button, Vote.NoVote.ordinal());
group.setCheckedButton(group.button(Vote.NoVote.ordinal()));
WRadioButton is an inline widget.
This widget corresponds to the HTML
<input type="radio"> tag. Depending on whether a
text is included, it may be nested in a <span> tag which
also includes a rendered WLabel. This widget does not provide
styling, and can be styled using inline or external CSS as appropriate.
WAbstractToggleButton,
WButtonGroup| Constructor Summary | |
|---|---|
WRadioButton()
Creates an unchecked radio button with empty label and optional parent. |
|
WRadioButton(java.lang.CharSequence text)
Creates an unchecked radio button with given text and optional parent. |
|
WRadioButton(java.lang.CharSequence text,
WContainerWidget parent)
Creates an unchecked radio button with given text and optional parent. |
|
WRadioButton(WContainerWidget parent)
Creates an unchecked radio button with empty label and optional parent. |
|
| Method Summary | |
|---|---|
WButtonGroup |
getGroup()
Returns the button group. |
void |
remove()
Destructor. |
| Methods inherited from class eu.webtoolkit.jwt.WAbstractToggleButton |
|---|
checked, getText, getValueText, isChecked, setChecked, setChecked, setText, setUnChecked, setValueText, 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 |
|---|
public WRadioButton(WContainerWidget parent)
public WRadioButton()
Calls this((WContainerWidget)null)
public WRadioButton(java.lang.CharSequence text,
WContainerWidget parent)
public WRadioButton(java.lang.CharSequence text)
Calls this(text, (WContainerWidget)null)
| Method Detail |
|---|
public void remove()
remove in class WAbstractToggleButtonWContainerWidget.removeWidget(WWidget widget)public WButtonGroup getGroup()
Returns the button group to which this button belongs.
WButtonGroup.addButton(WRadioButton button, int id)
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||