org.openide.nodes.Node.getHelpCtx()方法的使用及代码示例

x33g5p2x  于2022-01-24 转载在 其他  
字(5.8k)|赞(0)|评价(0)|浏览(146)

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

Node.getHelpCtx介绍

[英]Get context help associated with this node.
[中]获取与此节点关联的上下文帮助。

代码示例

代码示例来源:origin: org.netbeans.api/org-openide-nodes

  1. public HelpCtx getHelpCtx() {
  2. return original.getHelpCtx();
  3. }

代码示例来源:origin: org.netbeans.api/org-openide-explorer

  1. /**
  2. * @return HelpCtx of the underlying node.
  3. * @since 3.38
  4. */
  5. public HelpCtx getHelpCtx() {
  6. return node.getHelpCtx();
  7. }

代码示例来源:origin: org.netbeans.api/org-openide-explorer

  1. public HelpCtx getHelpCtx() {
  2. for (int i = 0; i < original.length; i++) {
  3. if (original[i].getHelpCtx() != HelpCtx.DEFAULT_HELP) {
  4. return original[i].getHelpCtx();
  5. }
  6. }
  7. return HelpCtx.DEFAULT_HELP;
  8. }

代码示例来源:origin: net.sf.squirrel-sql.thirdparty-non-maven/openide

  1. public HelpCtx getHelpCtx () {
  2. for (int i = 0; i < original.length; i++) {
  3. if (original[i].getHelpCtx() != HelpCtx.DEFAULT_HELP) {
  4. return original[i].getHelpCtx();
  5. }
  6. }
  7. return HelpCtx.DEFAULT_HELP;
  8. }

代码示例来源:origin: net.sf.squirrel-sql.thirdpary-non-maven/openide

  1. public HelpCtx getHelpCtx () {
  2. for (int i = 0; i < original.length; i++) {
  3. if (original[i].getHelpCtx() != HelpCtx.DEFAULT_HELP) {
  4. return original[i].getHelpCtx();
  5. }
  6. }
  7. return HelpCtx.DEFAULT_HELP;
  8. }

代码示例来源:origin: net.sf.squirrel-sql.thirdparty-non-maven/openide

  1. /**
  2. * @return HelpCtx of the underlying node.
  3. * @since 3.38
  4. */
  5. public HelpCtx getHelpCtx() {
  6. return node.getHelpCtx ();
  7. }

代码示例来源:origin: net.sf.squirrel-sql.thirdpary-non-maven/openide

  1. /**
  2. * @return HelpCtx of the underlying node.
  3. * @since 3.38
  4. */
  5. public HelpCtx getHelpCtx() {
  6. return node.getHelpCtx ();
  7. }

代码示例来源:origin: org.netbeans.modules/org-netbeans-modules-web-jsf-navigation

  1. @Override
  2. public HelpCtx getHelpCtx() {
  3. return original.getHelpCtx();
  4. }

代码示例来源:origin: net.sf.squirrel-sql.thirdpary-non-maven/openide

  1. public HelpCtx getHelpCtx () {
  2. return original.getHelpCtx ();
  3. }

代码示例来源:origin: net.sf.squirrel-sql.thirdparty-non-maven/openide

  1. public HelpCtx getHelpCtx () {
  2. return original.getHelpCtx ();
  3. }

代码示例来源:origin: org.netbeans.modules/org-netbeans-modules-visualweb-propertyeditors

  1. public HelpCtx getHelpCtx() {
  2. Node[] selNodes = getExplorerManager().getSelectedNodes();
  3. if( selNodes != null && selNodes.length == 1 )
  4. return selNodes[0].getHelpCtx();
  5. else
  6. return HelpCtx.DEFAULT_HELP;
  7. }

代码示例来源:origin: org.netbeans.api/org-openide-explorer

  1. HelpCtx attempt = sel[i].getHelpCtx();

