Package org.patternfly.component.switch_
Class Switch
java.lang.Object
org.patternfly.component.BaseComponent<HTMLLabelElement,Switch>
org.patternfly.component.switch_.Switch
- All Implemented Interfaces:
Attachable,ElementAttributeMethods<HTMLLabelElement,,Switch> ElementClassListMethods<HTMLLabelElement,,Switch> ElementConsumerMethods<HTMLLabelElement,,Switch> ElementContainerMethods<HTMLLabelElement,,Switch> ElementEventMethods<HTMLLabelElement,,Switch> ElementIdMethods<HTMLLabelElement,,Switch> ElementQueryMethods<HTMLLabelElement>,HTMLElementAttributeMethods<HTMLLabelElement,,Switch> HTMLElementDataMethods<HTMLLabelElement,,Switch> HTMLElementStyleMethods<HTMLLabelElement,,Switch> HTMLElementVisibilityMethods<HTMLLabelElement,,Switch> IsElement<HTMLLabelElement>,TypedBuilder<HTMLLabelElement,,Switch> Component,HasValue<Boolean>,org.patternfly.style.Modifiers.Disabled<HTMLLabelElement,,Switch> org.patternfly.style.Modifiers.Readonly<HTMLLabelElement,Switch>
public class Switch
extends BaseComponent<HTMLLabelElement,Switch>
implements HasValue<Boolean>, org.patternfly.style.Modifiers.Disabled<HTMLLabelElement,Switch>, org.patternfly.style.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<HTMLInputElementBuilder<HTMLInputElement>> consumer) Provides access to the underlying checkbox element using a fluent API stylevoidattach(MutationRecord mutationRecord) Same as checkIcon(true)checkIcon(boolean checkIcon) disabled(boolean disabled) readonly(boolean readonly) reversed()Same as reversed(true)reversed(boolean reversed) static Switchstatic Switchthat()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.Attachable
detachMethods inherited from interface org.jboss.elemento.ElementAttributeMethods
aria, aria, aria, attr, attr, attr, role, roleMethods inherited from interface org.jboss.elemento.ElementClassListMethods
classList, classList, css, toggle, toggle, toggleMethods inherited from interface org.jboss.elemento.ElementConsumerMethods
apply, runMethods inherited from interface org.jboss.elemento.ElementContainerMethods
add, add, add, add, addAll, addAll, addAll, addAll, addAll, addAllMethods inherited from interface org.jboss.elemento.ElementEventMethods
on, on, onMethods inherited from interface org.jboss.elemento.ElementIdMethods
id, uniqueIdMethods inherited from interface org.jboss.elemento.ElementQueryMethods
closest, querySelector, querySelectorAllMethods inherited from interface org.jboss.elemento.HTMLElementAttributeMethods
titleMethods inherited from interface org.jboss.elemento.HTMLElementDataMethods
dataMethods inherited from interface org.jboss.elemento.HTMLElementStyleMethods
style, style, style, style, style, styleMethods inherited from interface org.jboss.elemento.HTMLElementVisibilityMethods
hiddenMethods inherited from interface org.patternfly.style.Modifiers.Disabled
disabled, isDisabledMethods inherited from interface org.patternfly.style.Modifiers.Readonly
readonly
-
Method Details
-
switch_
-
switch_
-
attach
- Specified by:
attachin interfaceAttachable
-
disabled
- Specified by:
disabledin interfaceorg.patternfly.style.Modifiers.Disabled<HTMLLabelElement,Switch>
-
checkIcon
Same as checkIcon(true) -
checkIcon
-
label
-
readonly
- Specified by:
readonlyin interfaceorg.patternfly.style.Modifiers.Readonly<HTMLLabelElement,Switch>
-
reversed
Same as reversed(true) -
reversed
-
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<HTMLLabelElement,Switch>
-
ariaLabel
-
onChange
-
value
-
inputElement
-