All Downloads are FREE. Search and download functionalities are using the official Maven repository.

org.bidib.wizard.mvc.pom.view.CurrentAddressBeanModel Maven / Gradle / Ivy

There is a newer version: 2.0.0-M1
Show newest version
package org.bidib.wizard.mvc.pom.view;

import org.slf4j.Logger;
import org.slf4j.LoggerFactory;

import com.jgoodies.binding.beans.Model;

public class CurrentAddressBeanModel extends Model {
    private static final long serialVersionUID = 1L;

    private static final Logger LOGGER = LoggerFactory.getLogger(CurrentAddressBeanModel.class);

    public static final String PROPERTYNAME_ADDRESS = "address";

    public static final String PROPERTYNAME_ADDRESS_CHANGED = "addressChanged";

    private Integer address;

    private Boolean addressChanged = Boolean.FALSE;

    public CurrentAddressBeanModel() {

    }

    /**
     * @return the address
     */
    public Integer getAddress() {
        return address;
    }

    /**
     * @param address
     *            the address to set
     */
    public void setAddress(Integer address) {
        LOGGER.info("Set the new address: {}", address);
        Integer oldAddress = this.address;
        this.address = address;
        firePropertyChange(PROPERTYNAME_ADDRESS, oldAddress, address);
    }

    /**
     * @return the addressChanged
     */
    public Boolean getAddressChanged() {
        return addressChanged;
    }

    /**
     * @param addressChanged
     *            the addressChanged to set
     */
    public void setAddressChanged(Boolean addressChanged) {
        LOGGER.info("Set the address changed flag: {}", addressChanged);
        Boolean oldValue = this.addressChanged;
        this.addressChanged = addressChanged;
        firePropertyChange(PROPERTYNAME_ADDRESS_CHANGED, oldValue, addressChanged);
    }
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy