Code example for Preferences

Methods: put

0
	public PreferencesStore() { 
		prefs = Preferences.userRoot().node(Preferences.class.getName());
	} 
 
	public void saveQuery(final String query) {
		prefs.put(SAVED_QUERY, query);
	} 
 
	public void saveLoadedFile(final String absolutePath) {
		prefs.put(LOADED_FILE, absolutePath);
	} 
 
	public boolean hasLoadedFile() { 
		String file = prefs.get(LOADED_FILE, null);
		return file != null;
	} 
 
	public String getLoadedFile() {
		return prefs.get(LOADED_FILE, null);
	}