void showHelp() { if (helpURL.startsWith("<html>")) { if (this instanceof NonBlockingGenericDialog) new HTMLDialog("", helpURL, false); // non blocking else new HTMLDialog(this, "", helpURL); //modal } else { String macro = "run('URL...', 'url="+helpURL+"');"; new MacroRunner(macro); } }
void showHelp() { if (helpURL.startsWith("<html>")) { if (this instanceof NonBlockingGenericDialog) new HTMLDialog("", helpURL, false); // non blocking else new HTMLDialog(this, "", helpURL); //modal } else { String macro = "run('URL...', 'url="+helpURL+"');"; new MacroRunner(macro); } }
sb.append("</div>"); sb.append("</html>"); new HTMLDialog("About Sholl Analysis...", sb.toString());
/** Displays a message in a dialog box with the specified title. Displays HTML formatted text if 'msg' starts with "<html>". There are examples at "http://imagej.nih.gov/ij/macros/HtmlDialogDemo.txt". Writes to the Java console if ImageJ is not present. */ public static void showMessage(String title, String msg) { if (ij!=null) { if (msg!=null && (msg.startsWith("<html>")||msg.startsWith("<HTML>"))) { HTMLDialog hd = new HTMLDialog(title, msg); if (isMacro() && hd.escapePressed()) throw new RuntimeException(Macro.MACRO_CANCELED); } else { MessageDialog md = new MessageDialog(ij, title, msg); if (isMacro() && md.escapePressed()) throw new RuntimeException(Macro.MACRO_CANCELED); } } else System.out.println(msg); }
/** Displays a message in a dialog box with the specified title. Displays HTML formatted text if 'msg' starts with "<html>". There are examples at "http://imagej.nih.gov/ij/macros/HtmlDialogDemo.txt". Writes to the Java console if ImageJ is not present. */ public static void showMessage(String title, String msg) { if (ij!=null) { if (msg!=null && (msg.startsWith("<html>")||msg.startsWith("<HTML>"))) { HTMLDialog hd = new HTMLDialog(title, msg); if (isMacro() && hd.escapePressed()) throw new RuntimeException(Macro.MACRO_CANCELED); } else { MessageDialog md = new MessageDialog(ij, title, msg); if (isMacro() && md.escapePressed()) throw new RuntimeException(Macro.MACRO_CANCELED); } } else System.out.println(msg); }
sb.append("</div>"); sb.append("</html>"); new HTMLDialog(parentDialog, "Segmentation Details", sb.toString());
public void actionPerformed(ActionEvent ae) { Object source = ae.getSource(); if (source==runButton) { int row = table.getSelectedRow(); if (row<0) { error("Please select a command to run"); return; } runCommand(tableModel.getCommand(row)); } else if (source==sourceButton) { int row = table.getSelectedRow(); if (row<0) { error("Please select a command"); return; } showSource(tableModel.getCommand(row)); } else if (source == closeButton) { closeWindow(); } else if (source == helpButton) { String text = "<html>Shortcuts:<br>" + " ↑ ↓  Select items<br>" + " ↵  Open item<br>" + " A-Z  Alphabetic scroll<br>" + " ⌫ Activate search field</html>"; new HTMLDialog("", text); } }
public void actionPerformed(ActionEvent ae) { Object source = ae.getSource(); if (source==runButton) { int row = table.getSelectedRow(); if (row<0) { error("Please select a command to run"); return; } runCommand(tableModel.getCommand(row)); } else if (source==sourceButton) { int row = table.getSelectedRow(); if (row<0) { error("Please select a command"); return; } showSource(tableModel.getCommand(row)); } else if (source == closeButton) { closeWindow(); } else if (source == helpButton) { String text = "<html>Shortcuts:<br>" + " ↑ ↓  Select items<br>" + " ↵  Open item<br>" + " A-Z  Alphabetic scroll<br>" + " ⌫ Activate search field</html>"; new HTMLDialog("", text); } }