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
ConstructorsConstructorDescriptionComponentValueChangeEvent(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, unregisterListenerMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods 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.ValueChangeEventReturns the value of the source before this value change event occurred.- Specified by:
getOldValuein interfaceHasValue.ValueChangeEvent<C extends Component>- Returns:
- the value previously held by the source of this event
-
getValue
Description copied from interface:HasValue.ValueChangeEventReturns the new value that triggered this value change event.- Specified by:
getValuein interfaceHasValue.ValueChangeEvent<C extends Component>- Returns:
- the new value
-
getHasValue
This is typically the same instance as
ComponentEvent.getSource(), but in some cases theHasValueimplementation is separated from the component implementation.- Specified by:
getHasValuein interfaceHasValue.ValueChangeEvent<C extends Component>
-
toString
- Overrides:
toStringin classEventObject
-