|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.jgoodies.common.bean.AbstractBean
com.jgoodies.binding.beans.Model
public abstract class Model
An abstract superclass that minimizes the effort required to provide change support for bound and constrained Bean properties. This class follows the conventions and recommendations as described in the Java Bean Specification.
Uses class ExtendedPropertyChangeSupport,
to enable the == or #equals test when
changing values.
TODO: Consider adding a method #fireChange that invokes
#firePropertyChange if and only if
new value != old value. The background is, that
#firePropertyChange must fire an event
if new value==null==old value.
Model,
PropertyChangeEvent,
PropertyChangeListener,
PropertyChangeSupport,
ExtendedPropertyChangeSupport,
VetoableChangeListener,
VetoableChangeSupport,
Serialized Form| Field Summary |
|---|
| Fields inherited from class com.jgoodies.common.bean.AbstractBean |
|---|
changeSupport |
| Constructor Summary | |
|---|---|
Model()
|
|
| Method Summary | |
|---|---|
protected PropertyChangeSupport |
createPropertyChangeSupport(Object bean)
Creates and returns a PropertyChangeSupport for the given bean. |
protected void |
firePropertyChange(String propertyName,
Object oldValue,
Object newValue,
boolean checkIdentity)
Support for reporting bound property changes for Object properties. |
| Methods inherited from class com.jgoodies.common.bean.AbstractBean |
|---|
addPropertyChangeListener, addPropertyChangeListener, addVetoableChangeListener, addVetoableChangeListener, fireIndexedPropertyChange, fireIndexedPropertyChange, fireIndexedPropertyChange, fireMultiplePropertiesChanged, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, fireVetoableChange, fireVetoableChange, fireVetoableChange, fireVetoableChange, fireVetoableChange, fireVetoableChange, fireVetoableChange, getPropertyChangeListeners, getPropertyChangeListeners, getVetoableChangeListeners, getVetoableChangeListeners, removePropertyChangeListener, removePropertyChangeListener, removeVetoableChangeListener, removeVetoableChangeListener |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public Model()
| Method Detail |
|---|
protected PropertyChangeSupport createPropertyChangeSupport(Object bean)
AbstractBean.addPropertyChangeListener(java.beans.PropertyChangeListener)
when lazily creating the sole change support instance used throughout
this bean.
This implementation creates an extended change support that allows
to configure whether the old and new value are compared with
== or equals.
createPropertyChangeSupport in class com.jgoodies.common.bean.AbstractBeanbean - the bean to create a change support for
protected final void firePropertyChange(String propertyName,
Object oldValue,
Object newValue,
boolean checkIdentity)
The boolean parameter specifies whether the old and new value are
compared with == or equals.
propertyName - the property whose value has changedoldValue - the property's previous valuenewValue - the property's new valuecheckIdentity - true to check differences using ==
false to use equals.
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||