Package com.vaadin.flow.dom
Class PropertyChangeEvent
- java.lang.Object
-
- java.util.EventObject
-
- com.vaadin.flow.dom.PropertyChangeEvent
-
- All Implemented Interfaces:
Serializable
public class PropertyChangeEvent extends EventObject
An event fired when the value of a property changes.- Since:
- 1.0
- See Also:
- Serialized Form
-
-
Field Summary
-
Fields inherited from class java.util.EventObject
source
-
-
Constructor Summary
Constructors Constructor Description PropertyChangeEvent(Element element, String propertyName, Serializable oldValue, boolean userOriginated)Creates a newPropertyChangeEventevent containing the current property value of the given element.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description SerializablegetOldValue()Returns the value of the source before this value change event occurred.StringgetPropertyName()Returns the property name.ElementgetSource()SerializablegetValue()Returns the new value that triggered this value change event.booleanisUserOriginated()Returns whether this event was triggered by user interaction, on the client side, or programmatically, on the server side.-
Methods inherited from class java.util.EventObject
toString
-
-
-
-
Constructor Detail
-
PropertyChangeEvent
public PropertyChangeEvent(Element element, String propertyName, Serializable oldValue, boolean userOriginated)
Creates a newPropertyChangeEventevent containing the current property value of the given element.- Parameters:
element- the source element owning the property, not nullpropertyName- the property nameoldValue- the previous value held by the source of this eventuserOriginated-trueif this event originates from the client,falseotherwise.
-
-
Method Detail
-
getOldValue
public Serializable getOldValue()
Returns the value of the source before this value change event occurred.- Returns:
- the value previously held by the source of this event
-
getValue
public Serializable getValue()
Returns the new value that triggered this value change event.- Returns:
- the new value
-
isUserOriginated
public boolean isUserOriginated()
Returns whether this event was triggered by user interaction, on the client side, or programmatically, on the server side.- Returns:
trueif this event originates from the client,falseotherwise.
-
getPropertyName
public String getPropertyName()
Returns the property name.- Returns:
- the property name
-
getSource
public Element getSource()
- Overrides:
getSourcein classEventObject
-
-