/** Saves the boolean variable <code>value</code> in the preferences file using the keyword <code>key</code>. This value can be retrieved using the appropriate <code>getPref()</code> method. */ public static void set(String key, boolean value) { set(key, ""+value); }
/** Set the size of the selection brush tool, in pixels. */ public static void setBrushSize(int size) { brushSize = size; if (brushSize<1) brushSize = 1; Prefs.set(BRUSH_SIZE, brushSize); }
/** Saves the Point <code>loc</code> in the preferences file as a string using the keyword <code>key</code>. */ public static void saveLocation(String key, Point loc) { if (!doNotSaveWindowLocations) set(key, loc.x+","+loc.y); }
/** Saves <code>value</code> in the preferences file using the keyword <code>key</code>. This value can be retrieved using the appropriate <code>getPref()</code> method. */ public static void set(String key, int value) { set(key, Integer.toString(value)); }
public void dispose() { WindowManager.removeWindow(this); Prefs.set("command-finder.close", closeWhenRunning); frame = null; super.dispose(); } };
private void resetPrefs() { for (int i=0; i<7; i++) { String key = TOOL_KEY+(i/10)%10+i%10; if (!Prefs.get(key, "").equals("")) Prefs.set(key, ""); } }
@Override public void itemStateChanged(ItemEvent e) { JCheckBox box = (JCheckBox) e.getSource(); Prefs.set(LociPrefs.PREF_SDT_INTENSITY, box.isSelected()); }
@Override public void itemStateChanged(ItemEvent e) { JCheckBox box = (JCheckBox) e.getSource(); Prefs.set(LociPrefs.PREF_PICT_QTJAVA, box.isSelected()); }
@Override public void itemStateChanged(ItemEvent e) { JCheckBox box = (JCheckBox) e.getSource(); if (box.equals(widgets[0])) { Prefs.set(LociPrefs.PREF_LEICA_LIF_PHYSICAL_SIZE, box.isSelected()); } }
@Override public void itemStateChanged(ItemEvent e) { JCheckBox box = (JCheckBox) e.getSource(); if (box.equals(getWidgets()[0])) { Prefs.set(LociPrefs.PREF_CELLSENS_FAIL, box.isSelected()); } }
public void close() { super.close(); instance = null; done = true; Prefs.set("cthresholder.dark", darkBackground.getState()); synchronized(this) { notify(); } }
public void itemStateChanged(ItemEvent e) { CheckboxMenuItem item = (CheckboxMenuItem)e.getSource(); String cmd = e.getItem().toString(); if ("Tab Key Inserts Spaces".equals(cmd)) { insertSpaces = e.getStateChange()==1; Prefs.set(INSERT_SPACES, insertSpaces); } else setFont(); }
public static void setDefaultType(int type) { if (type>=0 && type<types.length) { defaultType = type; PointRoi instance = getPointRoiInstance(); if (instance!=null) instance.setPointType(defaultType); Prefs.set(TYPE_KEY, type); } }
public static void setDefaultSize(int index) { if (index>=0 && index<sizes.length) { defaultSize = convertIndexToSize(index); PointRoi instance = getPointRoiInstance(); if (instance!=null) instance.setSize(index); Prefs.set(SIZE_KEY, index); } }
public boolean showDialog() { GenericDialog gd = new GenericDialog("De-Interleaver"); gd.addNumericField("How many channels?", nChannels, 0); gd.addCheckbox("Keep source stack", keep); gd.showDialog(); if (gd.wasCanceled()) return false; nChannels = (int) gd.getNextNumber(); keep = gd.getNextBoolean(); Prefs.set("Deint_ch.int", nChannels); Prefs.set("Deint_keep.boolean", keep); return true; }