本文整理匯總了Java中com.trollworks.toolkit.ui.menu.help.AboutCommand類的典型用法代碼示例。如果您正苦於以下問題:Java AboutCommand類的具體用法?Java AboutCommand怎麽用?Java AboutCommand使用的例子?那麽, 這裏精選的類代碼示例或許可以為您提供幫助。
AboutCommand類屬於com.trollworks.toolkit.ui.menu.help包,在下文中一共展示了AboutCommand類的2個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Java代碼示例。
示例1: createMenu
import com.trollworks.toolkit.ui.menu.help.AboutCommand; //導入依賴的package包/類
@Override
public JMenu createMenu() {
JMenu menu = new JMenu(HELP);
menu.setName(NAME);
if (!Platform.isMacintosh()) {
menu.add(new JMenuItem(AboutCommand.INSTANCE));
menu.addSeparator();
}
menu.add(new JMenuItem(UpdateCommand.INSTANCE));
menu.addSeparator();
menu.add(new JMenuItem(new OpenURICommand(RELEASE_NOTES, GCSApp.WEB_SITE + "/release_notes.html"))); //$NON-NLS-1$
menu.add(new JMenuItem(new OpenURICommand(LICENSE, App.getHomePath().resolve("license.html").toUri()))); //$NON-NLS-1$
menu.addSeparator();
menu.add(new JMenuItem(new OpenURICommand(WEB_SITE, GCSApp.WEB_SITE)));
menu.add(new JMenuItem(new OpenURICommand(MAILING_LISTS, GCSApp.WEB_SITE + "/mailing_lists.html"))); //$NON-NLS-1$
menu.add(new JMenuItem(new OpenURICommand(FEATURE_REQUESTS, "https://gurpscharactersheet.atlassian.net/issues/?filter=10000"))); //$NON-NLS-1$
menu.add(new JMenuItem(new OpenURICommand(BUG_REPORTS, "https://gurpscharactersheet.atlassian.net/issues/?filter=10001"))); //$NON-NLS-1$
DynamicMenuEnabler.add(menu);
return menu;
}
示例2: App
import com.trollworks.toolkit.ui.menu.help.AboutCommand; //導入依賴的package包/類
/** Creates a new {@link App}. */
protected App() {
if (Platform.isMacintosh()) {
Application app = Application.getApplication();
app.setAboutHandler(AboutCommand.INSTANCE);
app.setPreferencesHandler(PreferencesCommand.INSTANCE);
app.setOpenFileHandler(OpenCommand.INSTANCE);
app.setPrintFileHandler(PrintCommand.INSTANCE);
app.setQuitHandler(QuitCommand.INSTANCE);
app.setQuitStrategy(QuitStrategy.SYSTEM_EXIT_0);
app.disableSuddenTermination();
}
}