MCPcopy Create free account
hub / github.com/AstroImageJ/astroimagej / showDialog

Method showDialog

ij/src/main/java/ij/plugin/Startup.java:54–71  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

52 }
53
54 private boolean showDialog() {
55 gd = new GenericDialog("Startup Macro");
56 String text = "Macro code contained in this text area\nexecutes when ImageJ starts up.";
57 Font font = ImageJ.SansSerif14;
58 gd.setInsets(5,15,0);
59 gd.addMessage(text, font);
60 gd.setInsets(5, 10, 0);
61 gd.addTextAreas(macro, null, 15, 50);
62 gd.addChoice("Add code:", code, code[0]);
63 Vector choices = gd.getChoices();
64 if (choices!=null) {
65 Choice choice = (Choice)choices.elementAt(0);
66 choice.addItemListener(this);
67 }
68 gd.showDialog();
69 macro = gd.getNextText();
70 return !gd.wasCanceled();
71 }
72
73 private boolean runMacro(String macro) {
74 Interpreter interp = new Interpreter();

Callers 1

runMethod · 0.95

Calls 8

setInsetsMethod · 0.80
getChoicesMethod · 0.80
showDialogMethod · 0.65
addMessageMethod · 0.45
addTextAreasMethod · 0.45
addChoiceMethod · 0.45
getNextTextMethod · 0.45
wasCanceledMethod · 0.45

Tested by

no test coverage detected