1 19 package org.netbeans.modules.web.examples; 20 21 import java.util.prefs.Preferences ; 22 import org.openide.util.NbBundle; 23 import org.openide.util.NbPreferences; 24 25 26 public class FoldersListSettings { 27 private static final FoldersListSettings INSTANCE = new FoldersListSettings(); 28 private static final String LAST_EXTERNAL_SOURCE_ROOT = "srcRoot"; private static final String NEW_PROJECT_COUNT = "newProjectCount"; 31 33 public String displayName() { 34 return NbBundle.getMessage (FoldersListSettings.class, "TXT_WebProjectFolderList"); } 36 37 private static Preferences getPreferences() { 38 return NbPreferences.forModule(FoldersListSettings.class); 39 } 40 41 public String getLastExternalSourceRoot () { 42 return getPreferences().get(LAST_EXTERNAL_SOURCE_ROOT, null); 43 } 44 45 public void setLastExternalSourceRoot (String path) { 46 getPreferences().put(LAST_EXTERNAL_SOURCE_ROOT, path); 47 } 48 49 public int getNewProjectCount () { 50 return getPreferences().getInt(NEW_PROJECT_COUNT, 0); 51 } 52 53 public void setNewProjectCount (int count) { 54 getPreferences().putInt(NEW_PROJECT_COUNT, count); 55 } 56 57 66 public static FoldersListSettings getDefault () { 67 return INSTANCE; 68 } 69 } 70 | Popular Tags |