Package 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 type
- All Implemented Interfaces:
HasValue.ValueChangeEvent<V>
,Serializable
- Direct Known Subclasses:
MultiSelectionEvent
,SingleSelectionEvent
- 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
ConstructorDescriptionComponentValueChangeEvent
(C source, HasValue<?, V> hasValue, V oldValue, boolean fromClient) Creates a new component value change event. -
Method Summary
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 Details
-
ComponentValueChangeEvent
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 Details
-
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
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
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
- Overrides:
toString
in classEventObject
-