public class Checkbox 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 |
---|
Checkbox()
Constructs a new Checkbox.
|
Checkbox(String name,
String value)
Constructs a new Checkbox with name and value.
|
Checkbox(String name,
String value,
boolean checked)
Constructs a new Checkbox with name and value.
|
Checkbox(String name,
String value,
boolean checked,
String styleClass)
Constructs a new Checkbox with name and value.
|
Modifier and Type | Method and Description |
---|---|
Object |
getContent() |
String |
getValue() |
boolean |
isChecked() |
void |
setChecked(boolean checked)
sets wheter the checkbox is checked or not
|
void |
setContent(Object o)
Set the value of the checkbox
|
void |
setValue(String value)
sets the value of the checkbox
|
addClass, clone, create, getAttribute, getBrowserMode, getId, getLabel, getName, getParent, getParentElement, getRoot, getRootName, getStyle, getViewMode, init, init, init, removeAttribute, removeClass, setActionListener, setAttribute, setBrowserMode, setClass, setEncoding, setExpandEmptyElements, setId, setIndenting, setLabel, setName, setNewLines, setParent, setParentElement, setRootName, setStyle, setViewMode, show, show, toggleClass, toString
public Checkbox()
public Checkbox(String name, String value)
name
- the group where the checkbox belongs tovalue
- the value of the checkboxpublic Checkbox(String name, String value, boolean checked)
name
- the group where the checkbox belongs tovalue
- the value of the checkboxchecked
- whether the checkbos is initially checkedpublic Checkbox(String name, String value, boolean checked, String styleClass)
name
- the group where the checkbox belongs tovalue
- the value of the checkboxchecked
- whether the checkbos is initially checkedstyleClass
- the name of a CSS classpublic void setChecked(boolean checked)
checked
- - the checked-mode of the radioButtonpublic boolean isChecked()
public void setValue(String value)
value
- - the value of the checkboxpublic String getValue()
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.