Example usage for java.beans PropertyChangeEvent setPropagationId

List of usage examples for java.beans PropertyChangeEvent setPropagationId

Introduction

In this page you can find the example usage for java.beans PropertyChangeEvent setPropagationId.

Prototype

public void setPropagationId(Object propagationId) 

Source Link

Document

Sets the propagationId object for the event.

Usage

From source file:org.jbb.lib.properties.UpdateFilePropertyChangeListener.java

@Override
public void propertyChange(PropertyChangeEvent evt) {
    for (String propertyFile : propFiles) {
        try {/*from  w w  w . j  a  v a2s .co m*/
            FileBasedConfigurationBuilder<PropertiesConfiguration> builder = new FileBasedConfigurationBuilder<>(
                    PropertiesConfiguration.class).configure(
                            new Parameters().properties().setFileName(propertyFile).setIncludesAllowed(false));
            builder.setAutoSave(true);
            PropertiesConfiguration conf = builder.getConfiguration();
            evt.setPropagationId(propertyFile);
            conf.setProperty(evt.getPropertyName(), evt.getNewValue());
        } catch (ConfigurationException e) {
            throw new IllegalArgumentException(e);
        }
    }
}