1 19 20 package org.netbeans.modules.java.actions; 21 22 import java.util.prefs.Preferences ; 23 import org.openide.util.NbPreferences; 24 25 29 final class UiOptions { 30 31 32 private UiOptions() {} 33 34 final static class GoToTypeDialog { 35 36 private static final String GO_TO_TYPE_DIALOG = "GoToTypeDialog"; 38 private static final String CASE_SENSITIVE = "caseSensitive"; private static final String WIDTH = "width"; private static final String HEIGHT = "height"; 42 private static Preferences node; 43 44 public static boolean getCaseSensitive() { 45 return getNode().getBoolean(CASE_SENSITIVE, false); 46 } 47 48 public static void setCaseSensitive( boolean caseSensitive) { 49 getNode().putBoolean(CASE_SENSITIVE, caseSensitive); 50 } 51 52 public static int getHeight() { 53 return getNode().getInt(HEIGHT, 460); 54 } 55 56 public static void setHeight( int height ) { 57 getNode().putInt(HEIGHT, height); 58 } 59 60 public static int getWidth() { 61 return getNode().getInt(WIDTH, 680); 62 } 63 64 public static void setWidth( int width ) { 65 getNode().putInt(WIDTH, width); 66 } 67 68 private static synchronized Preferences getNode() { 69 if ( node == null ) { 70 Preferences p = NbPreferences.forModule(UiOptions.class); 71 node = p.node(GO_TO_TYPE_DIALOG); 72 } 73 return node; 74 } 75 } 76 77 } 78 | Popular Tags |