/** * Called when the user selects the "Help->Contents" menu item. */ private void showHelp() { // Do we need to create the "help" dialog? if (help == null) { File helpfile = new File("docs", "editor-readme.txt"); //$NON-NLS-1$ help = new CommonHelpDialog(frame, helpfile); } // Show the help dialog. help.setVisible(true); }
/** * Called when the user selects the "Help->Contents" menu item. * <p/> * This method can be called by subclasses. */ private void showHelp() { // Do we need to create the "help" dialog? if (help == null) { help = new CommonHelpDialog(frame, new File(helpFileName)); } // Show the help dialog. help.setVisible(true); }
/** * display the filename in a CommonHelpDialog */ private static CommonHelpDialog showHelp(JFrame frame, String filename) { Locale l = Locale.getDefault(); File helpfile; if (!filename.contains(".txt")) { //$NON-NLS-1$ helpfile = new File("docs" + File.separator + filename + '-' //$NON-NLS-1$ //$NON-NLS-2$ + l.getDisplayLanguage(Locale.ENGLISH) + ".txt"); //$NON-NLS-1$ if (!helpfile.exists()) { helpfile = new File("docs" + File.separator + filename + ".txt"); //$NON-NLS-1$ } } else { String localeFileName = filename.replace(".txt", //$NON-NLS-1$ "-" + l.getDisplayLanguage(Locale.ENGLISH) + ".txt"); //$NON-NLS-1$ helpfile = new File(localeFileName); if (!helpfile.exists()) { helpfile = new File(filename); } } return new CommonHelpDialog(frame, helpfile); }
public void notifyOfBot() { if (GUIPreferences.getInstance().getNagForBotReadme() && !WarningShown) { WarningShown = true; String title = Messages.getString("BotGUI.notifyOfBot.title"); //$NON-NLS-1$ String body = Messages.getString("BotGUI.notifyOfBot.message"); //$NON-NLS-1$ frame.pack(); frame.setLocationRelativeTo(null); ConfirmDialog confirm = new ConfirmDialog(frame, title, body, true); confirm.setVisible(true); if (!confirm.getShowAgain()) { GUIPreferences.getInstance().setNagForBotReadme(false); } if (confirm.getAnswer()) { File helpfile = new File("docs/ai-readme.txt"); //$NON-NLS-1$ new CommonHelpDialog(frame, helpfile).setVisible(true); } } }