Package org.patternfly.component.form
Class TextInput
- java.lang.Object
-
- org.patternfly.component.BaseComponent<E,B>
-
- org.patternfly.component.form.FormControl<HTMLElement,TextInput>
-
- org.patternfly.component.form.TextInput
-
- All Implemented Interfaces:
Container<HTMLElement,TextInput>,Finder<HTMLElement>,HasElement<HTMLElement,TextInput>,HasHTMLElement<HTMLElement,TextInput>,IsElement<HTMLElement>,TypedBuilder<HTMLElement,TextInput>,Component,HasValue<String>,WithIcon<HTMLElement,TextInput>,WithText<HTMLElement,TextInput>,Modifiers.Disabled<HTMLElement,TextInput>,Modifiers.Plain<HTMLElement,TextInput>,Modifiers.Readonly<HTMLElement,TextInput>,Modifiers.Required<HTMLElement,TextInput>
public class TextInput extends FormControl<HTMLElement,TextInput> implements HasValue<String>, Modifiers.Plain<HTMLElement,TextInput>, Modifiers.Readonly<HTMLElement,TextInput>, WithIcon<HTMLElement,TextInput>, WithText<HTMLElement,TextInput>
A text input is used to gather free-form text from a user.
-
-
Method Summary
-
Methods inherited from class org.patternfly.component.form.FormControl
disabled, validated
-
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.Plain
plain
-
Methods inherited from interface org.patternfly.style.Modifiers.Readonly
readonly
-
Methods inherited from interface org.patternfly.style.Modifiers.Required
required
-
-
-
-
Method Detail
-
textInput
public static TextInput textInput(TextInputType type, String id)
-
textInput
public static TextInput textInput(TextInputType type, String id, String value)
-
readonly
public TextInput readonly(boolean readonly)
- Specified by:
readonlyin interfaceModifiers.Readonly<HTMLElement,TextInput>
-
expanded
public TextInput expanded()
Same as expanded(true)
-
expanded
public TextInput expanded(boolean expanded)
Adds/removes modifier(expanded)
-
plain
public TextInput plain(boolean plain)
- Specified by:
plainin interfaceModifiers.Plain<HTMLElement,TextInput>
-
required
public TextInput required(boolean required)
- Specified by:
requiredin interfaceModifiers.Required<HTMLElement,TextInput>
-
text
public TextInput text(String text)
Same asvalue(String)- Specified by:
textin interfaceWithText<HTMLElement,TextInput>
-
value
public TextInput value(String value)
Same as value(value, false)
-
applyTo
public TextInput applyTo(Consumer<InputElementBuilder<HTMLInputElement>> consumer)
Provides access to the underlying input element using a fluent API style
-
icon
public TextInput icon(Element icon)
- Specified by:
iconin interfaceWithIcon<HTMLElement,TextInput>
-
removeIcon
public TextInput removeIcon()
- Specified by:
removeIconin interfaceWithIcon<HTMLElement,TextInput>
-
that
public TextInput that()
- Specified by:
thatin interfaceTypedBuilder<HTMLElement,TextInput>
-
onChange
public TextInput onChange(ChangeHandler<TextInput,String> changeHandler)
Defines a change handler that is called when thevalue()of this text input changes. Changes are detected by adding an event listener for the keyup event to the text input element.
-
inputElement
public InputElementBuilder<HTMLInputElement> inputElement()
Returns the underlying input element
-
-