Package org.patternfly.component.switch_
Class Switch
java.lang.Object
org.patternfly.component.BaseComponentFlat<elemental2.dom.HTMLLabelElement,Switch>
org.patternfly.component.switch_.Switch
- All Implemented Interfaces:
Attachable,Finder<elemental2.dom.HTMLLabelElement>,HasElement<elemental2.dom.HTMLLabelElement,,Switch> HasHTMLElement<elemental2.dom.HTMLLabelElement,,Switch> IsElement<elemental2.dom.HTMLLabelElement>,TypedBuilder<elemental2.dom.HTMLLabelElement,,Switch> Component,HasValue<Boolean>,Modifiers.Disabled<elemental2.dom.HTMLLabelElement,,Switch> Modifiers.Readonly<elemental2.dom.HTMLLabelElement,Switch>
public class Switch
extends BaseComponentFlat<elemental2.dom.HTMLLabelElement,Switch>
implements HasValue<Boolean>, Modifiers.Disabled<elemental2.dom.HTMLLabelElement,Switch>, Modifiers.Readonly<elemental2.dom.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.
-
Method Summary
Modifier and TypeMethodDescriptionapplyTo(Consumer<InputElementBuilder<elemental2.dom.HTMLInputElement>> consumer) Provides access to the underlying checkbox element using a fluent API stylevoidattach(elemental2.dom.MutationRecord mutationRecord) Same as checkIcon(true)checkIcon(boolean checkIcon) disabled(boolean disabled) InputElementBuilder<elemental2.dom.HTMLInputElement>onChange(ChangeHandler<Switch, Boolean> changeHandler) 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.BaseComponentFlat
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.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.Readonly
readonly
-
Method Details
-
switch_
-
switch_
-
attach
public void attach(elemental2.dom.MutationRecord mutationRecord) - Specified by:
attachin interfaceAttachable
-
disabled
- Specified by:
disabledin interfaceModifiers.Disabled<elemental2.dom.HTMLLabelElement,Switch>
-
checkIcon
Same as checkIcon(true) -
checkIcon
-
label
-
label
-
readonly
- Specified by:
readonlyin interfaceModifiers.Readonly<elemental2.dom.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<elemental2.dom.HTMLLabelElement,Switch>
-
ariaLabel
-
onChange
-
value
-
inputElement
-