Package com.storedobject.vaadin
Class ChangedValues
java.lang.Object
com.storedobject.vaadin.ChangedValues
A thin wrapper class that warps the details of value changed in a field (
HasValue.- Author:
- Syam
- See Also:
-
Constructor Summary
ConstructorsConstructorDescriptionChangedValues(com.vaadin.flow.component.HasValue.ValueChangeEvent<?> event) Constructor. -
Method Summary
Modifier and TypeMethodDescriptioncom.vaadin.flow.component.HasValue<?, ?> Get the field whose value is changed.<V> ChangedValue<V> getChanged(com.vaadin.flow.component.HasValue<?, V> field) Get the "value change" (appropriately type-casted).Get the old value.getValue()Get the current valie.booleanisChanged(com.vaadin.flow.component.HasValue<?, ?> field) Is this is this the field that is chaged?booleanCheck if the value change happened due to user interaction.
-
Constructor Details
-
ChangedValues
public ChangedValues(com.vaadin.flow.component.HasValue.ValueChangeEvent<?> event) Constructor.- Parameters:
event- Value change event
-
-
Method Details
-
isChanged
public boolean isChanged(com.vaadin.flow.component.HasValue<?, ?> field) Is this is this the field that is chaged?- Parameters:
field- Field to check- Returns:
- True or false.
-
getChanged
Get the "value change" (appropriately type-casted).- Type Parameters:
V- Field value type- Parameters:
field- Field to check- Returns:
- Type-casted version of "value change". (Returns
nullif this is not the field that changed its value).
-
getChanged
public com.vaadin.flow.component.HasValue<?,?> getChanged()Get the field whose value is changed.- Returns:
- Field.
-
getOldValue
-
getValue
-
isFromClient
public boolean isFromClient()Check if the value change happened due to user interaction.- Returns:
- True or false.
-