public static int getSliceLabelBaseIndex() { return Prefs.getInt(PREF_SLICE_LABEL_BASE_INDEX, 1); }
public static int getSliceLabelBaseIndex() { return Prefs.getInt(PREF_SLICE_LABEL_BASE_INDEX, 1); }
/** Finds a color in IJ_Props or IJ_Prefs.txt. */ public static Color getColor(String key, Color defaultColor) { int i = getInt(key, 0xaaa); if (i == 0xaaa) return defaultColor; return new Color((i >> 16) & 0xFF, (i >> 8) & 0xFF, i & 0xFF); }
/** Finds a color in IJ_Props or IJ_Prefs.txt. */ public static Color getColor(String key, Color defaultColor) { int i = getInt(key, 0xaaa); if (i == 0xaaa) return defaultColor; return new Color((i >> 16) & 0xFF, (i >> 8) & 0xFF, i & 0xFF); }
/** Returns the number of threads used by PlugInFilters to process images and stacks. */ public static int getThreads() { if (threads==0) { threads = getInt(THREADS, 0); int processors = Runtime.getRuntime().availableProcessors(); if (threads<1 || threads>processors) threads = processors; } return threads; }
/** Returns the number of threads used by PlugInFilters to process images and stacks. */ public static int getThreads() { if (threads==0) { threads = getInt(THREADS, 0); int processors = Runtime.getRuntime().availableProcessors(); if (threads<1 || threads>processors) threads = processors; } return threads; }
public Point getPreferredLocation() { Rectangle maxBounds = GUI.getMaxWindowBounds(); int ijX = Prefs.getInt(IJ_X,-99); int ijY = Prefs.getInt(IJ_Y,-99); //System.out.println("getPreferredLoc1: "+ijX+" "+ijY+" "+maxBounds); if (ijX>=maxBounds.x && ijY>=maxBounds.y && ijX<(maxBounds.x+maxBounds.width-75)) return new Point(ijX, ijY); Dimension tbsize = toolbar.getPreferredSize(); int ijWidth = tbsize.width+10; double percent = maxBounds.width>832?0.8:0.9; ijX = (int)(percent*(maxBounds.width-ijWidth)); if (ijX<10) ijX = 10; return new Point(ijX, maxBounds.y); }
public Point getPreferredLocation() { Rectangle maxBounds = GUI.getMaxWindowBounds(); int ijX = Prefs.getInt(IJ_X,-99); int ijY = Prefs.getInt(IJ_Y,-99); //System.out.println("getPreferredLoc1: "+ijX+" "+ijY+" "+maxBounds); if (ijX>=maxBounds.x && ijY>=maxBounds.y && ijX<(maxBounds.x+maxBounds.width-75)) return new Point(ijX, ijY); Dimension tbsize = toolbar.getPreferredSize(); int ijWidth = tbsize.width+10; double percent = maxBounds.width>832?0.8:0.9; ijX = (int)(percent*(maxBounds.width-ijWidth)); if (ijX<10) ijX = 10; return new Point(ijX, maxBounds.y); }
static void loadOptions() { int defaultOptions = ANTIALIASING+AVOID_RESLICE_INTERPOLATION+ANTIALIASED_TOOLS+MULTI_POINT_MODE +(!IJ.isMacOSX()?RUN_SOCKET_LISTENER:0)+BLACK_BACKGROUND; int options = getInt(OPTIONS, defaultOptions); usePointerCursor = (options&USE_POINTER)!=0; int options2 = getInt(OPTIONS2, defaultOptions); useSystemProxies = (options2&USE_SYSTEM_PROXIES)!=0; useFileChooser = (options2&USE_FILE_CHOOSER)!=0;
static void loadOptions() { int defaultOptions = ANTIALIASING+AVOID_RESLICE_INTERPOLATION+ANTIALIASED_TOOLS+MULTI_POINT_MODE +(!IJ.isMacOSX()?RUN_SOCKET_LISTENER:0)+BLACK_BACKGROUND; int options = getInt(OPTIONS, defaultOptions); usePointerCursor = (options&USE_POINTER)!=0; int options2 = getInt(OPTIONS2, defaultOptions); useSystemProxies = (options2&USE_SYSTEM_PROXIES)!=0; useFileChooser = (options2&USE_FILE_CHOOSER)!=0;