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>, Modifiers.Disabled<HTMLLabelElement, Switch>, Modifiers.Readonly<HTMLLabelElement, Switch>
public class Switch
extends BaseComponent<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<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) Adds/removes modifier(disabled)onChange(ChangeHandler<Switch, Boolean> changeHandler) readonly(boolean readonly) Adds/removes modifier(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 BaseComponent
componentType, element, registerComponentMethods inherited from class Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface Attachable
detachMethods inherited from interface ElementAttributeMethods
aria, aria, aria, attr, attr, attr, role, roleMethods inherited from interface ElementClassListMethods
classList, classList, css, toggle, toggle, toggleMethods inherited from interface ElementConsumerMethods
apply, runMethods inherited from interface ElementContainerMethods
add, add, add, add, addAll, addAll, addAll, addAll, addAll, addAllMethods inherited from interface ElementEventMethods
on, on, onMethods inherited from interface ElementIdMethods
id, uniqueIdMethods inherited from interface ElementQueryMethods
closest, querySelector, querySelectorAllMethods inherited from interface HTMLElementAttributeMethods
titleMethods inherited from interface HTMLElementDataMethods
data, dataMethods inherited from interface HTMLElementVisibilityMethods
hiddenMethods inherited from interface Modifiers.Disabled
disabled, isDisabledMethods inherited from interface Modifiers.Readonly
readonly
-
Method Details
-
switch_
-
switch_
-
attach
- Specified by:
attachin interfaceAttachable
-
disabled
Description copied from interface:Modifiers.DisabledAdds/removes modifier(disabled)- Specified by:
disabledin interfaceModifiers.Disabled<HTMLLabelElement, Switch>
-
checkIcon
Same as checkIcon(true) -
checkIcon
-
label
-
readonly
Description copied from interface:Modifiers.ReadonlyAdds/removes modifier(readonly)- Specified by:
readonlyin interfaceModifiers.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
-