代码示例来源:origin: net.sf.squirrel-sql.thirdpary-non-maven/openide

  1. /** Utility method to get context help from a node selection.
  2. * Tries to find context helps for selected nodes.
  3. * If there are some, and they all agree, uses that.
  4. * In all other cases, uses the supplied generic help.
  5. *
  6. * @param sel a list of nodes to search for help in
  7. * @param def the default help to use if they have none or do not agree
  8. * @return a help context
  9. * @since 4.40
  10. */
  11. public static HelpCtx getHelpCtx (Node[] sel, HelpCtx def) {
  12. HelpCtx result = null;
  13. for (int i = 0; i < sel.length; i++) {
  14. HelpCtx attempt = sel[i].getHelpCtx ();
  15. if (attempt != null && ! attempt.equals (HelpCtx.DEFAULT_HELP)) {
  16. if (result == null || result.equals (attempt)) {
  17. result = attempt;
  18. } else {
  19. // More than one found, and they conflict. Get general help on the Explorer instead.
  20. result = null;
  21. break;
  22. }
  23. }
  24. }
  25. return result != null ? result : def;
  26. }
  27. }

代码示例来源:origin: net.sf.squirrel-sql.thirdparty-non-maven/openide

  1. /** Utility method to get context help from a node selection.
  2. * Tries to find context helps for selected nodes.
  3. * If there are some, and they all agree, uses that.
  4. * In all other cases, uses the supplied generic help.
  5. *
  6. * @param sel a list of nodes to search for help in
  7. * @param def the default help to use if they have none or do not agree
  8. * @return a help context
  9. * @since 4.40
  10. */
  11. public static HelpCtx getHelpCtx (Node[] sel, HelpCtx def) {
  12. HelpCtx result = null;
  13. for (int i = 0; i < sel.length; i++) {
  14. HelpCtx attempt = sel[i].getHelpCtx ();
  15. if (attempt != null && ! attempt.equals (HelpCtx.DEFAULT_HELP)) {
  16. if (result == null || result.equals (attempt)) {
  17. result = attempt;
  18. } else {
  19. // More than one found, and they conflict. Get general help on the Explorer instead.
  20. result = null;
  21. break;
  22. }
  23. }
  24. }
  25. return result != null ? result : def;
  26. }
  27. }

代码示例来源:origin: org.netbeans.api/org-openide-explorer

  1. /** Constructor that permits specification of the action on the node,
  2. * and permits overriding the name and icon of the menu.
  3. *
  4. * @param node node to represent
  5. * @param action action called when node selected
  6. * @param setName <code>true</code> to automatically set the name and icon of the item
  7. */
  8. public Menu(final Node node, NodeAcceptor action, boolean setName) {
  9. this.node = node;
  10. this.action = action;
  11. if (setName) {
  12. MenuItem.initialize(this, node);
  13. HelpCtx help = node.getHelpCtx();
  14. if ((help != null) && !help.equals(HelpCtx.DEFAULT_HELP) && (help.getHelpID() != null)) {
  15. HelpCtx.setHelpIDString(this, help.getHelpID());
  16. }
  17. }
  18. }

代码示例来源:origin: net.sf.squirrel-sql.thirdparty-non-maven/openide

  1. /** Constructor that permits specification of the action on the node,
  2. * and permits overriding the name and icon of the menu.
  3. *
  4. * @param node node to represent
  5. * @param action action called when node selected
  6. * @param setName <code>true</code> to automatically set the name and icon of the item
  7. */
  8. public Menu (final Node node, NodeAcceptor action, boolean setName) {
  9. this.node = node;
  10. this.action = action;
  11. if (setName) {
  12. MenuItem.initialize (this, node);
  13. HelpCtx help = node.getHelpCtx ();
  14. if (help != null && ! help.equals (HelpCtx.DEFAULT_HELP) && help.getHelpID () != null)
  15. HelpCtx.setHelpIDString (this, help.getHelpID ());
  16. }
  17. }

代码示例来源:origin: net.sf.squirrel-sql.thirdpary-non-maven/openide

  1. /** Constructor that permits specification of the action on the node,
  2. * and permits overriding the name and icon of the menu.
  3. *
  4. * @param node node to represent
  5. * @param action action called when node selected
  6. * @param setName <code>true</code> to automatically set the name and icon of the item
  7. */
  8. public Menu (final Node node, NodeAcceptor action, boolean setName) {
  9. this.node = node;
  10. this.action = action;
  11. if (setName) {
  12. MenuItem.initialize (this, node);
  13. HelpCtx help = node.getHelpCtx ();
  14. if (help != null && ! help.equals (HelpCtx.DEFAULT_HELP) && help.getHelpID () != null)
  15. HelpCtx.setHelpIDString (this, help.getHelpID ());
  16. }
  17. }

代码示例来源:origin: org.netbeans.api/org-openide-explorer

  1. HelpCtx ctx = nodes[i].getHelpCtx();

相关文章