com.vaadin.ui.
Enum AbstractTextField.TextChangeEventMode
java.lang.Object
java.lang.Enum<AbstractTextField.TextChangeEventMode>
com.vaadin.ui.AbstractTextField.TextChangeEventMode
All Implemented Interfaces:
Serializable, Comparable<AbstractTextField.TextChangeEventMode>
Enclosing class:
- extends Enum<AbstractTextField.TextChangeEventMode>
public static enum AbstractTextField.TextChangeEventMode
Different modes how the TextField can trigger FieldEvents.TextChangeEvent
s.
Enum Constant Summary | |
---|---|
EAGER
An event is triggered on each text content change, most commonly key press events. |
|
LAZY
An event is triggered when there is a pause of text modifications. |
|
TIMEOUT
Each text change event in the UI causes the event to be communicated to the application after a timeout. |
Method Summary | |
---|---|
static AbstractTextField.TextChangeEventMode |
valueOf(String name)
Returns the enum constant of this type with the specified name. |
static AbstractTextField.TextChangeEventMode[] |
values()
Returns an array containing the constants of this enum type, in the order they're declared. |
Methods inherited from class java.lang.Enum |
---|
clone, compareTo, equals, getDeclaringClass, hashCode, name, ordinal, toString, valueOf |
Methods inherited from class java.lang.Object |
---|
finalize, getClass, notify, notifyAll, wait, wait, wait |
Enum Constant Detail |
---|
EAGER
public static final AbstractTextField.TextChangeEventMode EAGER
An event is triggered on each text content change, most commonly key press events.
TIMEOUT
public static final AbstractTextField.TextChangeEventMode TIMEOUT
Each text change event in the UI causes the event to be communicated
to the application after a timeout. The length of the timeout can be
controlled with TextField#setInputEventTimeout(int)
. Only the
last input event is reported to the server side if several text
change events happen during the timeout.
In case of a ValueChangeEvent
the schedule is not kept
strictly. Before a ValueChangeEvent
a FieldEvents.TextChangeEvent
is triggered if the text content has changed since the previous
TextChangeEvent regardless of the schedule.
LAZY
public static final AbstractTextField.TextChangeEventMode LAZY
An event is triggered when there is a pause of text modifications.
The length of the pause can be modified with
TextField#setInputEventTimeout(int)
. Like with the
TIMEOUT
mode, an event is forced before
ValueChangeEvent
s, even if the user did not keep a pause
while entering the text.
This is the default mode.
Method Detail |
---|
values
public static final AbstractTextField.TextChangeEventMode[] values()
- Returns:
- an array containing the constants of this enum type, in the order they're declared
Returns an array containing the constants of this enum type, in the order they're declared. This method may be used to iterate over the constants as follows:
for(AbstractTextField.TextChangeEventMode c : AbstractTextField.TextChangeEventMode.values())
System.out.println(c);
valueOf
public static AbstractTextField.TextChangeEventMode valueOf(String name)
- Parameters:
name
- the name of the enum constant to be returned.- Returns:
- the enum constant with the specified name
- Throws:
IllegalArgumentException
- if this enum type has no constant with the specified name
Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (Extraneous whitespace characters are not permitted.)