com.vaadin.flow.component.
Class AbstractField.ComponentValueChangeEvent<C extends Component,V>
- java.lang.Object
-
- java.util.EventObject
-
- com.vaadin.flow.component.ComponentEvent<C>
-
- com.vaadin.flow.component.AbstractField.ComponentValueChangeEvent<C,V>
-
Type Parameters:
C
- the source component typeV
- the value typeAll Implemented Interfaces:
Direct Known Subclasses:
Enclosing class:
AbstractField<C extends AbstractField<C,T>,T>
public static class AbstractField.ComponentValueChangeEvent<C extends Component,V> extends ComponentEvent<C> implements HasValue.ValueChangeEvent<V>
Value change event fired by components.
Since:
1.0
Author:
Vaadin Ltd
See Also:
-
-
Field Summary
-
Fields inherited from class java.util.EventObject
source
-
-
Constructor Summary
Constructors Constructor Description ComponentValueChangeEvent(C source, HasValue<?,V> hasValue, V oldValue, boolean fromClient)
Creates a new component value change event.
-
Method Summary
All Methods Modifier and Type Method Description HasValue<?,V>
getHasValue()
V
getOldValue()
Returns the value of the source before this value change event occurred.
V
getValue()
Returns the new value that triggered this value change event.
String
toString()
-
Methods inherited from class com.vaadin.flow.component.ComponentEvent
getSource, isFromClient, unregisterListener
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface com.vaadin.flow.component.HasValue.ValueChangeEvent
isFromClient
-
-
-
-
Constructor Detail
-
ComponentValueChangeEvent
public ComponentValueChangeEvent(C source, HasValue<?,V> hasValue, V oldValue, boolean fromClient)
Creates a new component value change event.
Parameters:
source
- the source componenthasValue
- the HasValue from which the value originatesoldValue
- the old valuefromClient
- whether the value change originated from the client
-
-
Method Detail
-
getOldValue
public V getOldValue()
Description copied from interface:
HasValue.ValueChangeEvent
Returns the value of the source before this value change event occurred.
Specified by:
getOldValue
in interfaceHasValue.ValueChangeEvent<C extends Component>
Returns:
the value previously held by the source of this event
-
getValue
public V getValue()
Description copied from interface:
HasValue.ValueChangeEvent
Returns the new value that triggered this value change event.
Specified by:
getValue
in interfaceHasValue.ValueChangeEvent<C extends Component>
Returns:
the new value
-
getHasValue
public HasValue<?,V> getHasValue()
This is typically the same instance as
ComponentEvent.getSource()
, but in some cases theHasValue
implementation is separated from the component implementation.Specified by:
getHasValue
in interfaceHasValue.ValueChangeEvent<C extends Component>
-
toString
public String toString()
Overrides:
toString
in classEventObject
-
-