Package org.patternfly.component.form
Class Checkbox
- java.lang.Object
-
- org.patternfly.component.BaseComponent<HTMLElement,Checkbox>
-
- org.patternfly.component.form.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
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description CheckboxaddBody(CheckboxBody body)CheckboxaddDescription(CheckboxDescription description)CheckboxapplyTo(Consumer<InputElementBuilder<HTMLInputElement>> consumer)Provides access to the underlying checkbox element using a fluent API stylestatic Checkboxcheckbox(String id, String name)static Checkboxcheckbox(String id, String name, boolean checked)static Checkboxcheckbox(String id, String name, String label)static Checkboxcheckbox(String id, String name, String label, boolean checked)Checkboxdisabled(boolean disabled)InputElementBuilder<HTMLInputElement>inputElement()CheckboxonChange(ChangeHandler<Checkbox,Boolean> changeHandler)Defines a change handler that is called when thevalue()of this checkbox changes.Checkboxrequired(boolean required)Checkboxreversed()Checkboxstandalone()Same as standalone(true)Checkboxstandalone(boolean removeLabel)Checkboxthat()Booleanvalue()Checkboxvalue(boolean checked)Same as value(checked, false)Checkboxvalue(boolean checked, boolean fireEvent)Sets thecheckedattribute of the input element.-
Methods inherited from class org.patternfly.component.BaseComponent
componentType, element
-
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface org.jboss.elemento.Container
add, add, add, addAll, addAll, addAll, addAll, addAll, addAll
-
Methods inherited from interface org.jboss.elemento.HasElement
add, apply, aria, aria, aria, attr, attr, attr, classList, classList, css, id, id, innerHtml, on, run, textContent, textNode, toggle, toggle, toggle, uniqueId
-
Methods inherited from interface org.jboss.elemento.HasHTMLElement
data, hidden, style, style, style, style, style, style, title
-
Methods inherited from interface org.patternfly.style.Modifiers.Disabled
disabled, isDisabled
-
Methods inherited from interface org.patternfly.style.Modifiers.Required
required
-
-
-
-
Method Detail
-
addBody
public Checkbox addBody(CheckboxBody body)
-
addDescription
public Checkbox addDescription(CheckboxDescription description)
-
disabled
public Checkbox disabled(boolean disabled)
- Specified by:
disabledin interfaceModifiers.Disabled<HTMLElement,Checkbox>
-
required
public Checkbox required(boolean required)
- Specified by:
requiredin interfaceModifiers.Required<HTMLElement,Checkbox>
-
reversed
public Checkbox reversed()
-
standalone
public Checkbox standalone()
Same as standalone(true)
-
standalone
public Checkbox standalone(boolean removeLabel)
-
value
public Checkbox value(boolean checked)
Same as value(checked, false)
-
value
public Checkbox value(boolean checked, boolean fireEvent)
Sets thecheckedattribute of the input element.
-
applyTo
public Checkbox applyTo(Consumer<InputElementBuilder<HTMLInputElement>> consumer)
Provides access to the underlying checkbox element using a fluent API style
-
that
public Checkbox that()
- Specified by:
thatin interfaceTypedBuilder<HTMLElement,Checkbox>
-
onChange
public Checkbox onChange(ChangeHandler<Checkbox,Boolean> changeHandler)
Defines a change handler that is called when thevalue()of this checkbox changes.
-
inputElement
public InputElementBuilder<HTMLInputElement> inputElement()
-
-