1 19 20 package org.netbeans.modules.db.core; 21 22 import java.util.prefs.Preferences ; 23 import org.openide.util.NbBundle; 24 import org.openide.util.NbPreferences; 25 26 30 public class SQLOptions { 31 private static SQLOptions INSTANCE = new SQLOptions(); 32 private static final String PROP_FETCH_STEP = "fetchStep"; private static final int DEFAULT_FETCH_STEP = 200; 34 35 public static SQLOptions getDefault() { 36 return INSTANCE; 37 } 38 39 public String displayName() { 40 return NbBundle.getMessage(SQLOptions.class, "LBL_SQLOptions"); 41 } 42 43 private static Preferences getPreferences() { 44 return NbPreferences.forModule(SQLOptions.class); 45 } 46 47 public int getFetchStep() { 48 return getPreferences().getInt(PROP_FETCH_STEP, DEFAULT_FETCH_STEP); 49 } 50 51 public void setFetchStep(int value) { 52 getPreferences().putInt(PROP_FETCH_STEP, value); 53 } 54 } 55 | Popular Tags |