V
- the value typepublic static class HasValue.ValueChangeEvent<V> extends EventObject implements HasUserOriginated
HasValue
changes.source
Constructor and Description |
---|
ValueChangeEvent(Component component,
HasValue<V> hasValue,
V oldValue,
boolean userOriginated)
Creates a new
ValueChange event containing the given value,
originating from the given source component. |
ValueChangeEvent(COMPONENT component,
V oldValue,
boolean userOriginated)
Creates a new
ValueChange event containing the current value
of the given value-bearing source component. |
Modifier and Type | Method and Description |
---|---|
Component |
getComponent()
Returns the component.
|
V |
getOldValue()
Returns the value of the source before this value change event
occurred.
|
HasValue<V> |
getSource() |
V |
getValue()
Returns the new value that triggered this value change event.
|
boolean |
isUserOriginated()
Returns whether this event was triggered by user interaction, on the
client side, or programmatically, on the server side.
|
toString
public ValueChangeEvent(COMPONENT component, V oldValue, boolean userOriginated)
ValueChange
event containing the current value
of the given value-bearing source component.COMPONENT
- the type of the source componentcomponent
- the source component bearing the value, not nulloldValue
- the previous value held by the source of this eventuserOriginated
- true
if this event originates from the client,
false
otherwise.public ValueChangeEvent(Component component, HasValue<V> hasValue, V oldValue, boolean userOriginated)
ValueChange
event containing the given value,
originating from the given source component.component
- the component, not nullhasValue
- the HasValue instance bearing the value, not nulloldValue
- the previous value held by the source of this eventuserOriginated
- true
if this event originates from the client,
false
otherwise.public V getOldValue()
public V getValue()
public boolean isUserOriginated()
HasUserOriginated
isUserOriginated
in interface HasUserOriginated
true
if this event originates from the client,
false
otherwise.public Component getComponent()
public HasValue<V> getSource()
getSource
in class EventObject
Copyright © 2017 Vaadin Ltd. All rights reserved.