Property Change Source interfaces.

Including in your project

To add this to your project add the jar file to your classpath and add the following to your GWT module file:

<inherits name="org.mcarthur.sandy.gwt.event.property.PropertyChange"/>

This module depents on the java.bean package emulation provided by GWTx.

Example Usage

The most basic usage is to create a private PropertyChangeSupport field and delegate to it.

class Foo {
    private Object bar;
    private PropertyChangeSupport pce = new PropertyChangeSupport(this);

    public void setBar(Object bar) {
        Object old = this.bar;
        this.bar = bar;
        pce.firePropertyChange("bar", old, bar);
    }

    public void addPropertyChangeListener(PropertyChangeListener pcl) {
        pce.addPropertyChangeListener(pcl);
    }
}