public class RadioButton extends AbstractComponent
ACTIVE, browserMode, DEFAULT, ID, IE, INVISIBLE, isSensitive, label, NS, ON_BLUR, ON_CHANGE, ON_CLICK, ON_DBLCLICK, ON_FOCUS, ON_KEY_DOWN, ON_KEY_PRESS, ON_KEY_UP, ON_LOAD, ON_MOUSE_DOWN, ON_MOUSE_MOVE, ON_MOUSE_OUT, ON_MOUSE_UP, ON_RESET, ON_SELECT, ON_SUBMIT, ON_UNLOAD, parent, parentElem, READONLY, root, viewMode
LABELLEDBY
Constructor and Description |
---|
RadioButton()
Constructs a new empty RadioButton.
|
RadioButton(String name,
String value)
Constructor with name and value.
|
RadioButton(String name,
String value,
boolean checked)
Constructor with name, value and the initial state.
|
RadioButton(String name,
String value,
boolean checked,
String styleClass)
Constructor with name, value and the initial state.
|
Modifier and Type | Method and Description |
---|---|
Object |
getContent() |
String |
getName() |
String |
getText() |
String |
getValue() |
boolean |
isChecked() |
void |
setChecked(boolean checked)
sets whether the radioButton is checked or not
|
void |
setContent(Object o)
Set the button text.
|
void |
setName(String name)
sets the name of the radioButton
|
void |
setText(String text)
sets the text
|
void |
setValue(String value)
sets the value of the checkbox
|
addClass, clone, create, getAttribute, getBrowserMode, getId, getLabel, getParent, getParentElement, getRoot, getRootName, getStyle, getViewMode, init, init, init, removeAttribute, removeClass, setActionListener, setAttribute, setBrowserMode, setClass, setEncoding, setExpandEmptyElements, setId, setIndenting, setLabel, setNewLines, setParent, setParentElement, setRootName, setStyle, setViewMode, show, show, toggleClass, toString
public RadioButton()
public RadioButton(String name, String value)
name
- - the name of the RadioButton groupvalue
- - the value of the RadioButtonpublic RadioButton(String name, String value, boolean checked)
name
- the name of the RadioButton groupvalue
- the value of this buttonchecked
- whether the RadioButton is checked or notpublic RadioButton(String name, String value, boolean checked, String styleClass)
name
- the name of the RadioButton groupvalue
- the value of this buttonchecked
- whether the RadioButton is checked or notstyleClass
- the name of a CSS classpublic void setChecked(boolean checked)
checked
- the checked-mode of the radioButtonpublic boolean isChecked()
public void setName(String name)
setName
in interface Component
setName
in class AbstractComponent
name
- the namepublic String getName()
getName
in interface Component
getName
in class AbstractComponent
public void setValue(String value)
value
- the value of the checkboxpublic String getValue()
public void setText(String text)
text
- the text Stringpublic String getText()
public void setContent(Object o)
setContent
in interface Component
setContent
in class AbstractComponent
o
- any object where the string representation is used for renderingpublic Object getContent()
getContent
in interface Component
getContent
in class AbstractComponent
@enterprise 10.0.38589 Copyright © 2001-2024 Groiss Informatics GmbH. All Rights Reserved.