public boolean dialogItemChanged(GenericDialog gd, AWTEvent e) { kernelText = gd.getNextText(); normalizeFlag = gd.getNextBoolean(); normalize = normalizeFlag; kernelError = !decodeKernel(kernelText); if (!kernelError) { IJ.showStatus("Convolve: "+kw+"x"+kh+" kernel"); return true; } else return !gd.isPreviewActive(); }
public boolean dialogItemChanged(GenericDialog gd, AWTEvent e) { kernelText = gd.getNextText(); normalizeFlag = gd.getNextBoolean(); normalize = normalizeFlag; kernelError = !decodeKernel(kernelText); if (!kernelError) { IJ.showStatus("Convolve: "+kw+"x"+kh+" kernel"); return true; } else return !gd.isPreviewActive(); }
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(); }
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(); }
choiceIndex = gd.getNextChoiceIndex(); unit = gd.getNextString(); xText = gd.getNextText(); yText = gd.getNextText(); global2 = gd.getNextBoolean(); showPlotFlag = gd.getNextBoolean();
choiceIndex = gd.getNextChoiceIndex(); unit = gd.getNextString(); xText = gd.getNextText(); yText = gd.getNextText(); global2 = gd.getNextBoolean(); showPlotFlag = gd.getNextBoolean();
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(); }
if (gd.wasCanceled()) return; labels = gd.getNextText(); legendPosNumber = gd.getNextChoiceIndex(); int flags = LEGEND_POSITION_N[legendPosNumber];
if (gd.wasCanceled()) return; labels = gd.getNextText(); legendPosNumber = gd.getNextChoiceIndex(); int flags = LEGEND_POSITION_N[legendPosNumber];