1 19 20 package org.netbeans.modules.j2ee.common.ui; 21 22 import java.util.prefs.Preferences ; 23 import org.openide.util.NbPreferences; 24 25 public class J2EEUISettings { 26 private static final J2EEUISettings INSTANCE = new J2EEUISettings(); 27 private static final String SHOW_AGAIN_BROKEN_REF_ALERT = "showAgainBrokenRefAlert"; private static final String SHOW_AGAIN_BROKEN_SERVER_ALERT = "showAgainBrokenServerAlert"; 30 public String displayName() { 31 return "J2EEUISettings"; } 33 34 private static Preferences getPreferences() { 35 return NbPreferences.forModule(J2EEUISettings.class); 36 } 37 38 public boolean isShowAgainBrokenRefAlert() { 39 return getPreferences().getBoolean(SHOW_AGAIN_BROKEN_REF_ALERT, true); 40 } 41 42 public void setShowAgainBrokenRefAlert(boolean again) { 43 getPreferences().putBoolean(SHOW_AGAIN_BROKEN_REF_ALERT, again); 44 } 45 46 public boolean isShowAgainBrokenServerAlert() { 47 return getPreferences().getBoolean(SHOW_AGAIN_BROKEN_SERVER_ALERT, true); 48 } 49 50 public void setShowAgainBrokenServerAlert(boolean again) { 51 getPreferences().putBoolean(SHOW_AGAIN_BROKEN_SERVER_ALERT, again); 52 } 53 54 public static J2EEUISettings getDefault() { 55 return INSTANCE; 56 } 57 58 } 59 | Popular Tags |