Example usage for java.beans PropertyChangeSupport firePropertyChange

List of usage examples for java.beans PropertyChangeSupport firePropertyChange

Introduction

In this page you can find the example usage for java.beans PropertyChangeSupport firePropertyChange.

Prototype

public void firePropertyChange(String propertyName, boolean oldValue, boolean newValue) 

Source Link

Document

Reports a boolean bound property update to listeners that have been registered to track updates of all properties or a property with the specified name.

Usage

From source file:biz.wolschon.finance.jgnucash.widgets.TransactionSum.java

/**
 * @param aMaxDate The maxDate to set./*from w w w  . ja va  2 s .  c om*/
 * @throws JAXBException if we have issues with the XML-backend
 * @see #myMaxDate
 */
public void setMaxDate(final Date aMaxDate) throws JAXBException {
    //        if (aMaxDate == null) {
    //            throw new IllegalArgumentException("null 'aMaxDate' given!");
    //        }

    Object old = myMaxDate;
    if (old == aMaxDate) {
        return; // nothing has changed
    }
    myMaxDate = aMaxDate;
    // <<insert code to react further to this change here
    reCalculate();
    PropertyChangeSupport propertyChangeFirer = getPropertyChangeSupport();
    if (propertyChangeFirer != null) {
        propertyChangeFirer.firePropertyChange("aMaxDate", old, aMaxDate);
    }
}

From source file:org.cubictest.model.PropertyAwareObject.java

protected void firePropertyChange(String prop, Object old, Object newValue) {
    PropertyChangeSupport list = getListeners();
    list.firePropertyChange(prop, old, newValue);
}