Package com.groiss.gui.component
Class Checkbox
java.lang.Object
com.groiss.gui.AbstractComponent
com.groiss.gui.component.Checkbox
- All Implemented Interfaces:
Component
,Serializable
,Cloneable
A HTML Checkbox, <input type=checkbox ...
- See Also:
-
Field Summary
Fields inherited from class com.groiss.gui.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
Fields inherited from interface com.groiss.gui.Component
LABELLEDBY
-
Constructor Summary
ConstructorDescriptionCheckbox()
Constructs a new Checkbox.Constructs a new Checkbox with name and value.Constructs a new Checkbox with name and value.Constructs a new Checkbox with name and value. -
Method Summary
Modifier and TypeMethodDescriptiongetValue()
boolean
void
setChecked
(boolean checked) sets wheter the checkbox is checked or notvoid
setContent
(Object o) Set the value of the checkboxvoid
sets the value of the checkboxMethods inherited from class com.groiss.gui.AbstractComponent
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
-
Constructor Details
-
Checkbox
public Checkbox()Constructs a new Checkbox. -
Checkbox
Constructs a new Checkbox with name and value.- Parameters:
name
- the group where the checkbox belongs tovalue
- the value of the checkbox
-
Checkbox
Constructs a new Checkbox with name and value.- Parameters:
name
- the group where the checkbox belongs tovalue
- the value of the checkboxchecked
- whether the checkbos is initially checked
-
Checkbox
Constructs a new Checkbox with name and value.- Parameters:
name
- the group where the checkbox belongs tovalue
- the value of the checkboxchecked
- whether the checkbos is initially checkedstyleClass
- the name of a CSS class
-
-
Method Details
-
setChecked
public void setChecked(boolean checked) sets wheter the checkbox is checked or not- Parameters:
checked
- - the checked-mode of the radioButton
-
isChecked
public boolean isChecked() -
setValue
sets the value of the checkbox- Parameters:
value
- - the value of the checkbox
-
getValue
-
setContent
Set the value of the checkbox- Specified by:
setContent
in interfaceComponent
- Overrides:
setContent
in classAbstractComponent
- Parameters:
o
- any object where the string representation is used for rendering
-
getContent
- Specified by:
getContent
in interfaceComponent
- Overrides:
getContent
in classAbstractComponent
- Returns:
- - the content object of the component
-