Code example for PropertyChangeSupport

Methods: addPropertyChangeListener

0
        log = Logger.getLogger(Settings.class); 
        propSupport = new PropertyChangeSupport(this);
    } 
 
    public void addListener(String name, PropertyChangeListener listener) {
        propSupport.addPropertyChangeListener(name, listener);
    } 
 
    public void removeListener(String name, PropertyChangeListener listener) {
        propSupport.removePropertyChangeListener(name, listener);
    } 
 
    public void destroyPreferences() { 
        try { 
            getPreferences().removeNode();
        } catch (BackingStoreException e) {
            log.error("Failed to destroy app settings", e);
        } 
    } 
 
    public void dump() {