Package org.patternfly.component.form
Class Checkbox
- All Implemented Interfaces:
Container<HTMLElement,,Checkbox> Finder<HTMLElement>,HasElement<HTMLElement,,Checkbox> HasHTMLElement<HTMLElement,,Checkbox> IsElement<HTMLElement>,TypedBuilder<HTMLElement,,Checkbox> Component,HasValue<Boolean>,Modifiers.Disabled<HTMLElement,,Checkbox> Modifiers.Required<HTMLElement,Checkbox>
public class Checkbox
extends BaseComponent<HTMLElement,Checkbox>
implements HasValue<Boolean>, Modifiers.Disabled<HTMLElement,Checkbox>, Modifiers.Required<HTMLElement,Checkbox>
A checkbox is used to select a single item or multiple items, typically to choose elements to perform an action or to reflect
a binary setting.
-
Method Summary
Modifier and TypeMethodDescriptionaddBody(CheckboxBody body) addDescription(CheckboxDescription description) applyTo(Consumer<InputElementBuilder<HTMLInputElement>> consumer) Provides access to the underlying checkbox element using a fluent API stylestatic Checkboxstatic Checkboxstatic Checkboxstatic Checkboxdisabled(boolean disabled) onChange(ChangeHandler<Checkbox, Boolean> changeHandler) Defines a change handler that is called when thevalue()of this checkbox changes.required(boolean required) reversed()Same as standalone(true)standalone(boolean removeLabel) that()value()value(boolean checked) Same as value(checked, false)value(boolean checked, boolean fireEvent) Sets thecheckedattribute of the input element.Methods inherited from class org.patternfly.component.BaseComponent
componentType, elementMethods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.jboss.elemento.Container
add, add, add, addAll, addAll, addAll, addAll, addAll, addAllMethods inherited from interface org.jboss.elemento.HasElement
add, apply, aria, aria, aria, attr, attr, attr, classList, classList, css, id, innerHtml, on, on, on, run, textContent, textNode, toggle, toggle, toggle, uniqueIdMethods inherited from interface org.jboss.elemento.HasHTMLElement
data, hidden, style, style, style, style, style, style, titleMethods inherited from interface org.patternfly.style.Modifiers.Disabled
disabled, isDisabledMethods inherited from interface org.patternfly.style.Modifiers.Required
required
-
Method Details
-
checkbox
-
checkbox
-
checkbox
-
checkbox
-
addBody
-
addDescription
-
disabled
- Specified by:
disabledin interfaceModifiers.Disabled<HTMLElement,Checkbox>
-
required
- Specified by:
requiredin interfaceModifiers.Required<HTMLElement,Checkbox>
-
reversed
-
standalone
Same as standalone(true) -
standalone
-
value
Same as value(checked, false) -
value
Sets thecheckedattribute of the input element. -
applyTo
Provides access to the underlying checkbox element using a fluent API style -
that
- Specified by:
thatin interfaceTypedBuilder<HTMLElement,Checkbox>
-
onChange
Defines a change handler that is called when thevalue()of this checkbox changes. -
value
-
inputElement
-