public class PropertyStoreSupport
extends java.lang.Object
IPropertyStore. It
offers all methods defined by IPropertyStore, while not formally
implementing the interface, and can thus be used by a source
IPropertyStore as a delegate.
In addition to the source IPropertyStore a
PropertyChangeSupport is expected during construction. It will be
used to fire PropertyChangeEvents when property value changes, i.e.
whenever a call to setProperty(String, Object) results in a property
value being set, unset, or changed. The name of the property will be used as
the property name within all those events.
| Constructor and Description |
|---|
PropertyStoreSupport(IPropertyStore source,
java.beans.PropertyChangeSupport pcs)
Creates a new
PropertyStoreSupport for the given source
IPropertyStore and a related PropertyChangeSupport. |
| Modifier and Type | Method and Description |
|---|---|
java.lang.Object |
getProperty(java.lang.String name)
Retrieves the value of the property with the given name.
|
void |
setProperty(java.lang.String name,
java.lang.Object value)
Sets or updates the value of the property with the given name.
|
public PropertyStoreSupport(IPropertyStore source, java.beans.PropertyChangeSupport pcs)
PropertyStoreSupport for the given source
IPropertyStore and a related PropertyChangeSupport.source - The IPropertyStore that encloses the to be created
PropertyStoreSupport, delegating calls to it. May not
be nullpcs - An PropertyChangeSupport, which will be used to fire
PropertyChangeEvent's whenever properties are set or
unset. May not be null.public java.lang.Object getProperty(java.lang.String name)
name - The name of the property whose value is to be retrieved.IPropertyStore.getProperty(String)public void setProperty(java.lang.String name,
java.lang.Object value)
PropertyStoreSupport to notify registered
PropertyChangeListeners in case a property was set, unset, or
actually changed, suppressing change events in case the passed in value
is equal to the old value.name - The name of the property whose value it to set/change.value - The new or initial value to set.IPropertyStore.setProperty(String, Object)Copyright (c) 2014 itemis AG and others. All rights reserved.