List of usage examples for java.util.prefs PreferenceChangeEvent getNode
public Preferences getNode()
From source file:Main.java
public static void main(String[] argv) throws Exception { Preferences prefs = Preferences.userNodeForPackage(String.class); prefs.addPreferenceChangeListener(new PreferenceChangeListener() { public void preferenceChange(PreferenceChangeEvent evt) { Preferences node = evt.getNode(); String key = evt.getKey(); String newValue = evt.getNewValue(); }/*w w w . j a v a 2 s.c o m*/ }); prefs.put("key", "a string"); prefs.put("key", "a new string"); prefs.remove("key"); }
From source file:org.apache.cayenne.modeler.ModelerPreferences.java
public void preferenceChange(PreferenceChangeEvent evt) { evt.getNode().put(evt.getKey(), evt.getNewValue()); }
From source file:org.apache.cayenne.modeler.preferences.ModelerPreferences.java
@Override public void preferenceChange(PreferenceChangeEvent evt) { evt.getNode().put(evt.getKey(), evt.getNewValue()); }