private boolean showDialog() { gd = new GenericDialog("Startup Macro"); String text = "Macro code contained in this text area\nexecutes when ImageJ starts up."; Font font = new Font("SansSerif", Font.PLAIN, 14); gd.setInsets(5,15,0); gd.addMessage(text, font); gd.setInsets(5, 10, 0); gd.addTextAreas(macro, null, 12, 50); gd.addChoice("Add code:", code, code[0]); Vector choices = gd.getChoices(); if (choices!=null) { Choice choice = (Choice)choices.elementAt(0); choice.addItemListener(this); } gd.showDialog(); macro = gd.getNextText(); return !gd.wasCanceled(); }
final GenericDialog gd = new GenericDialog("WARNING", null == Display.getFront() ? IJ.getInstance() : Display.getFront().getFrame()); gd.addMessage("Filters are not all the same for all images:"); gd.addTextAreas(sb.toString(), null, 20, 30); final String[] s = new String[]{"Use the filters of the reference image", "Start from an empty list of filters"}; gd.addChoice("Do:", s, s[0]);
private boolean showDialog() { gd = new GenericDialog("Startup Macro"); String text = "Macro code contained in this text area\nexecutes when ImageJ starts up."; Font font = new Font("SansSerif", Font.PLAIN, 14); gd.setInsets(5,15,0); gd.addMessage(text, font); gd.setInsets(5, 10, 0); gd.addTextAreas(macro, null, 12, 50); gd.addChoice("Add code:", code, code[0]); Vector choices = gd.getChoices(); if (choices!=null) { Choice choice = (Choice)choices.elementAt(0); choice.addItemListener(this); } gd.showDialog(); macro = gd.getNextText(); return !gd.wasCanceled(); }
public int showDialog(ImagePlus imp, String command, PlugInFilterRunner pfr) { gd = new GenericDialog("Convolver..."); gd.addTextAreas(kernelText, null, 10, 30); gd.addPanel(makeButtonPanel(gd)); gd.addCheckbox("Normalize Kernel", normalizeFlag); gd.addPreviewCheckbox(pfr); gd.addDialogListener(this); gd.showDialog(); if (gd.wasCanceled()) return DONE; this.pfr = pfr; return IJ.setupDialog(imp, flags); }
public int showDialog(ImagePlus imp, String command, PlugInFilterRunner pfr) { gd = new GenericDialog("Convolver..."); gd.addTextAreas(kernelText, null, 10, 30); gd.addPanel(makeButtonPanel(gd)); gd.addCheckbox("Normalize Kernel", normalizeFlag); gd.addPreviewCheckbox(pfr); gd.addDialogListener(this); gd.showDialog(); if (gd.wasCanceled()) return DONE; this.pfr = pfr; return IJ.setupDialog(imp, flags); }
boolean showDialog() { validateFormat(); gd = new NonBlockingGenericDialog("Batch Process"); addPanels(gd); gd.setInsets(15, 0, 5); gd.addChoice("Output_format:", formats, format); gd.setInsets(0, 0, 5); gd.addChoice("Add macro code:", code, code[0]); if (virtualStack==null) gd.addStringField("File name contains:", "", 10); gd.setInsets(15, 10, 0); Dimension screen = IJ.getScreenSize(); gd.addTextAreas(macro, null, screen.width<=600?10:15, 60); addButtons(gd); gd.setOKLabel("Process"); Vector choices = gd.getChoices(); Choice choice = (Choice)choices.elementAt(1); if (virtualStack!=null) gd.addHelp(help); choice.addItemListener(this); gd.showDialog(); format = gd.getNextChoice(); if (virtualStack==null) filter = gd.getNextString(); macro = gd.getNextText(); return !gd.wasCanceled(); }
boolean showDialog() { validateFormat(); gd = new NonBlockingGenericDialog("Batch Process"); addPanels(gd); gd.setInsets(15, 0, 5); gd.addChoice("Output_format:", formats, format); gd.setInsets(0, 0, 5); gd.addChoice("Add macro code:", code, code[0]); if (virtualStack==null) gd.addStringField("File name contains:", "", 10); gd.setInsets(15, 10, 0); Dimension screen = IJ.getScreenSize(); gd.addTextAreas(macro, null, screen.width<=600?10:15, 60); addButtons(gd); gd.setOKLabel("Process"); Vector choices = gd.getChoices(); Choice choice = (Choice)choices.elementAt(1); if (virtualStack!=null) gd.addHelp(help); choice.addItemListener(this); gd.showDialog(); format = gd.getNextChoice(); if (virtualStack==null) filter = gd.getNextString(); macro = gd.getNextText(); return !gd.wasCanceled(); }
String labels = plot.getDataLabels(); int nLines = labels.split("\n", -1).length; gd.addTextAreas(labels, null, Math.min(nLines+1, 20), 40); gd.addChoice("Legend position", LEGEND_POSITIONS, LEGEND_POSITIONS[legendPosNumber]); gd.addCheckbox("Transparent background", transparentBackground);
String labels = plot.getDataLabels(); int nLines = labels.split("\n", -1).length; gd.addTextAreas(labels, null, Math.min(nLines+1, 20), 40); gd.addChoice("Legend position", LEGEND_POSITIONS, LEGEND_POSITIONS[legendPosNumber]); gd.addCheckbox("Transparent background", transparentBackground);
gd.addChoice("Function:", functions, defaultChoice); gd.addStringField("Unit:", unit, 16); gd.addTextAreas(xText, yText, 20, 14);
gd.addChoice("Function:", functions, defaultChoice); gd.addStringField("Unit:", unit, 16); gd.addTextAreas(xText, yText, 20, 14);
gd = new GenericDialog(dialogTitle); gd.setInsets(5, 5, 0); gd.addTextAreas(getMacro(), null, 12, 48); ta = gd.getTextArea1(); ta.addKeyListener(this);
gd = new GenericDialog(dialogTitle); gd.setInsets(5, 5, 0); gd.addTextAreas(getMacro(), null, 12, 48); ta = gd.getTextArea1(); ta.addKeyListener(this);