Code example for PropertyChangeSupport

Methods: fireIndexedPropertyChange

0
    public void fireIndexedPropertyChange(String property, int index, Object oldValue, Object newValue) {
        if ((this.state != null) && (this.state != Fire.IndexedPropertyBoolean) && (this.state != Fire.IndexedPropertyInteger))
            throw new Error("Illegal state: " + this.state);
 
        this.state = Fire.IndexedPropertyObject;
        super.fireIndexedPropertyChange(property, index, oldValue, newValue);
    } 
 
    @Override 
    public void fireIndexedPropertyChange(String property, int index, int oldValue, int newValue) {
        if (this.state != null)
            throw new Error("Illegal state: " + this.state);
 
        this.state = Fire.IndexedPropertyInteger;
        super.fireIndexedPropertyChange(property, index, oldValue, newValue);
    } 
 
    @Override 
    public void fireIndexedPropertyChange(String property, int index, boolean oldValue, boolean newValue) {
        if (this.state != null)
            throw new Error("Illegal state: " + this.state);