1 19 20 package org.netbeans.core.startup.preferences; 21 22 import java.util.prefs.Preferences ; 23 import java.util.prefs.PreferencesFactory ; 24 25 29 public class NbPreferencesFactory implements PreferencesFactory { 30 private static final String FACTORY = "java.util.prefs.PreferencesFactory"; 32 33 public NbPreferencesFactory() {} 34 35 public Preferences userRoot() { 36 return NbPreferences.userRootImpl(); 37 } 38 39 public Preferences systemRoot() { 40 return NbPreferences.systemRootImpl(); 41 } 42 43 public static void doRegistration() { 44 if (System.getProperty(FACTORY) == null) { 45 System.setProperty(FACTORY,NbPreferencesFactory.class.getName()); 46 } 47 } 48 } 49 | Popular Tags |