Package org.patternfly.component.switch_
Class Switch
java.lang.Object
org.patternfly.component.BaseComponentFlat<HTMLLabelElement,Switch>
org.patternfly.component.switch_.Switch
- All Implemented Interfaces:
Attachable
,Finder<HTMLLabelElement>
,HasElement<HTMLLabelElement,
,Switch> HasHTMLElement<HTMLLabelElement,
,Switch> IsElement<HTMLLabelElement>
,TypedBuilder<HTMLLabelElement,
,Switch> Component
,HasValue<Boolean>
,Modifiers.Disabled<HTMLLabelElement,
,Switch> Modifiers.Readonly<HTMLLabelElement,
Switch>
public class Switch
extends BaseComponentFlat<HTMLLabelElement,Switch>
implements HasValue<Boolean>, Modifiers.Disabled<HTMLLabelElement,Switch>, Modifiers.Readonly<HTMLLabelElement,Switch>, Attachable
A switch toggles the state of a setting (between on and off). Switches and checkboxes can often be used interchangeably, but
the switch provides a more explicit, visible representation of a setting.
- See Also:
-
Method Summary
Modifier and TypeMethodDescriptionapplyTo
(Consumer<InputElementBuilder<HTMLInputElement>> consumer) Provides access to the underlying checkbox element using a fluent API stylevoid
attach
(MutationRecord mutationRecord) Same as checkIcon(true)checkIcon
(boolean checkIcon) disabled
(boolean disabled) onChange
(ChangeHandler<Switch, Boolean> changeHandler) readonly
(boolean readonly) reversed()
Same as reversed(true)reversed
(boolean reversed) static Switch
static Switch
that()
value()
value
(boolean checked) Same as value(checked, false)value
(boolean checked, boolean fireEvent) Sets thechecked
attribute of the input element.Methods inherited from class org.patternfly.component.BaseComponentFlat
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.Attachable
detach
Methods 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, 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.Readonly
readonly
-
Method Details
-
switch_
-
switch_
-
attach
- Specified by:
attach
in interfaceAttachable
-
disabled
- Specified by:
disabled
in interfaceModifiers.Disabled<HTMLLabelElement,
Switch>
-
checkIcon
Same as checkIcon(true) -
checkIcon
-
label
-
label
-
readonly
- Specified by:
readonly
in interfaceModifiers.Readonly<HTMLLabelElement,
Switch>
-
reversed
Same as reversed(true) -
reversed
-
value
Same as value(checked, false) -
value
Sets thechecked
attribute of the input element. -
applyTo
Provides access to the underlying checkbox element using a fluent API style -
that
- Specified by:
that
in interfaceTypedBuilder<HTMLLabelElement,
Switch>
-
ariaLabel
-
onChange
-
value
-
inputElement
-