protected Point getPathWindowLocation() { return Prefs.getLocation(PATHWIN_LOC); }
protected Point getFillWindowLocation() { return Prefs.getLocation(FILLWIN_LOC); }
addKeyListener(this); init(); Point loc = Prefs.getLocation(PREFS_KEY+"loc"); if (loc!=null) setLocation(loc);
addKeyListener(this); init(); Point loc = Prefs.getLocation(PREFS_KEY+"loc"); if (loc!=null) setLocation(loc);
setResizable(false); pack(); Point loc = Prefs.getLocation(LOC_KEY); if (loc!=null) setLocation(loc);
int w=0, h=0; if (title.equals("Results")) { loc = Prefs.getLocation(LOC_KEY); w = (int)Prefs.get(WIDTH_KEY, 0.0); h = (int)Prefs.get(HEIGHT_KEY, 0.0); } else if (title.equals("Log")) { loc = Prefs.getLocation(LOG_LOC_KEY); w = (int)Prefs.get(LOG_WIDTH_KEY, 0.0); h = (int)Prefs.get(LOG_HEIGHT_KEY, 0.0); } else if (title.equals("Debug")) { loc = Prefs.getLocation(DEBUG_LOC_KEY); w = width; h = height;
Point loc = Prefs.getLocation(LOC_KEY); if (loc!=null) setLocation(loc);
setSize(size.width-40, size.height); list.remove(0); Point loc = Prefs.getLocation(LOC_KEY); if (loc!=null) setLocation(loc);
setSize(size.width-40, size.height); list.remove(0); Point loc = Prefs.getLocation(LOC_KEY); if (loc!=null) setLocation(loc);
setResizable(false); pack(); Point loc = Prefs.getLocation(LOC_KEY); if (loc!=null) setLocation(loc);
setResizable(false); pack(); Point loc = Prefs.getLocation(LOC_KEY); if (loc!=null) setLocation(loc);
public void showDialog() { Color color = Toolbar.getForegroundColor(); String colorName = Colors.colorToString2(color); String name = isPencil?"Pencil":"Brush"; gd = new NonBlockingGenericDialog(name+" Options"); gd.addSlider(name+" width:", 1, 50, width); //gd.addSlider("Transparency (%):", 0, 100, transparency); gd.addChoice("Color:", Colors.getColors(colorName), colorName); gd.addCheckbox("Paint on overlay", paintOnOverlay); gd.addDialogListener(this); gd.addHelp(getHelp()); Point loc = Prefs.getLocation(LOC_KEY); if (loc!=null) { gd.centerDialog(false); gd.setLocation (loc); } gd.showDialog(); Prefs.saveLocation(LOC_KEY, gd.getLocation()); gd = null; }
public void showDialog() { Color color = Toolbar.getForegroundColor(); String colorName = Colors.colorToString2(color); String name = isPencil?"Pencil":"Brush"; gd = new NonBlockingGenericDialog(name+" Options"); gd.addSlider(name+" width:", 1, 50, width); //gd.addSlider("Transparency (%):", 0, 100, transparency); gd.addChoice("Color:", Colors.getColors(colorName), colorName); gd.addCheckbox("Paint on overlay", paintOnOverlay); gd.addDialogListener(this); gd.addHelp(getHelp()); Point loc = Prefs.getLocation(LOC_KEY); if (loc!=null) { gd.centerDialog(false); gd.setLocation (loc); } gd.showDialog(); Prefs.saveLocation(LOC_KEY, gd.getLocation()); gd = null; }
void arrowToolOptions() { if (!Toolbar.getToolName().equals("arrow")) IJ.setTool("arrow"); double width = Arrow.getDefaultWidth(); double headSize = Arrow.getDefaultHeadSize(); Color color = Toolbar.getForegroundColor(); colorName = Colors.colorToString2(color); int style = Arrow.getDefaultStyle(); gd = new NonBlockingGenericDialog("Arrow Tool"); gd.addSlider("Width:", 1, 50, (int)width); gd.addSlider("Size:", 0, 50, headSize); gd.addChoice("Color:", Colors.getColors(colorName), colorName); gd.addChoice("Style:", Arrow.styles, Arrow.styles[style]); gd.addCheckbox("Outline", Arrow.getDefaultOutline()); gd.addCheckbox("Double head", Arrow.getDefaultDoubleHeaded()); gd.addCheckbox("Keep after adding to overlay", Prefs.keepArrowSelections); gd.addDialogListener(this); Point loc = Prefs.getLocation(LOC_KEY); if (loc!=null) { gd.centerDialog(false); gd.setLocation (loc); } gd.showDialog(); Prefs.saveLocation(LOC_KEY, gd.getLocation()); }
gd.addSlider("Angle:", -90, 90, angle); gd.addCheckbox("Antialiased text", antialiased); Point loc = Prefs.getLocation(LOC_KEY); if (IJ.debugMode) { Dimension screen = IJ.getScreenSize();
void arrowToolOptions() { if (!Toolbar.getToolName().equals("arrow")) IJ.setTool("arrow"); double width = Arrow.getDefaultWidth(); double headSize = Arrow.getDefaultHeadSize(); Color color = Toolbar.getForegroundColor(); colorName = Colors.colorToString2(color); int style = Arrow.getDefaultStyle(); gd = new NonBlockingGenericDialog("Arrow Tool"); gd.addSlider("Width:", 1, 50, (int)width); gd.addSlider("Size:", 0, 50, headSize); gd.addChoice("Color:", Colors.getColors(colorName), colorName); gd.addChoice("Style:", Arrow.styles, Arrow.styles[style]); gd.addCheckbox("Outline", Arrow.getDefaultOutline()); gd.addCheckbox("Double head", Arrow.getDefaultDoubleHeaded()); gd.addCheckbox("Keep after adding to overlay", Prefs.keepArrowSelections); gd.addDialogListener(this); Point loc = Prefs.getLocation(LOC_KEY); if (loc!=null) { gd.centerDialog(false); gd.setLocation (loc); } gd.showDialog(); Prefs.saveLocation(LOC_KEY, gd.getLocation()); }
/** Preferences dialog */ void showDialog() { GenericDialog gd = new GenericDialog("Pixel Inspector Prefs..."); gd.addNumericField("Radius:", radius, 0, 6, "(1-"+MAX_RADIUS+")"); gd.addChoice("Grayscale readout:",GRAY_DISPLAY_TYPES,GRAY_DISPLAY_TYPES[grayDisplayType]); gd.addChoice("RGB readout:",RGB_DISPLAY_TYPES,RGB_DISPLAY_TYPES[rgbDisplayType]); gd.addChoice("Copy to clipboard:", COPY_TYPES, COPY_TYPES[copyType]); gd.addMessage("Use arrow keys to move red outline.\nPress 'c' to copy data to clipboard.", null, Color.darkGray); Point loc = Prefs.getLocation(LOC_KEY); if (loc!=null) { gd.centerDialog(false); gd.setLocation (loc); } gd.showDialog(); if (gd.wasCanceled()) return; radius = (int)gd.getNextNumber(); if (radius<1) radius=1; if (radius>MAX_RADIUS) radius=MAX_RADIUS; grayDisplayType = gd.getNextChoiceIndex(); rgbDisplayType = gd.getNextChoiceIndex(); copyType = gd.getNextChoiceIndex(); boolean keyOK = false; init(); update(POSITION_UPDATE); Prefs.set(PREFS_KEY+"radius", radius); Prefs.saveLocation(LOC_KEY, gd.getLocation()); }
/** Preferences dialog */ void showDialog() { GenericDialog gd = new GenericDialog("Pixel Inspector Prefs..."); gd.addNumericField("Radius:", radius, 0, 6, "(1-"+MAX_RADIUS+")"); gd.addChoice("Grayscale readout:",GRAY_DISPLAY_TYPES,GRAY_DISPLAY_TYPES[grayDisplayType]); gd.addChoice("RGB readout:",RGB_DISPLAY_TYPES,RGB_DISPLAY_TYPES[rgbDisplayType]); gd.addChoice("Copy to clipboard:", COPY_TYPES, COPY_TYPES[copyType]); gd.addMessage("Use arrow keys to move red outline.\nPress 'c' to copy data to clipboard.", null, Color.darkGray); Point loc = Prefs.getLocation(LOC_KEY); if (loc!=null) { gd.centerDialog(false); gd.setLocation (loc); } gd.showDialog(); if (gd.wasCanceled()) return; radius = (int)gd.getNextNumber(); if (radius<1) radius=1; if (radius>MAX_RADIUS) radius=MAX_RADIUS; grayDisplayType = gd.getNextChoiceIndex(); rgbDisplayType = gd.getNextChoiceIndex(); copyType = gd.getNextChoiceIndex(); boolean keyOK = false; init(); update(POSITION_UPDATE); Prefs.set(PREFS_KEY+"radius", radius); Prefs.saveLocation(LOC_KEY, gd.getLocation()); }
public void showDialog() { Color color = Toolbar.getForegroundColor(); String colorName = Colors.colorToString2(color); gd = new NonBlockingGenericDialog("Overlay Brush Options"); gd.addSlider("Brush width (pixels):", 0, 50, width); gd.addSlider("Transparency (%):", 0, 100, transparency); gd.addChoice("Color:", Colors.getColors(colorName), colorName); gd.setInsets(10, 0, 0); String ctrlString = IJ.isMacintosh()? "CMD":"CTRL"; gd.addMessage("SHIFT for horizontal or vertical lines\n"+ "ALT to draw in background color\n"+ ctrlString+"-SHIFT-drag to change brush width\n"+ ctrlString+"-(ALT) click to change foreground (background) color\n"+ "or use this dialog or the Color Picker (shift-k).", null, Color.darkGray); gd.hideCancelButton(); gd.addHelp(""); gd.setHelpLabel("Undo"); gd.setOKLabel("Close"); gd.addDialogListener(this); Point loc = Prefs.getLocation(LOC_KEY); if (loc!=null) { gd.centerDialog(false); gd.setLocation (loc); } gd.showDialog(); Prefs.saveLocation(LOC_KEY, gd.getLocation()); if (IJ.debugMode) IJ.log("Options: false"); gd = null; }
public void showDialog() { Color color = Toolbar.getForegroundColor(); String colorName = Colors.colorToString2(color); gd = new NonBlockingGenericDialog("Overlay Brush Options"); gd.addSlider("Brush width (pixels):", 0, 50, width); gd.addSlider("Transparency (%):", 0, 100, transparency); gd.addChoice("Color:", Colors.getColors(colorName), colorName); gd.setInsets(10, 0, 0); String ctrlString = IJ.isMacintosh()? "CMD":"CTRL"; gd.addMessage("SHIFT for horizontal or vertical lines\n"+ "ALT to draw in background color\n"+ ctrlString+"-SHIFT-drag to change brush width\n"+ ctrlString+"-(ALT) click to change foreground (background) color\n"+ "or use this dialog or the Color Picker (shift-k).", null, Color.darkGray); gd.hideCancelButton(); gd.addHelp(""); gd.setHelpLabel("Undo"); gd.setOKLabel("Close"); gd.addDialogListener(this); Point loc = Prefs.getLocation(LOC_KEY); if (loc!=null) { gd.centerDialog(false); gd.setLocation (loc); } gd.showDialog(); Prefs.saveLocation(LOC_KEY, gd.getLocation()); if (IJ.debugMode) IJ.log("Options: false"); gd = null; }