Package com.vaadin.client.ui.textfield
Class ValueChangeHandler
- java.lang.Object
-
- com.vaadin.client.ui.textfield.ValueChangeHandler
-
public class ValueChangeHandler extends Object
Helper for dealing with scheduling value change events based on a given mode and possibly timeout.- Since:
- 8.0
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static interface
ValueChangeHandler.Owner
Must be implemented by any user of a ValueChangeHandler.
-
Constructor Summary
Constructors Constructor Description ValueChangeHandler(ValueChangeHandler.Owner owner)
Creates a value change handler for the given owner.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
isScheduled()
Checks whether the value change is scheduled for sending.void
scheduleValueChange()
Called whenever a change in the value has been detected.void
setValueChangeMode(ValueChangeMode valueChangeMode)
Sets the value change mode to use.void
setValueChangeTimeout(int valueChangeTimeout)
Sets the value change timeout to use.
-
-
-
Constructor Detail
-
ValueChangeHandler
public ValueChangeHandler(ValueChangeHandler.Owner owner)
Creates a value change handler for the given owner.- Parameters:
owner
- the owner connector
-
-
Method Detail
-
scheduleValueChange
public void scheduleValueChange()
Called whenever a change in the value has been detected. Schedules a value change to be sent to the server, depending on the current value change mode.Note that this method does not consider the
ValueChangeMode.BLUR
mode but assumes that#sendValueChange()
is called directly for this mode.
-
setValueChangeMode
public void setValueChangeMode(ValueChangeMode valueChangeMode)
Sets the value change mode to use.- Parameters:
valueChangeMode
- the value change mode to use- See Also:
ValueChangeMode
-
setValueChangeTimeout
public void setValueChangeTimeout(int valueChangeTimeout)
Sets the value change timeout to use.- Parameters:
valueChangeTimeout
- the value change timeout- See Also:
ValueChangeMode
-
isScheduled
public boolean isScheduled()
Checks whether the value change is scheduled for sending.- Returns:
true
if value change is scheduled for sending,false
otherwise- Since:
- 8.0
-
-