net.sf.taverna.t2.workbench.helper.Helper.getInstance()方法的使用及代码示例

x33g5p2x  于2022-01-20 转载在 其他  
字(2.1k)|赞(0)|评价(0)|浏览(99)

本文整理了Java中net.sf.taverna.t2.workbench.helper.Helper.getInstance()方法的一些代码示例,展示了Helper.getInstance()的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Helper.getInstance()方法的具体详情如下:
包路径:net.sf.taverna.t2.workbench.helper.Helper
类名称:Helper
方法名:getInstance

Helper.getInstance介绍

[英]Get the singleton instance of Helper. In theory there could be more than one.
[中]获取Helper的单例实例。理论上可能不止一个。

代码示例

代码示例来源:origin: net.sf.taverna.t2.ui-api/helper-api

  1. /**
  2. * Show the help most associated with the specific component within the container.
  3. *
  4. * @param rootpanecontainer
  5. * @param c
  6. */
  7. static void showHelpWithinContainer(
  8. final RootPaneContainer rootpanecontainer, final Component c) {
  9. getInstance();
  10. showHelp(c);
  11. }

代码示例来源:origin: net.sf.taverna.t2.ui-api/helper-api

  1. /**
  2. * Show in the current dialog the entry (if any) corresponding to the
  3. * specified id.
  4. *
  5. * @param id
  6. */
  7. public static void showID(String id) {
  8. getInstance();
  9. URL result;
  10. try {
  11. result = HelpCollator.getURLFromID(id);
  12. if (result == null) {
  13. result = HelpCollator.getURLFromID("home");
  14. }
  15. Desktop.getDesktop().browse(result.toURI());
  16. } catch (BadIDException e) {
  17. logger.warn(e);
  18. } catch (MalformedURLException e) {
  19. logger.error(e);
  20. } catch (IOException e) {
  21. logger.error(e);
  22. } catch (URISyntaxException e) {
  23. logger.error(e);
  24. }
  25. }

代码示例来源:origin: net.sf.taverna.t2.workbench/helper

  1. /**
  2. * Show in the current dialog the entry (if any) corresponding to the
  3. * specified id.
  4. *
  5. * @param id
  6. */
  7. private static void showID(String id) {
  8. getInstance();
  9. if (dialog == null) {
  10. dialog = createDialog(null);
  11. }
  12. dialog.setVisible(true);
  13. if (!HelpCollator.isEmptyHelp()) {
  14. jhelp.setCurrentID(id);
  15. }
  16. }

代码示例来源:origin: net.sf.taverna.t2.workbench/helper

  1. /**
  2. * Show the help most associated with the specific component within the container.
  3. *
  4. * @param rootpanecontainer
  5. * @param c
  6. */
  7. static void showHelpWithinContainer(
  8. final RootPaneContainer rootpanecontainer, final Component c) {
  9. getInstance();
  10. if ((dialog == null) || !dialog.getOwner().equals(rootpanecontainer)) {
  11. if (dialog != null) {
  12. dialog.setVisible(false);
  13. oldSize = dialog.getSize();
  14. logger.info("Size of dialog was x=" + oldSize.width + " y="
  15. + oldSize.height);
  16. }
  17. if (dialogMap.containsKey(rootpanecontainer)) {
  18. dialog = dialogMap.get(rootpanecontainer);
  19. initializeDialog(dialog);
  20. } else {
  21. dialog = createDialog(rootpanecontainer);
  22. }
  23. }
  24. showHelp(c);
  25. }

相关文章