Example usage for java.beans PropertyChangeListener propertyChange

List of usage examples for java.beans PropertyChangeListener propertyChange

Introduction

In this page you can find the example usage for java.beans PropertyChangeListener propertyChange.

Prototype


void propertyChange(PropertyChangeEvent evt);

Source Link

Document

This method gets called when a bound property is changed.

Usage

From source file:blue.Marker.java

private void firePropertyChangeEvent(PropertyChangeEvent pce) {
    if (listeners == null) {
        return;//w w  w.jav a  2 s  .c  o m
    }

    for (Iterator iter = listeners.iterator(); iter.hasNext();) {
        PropertyChangeListener listener = (PropertyChangeListener) iter.next();

        listener.propertyChange(pce);
    }
}

From source file:net.pandoragames.far.ui.swing.component.listener.CommandRename.java

private void firePropertyChangeEvent(String property, Object oldValue, Object newValue) {
    if ((propertyListener != null)
            && ((oldValue != null && !oldValue.equals(newValue)) || (oldValue == null && newValue != null))) {
        PropertyChangeEvent event = new PropertyChangeEvent(this, property, oldValue, newValue);
        for (PropertyChangeListener listener : propertyListener) {
            listener.propertyChange(event);
        }//from   www .j  ava 2s . c  o m
    }
}

From source file:blue.soundObject.pianoRoll.PianoNote.java

public void firePropertyChange(PropertyChangeEvent pce) {
    checkListenersExists();/*from   www .j a  va  2s  .c o  m*/

    for (Iterator iter = listeners.iterator(); iter.hasNext();) {
        PropertyChangeListener listener = (PropertyChangeListener) iter.next();
        listener.propertyChange(pce);
    }
}

From source file:jetbrains.buildServer.torrent.TorrentConfigurator.java

public void propertyChanged(String changedPropertyName, Object oldValue, Object newValue) {
    PropertyChangeEvent event = new PropertyChangeEvent(this, changedPropertyName, oldValue, newValue);
    for (PropertyChangeListener listener : myChangeListeners) {
        try {/*  w w w.  j ava 2  s  .com*/
            listener.propertyChange(event);
        } catch (Exception ex) {
        }
    }
}

From source file:blue.mixer.Channel.java

public void firePropertyChange(String propertyName, Object oldVal, Object newVal) {
    if (listeners == null || listeners.size() == 0) {
        return;/* w  w w. j a v a2  s.c  o m*/
    }

    PropertyChangeEvent pce = new PropertyChangeEvent(this, propertyName, oldVal, newVal);

    for (Iterator<PropertyChangeListener> it = listeners.iterator(); it.hasNext();) {
        PropertyChangeListener pcl = it.next();

        pcl.propertyChange(pce);

    }
}

From source file:org.eclipse.virgo.ide.runtime.internal.core.Server.java

protected void fireConfigurationChanged(String key, Object oldValue, Object newValue) {
    PropertyChangeEvent event = new PropertyChangeEvent(this, key, oldValue, newValue);
    for (PropertyChangeListener listener : listeners) {
        listener.propertyChange(event);
    }//from   w  w w  .  ja v a  2s. c o m
}

From source file:com.tulskiy.musique.system.configuration.Configuration.java

public void addPropertyChangeListener(String propertyName, boolean initialize,
        PropertyChangeListener listener) {
    addPropertyChangeListener(propertyName, listener);
    if (initialize)
        listener.propertyChange(new PropertyChangeEvent(this, propertyName, null, get(propertyName)));
}

From source file:blue.soundObject.tracker.Track.java

public void firePropertyChange(String propertyName, Object oldVal, Object newVal) {
    if (listeners == null || listeners.size() == 0) {
        return;/*from  w ww  .java  2 s  .c o m*/
    }

    PropertyChangeEvent pce = new PropertyChangeEvent(this, propertyName, oldVal, newVal);

    for (Iterator it = listeners.iterator(); it.hasNext();) {
        PropertyChangeListener pcl = (PropertyChangeListener) it.next();

        pcl.propertyChange(pce);

    }
}

From source file:com.itemanalysis.jmetrik.gui.JmetrikPreferencesManager.java

public synchronized void firePropertyChange(String propertyName, Object oldValue, Object newValue) {
    PropertyChangeEvent e = new PropertyChangeEvent(this, propertyName, oldValue, newValue);
    for (PropertyChangeListener l : propertyChangeListeners) {
        l.propertyChange(e);
    }//from  www. j av a  2 s .c om
}

From source file:org.ngrinder.infra.config.Config.java

protected void initHomeMonitor() {
    checkNotNull(home);/* w w  w.  ja v  a  2 s  . c  om*/
    this.announcementWatchDog = new FileWatchdog(getHome().getSubFile("announcement.conf").getAbsolutePath()) {
        @Override
        protected void doOnChange() {
            CoreLogger.LOGGER.info("Announcement file is changed.");
            loadAnnouncement();
        }
    };
    announcementWatchDog.setName("WatchDog - announcement.conf");
    announcementWatchDog.setDelay(2000);
    announcementWatchDog.start();
    this.systemConfWatchDog = new FileWatchdog(getHome().getSubFile("system.conf").getAbsolutePath()) {
        @Override
        protected void doOnChange() {
            try {
                CoreLogger.LOGGER.info("System configuration(system.conf) is changed.");
                loadProperties();
                systemConfListeners.apply(new Informer<PropertyChangeListener>() {
                    @Override
                    public void inform(PropertyChangeListener listener) {
                        listener.propertyChange(null);
                    }
                });
                CoreLogger.LOGGER.info("New system configuration is applied.");
            } catch (Exception e) {
                CoreLogger.LOGGER.error("Error occurs while applying new system configuration", e);
            }

        }
    };
    systemConfWatchDog.setName("WatchDoc - system.conf");
    systemConfWatchDog.setDelay(2000);
    systemConfWatchDog.start();

    String processThreadPolicyPath = getHome().getSubFile("process_and_thread_policy.js").getAbsolutePath();
    this.policyJsWatchDog = new FileWatchdog(processThreadPolicyPath) {
        @Override
        protected void doOnChange() {
            CoreLogger.LOGGER.info("process_and_thread_policy file is changed.");
            policyScript = "";
        }
    };
    policyJsWatchDog.setName("WatchDoc - process_and_thread_policy.js");
    policyJsWatchDog.setDelay(2000);
    policyJsWatchDog.start();
}