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

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

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

Node.updateChildren介绍

[英]Can be overriden in subclasses (probably in FilterNode) to check whether children are of the right subclass
[中]可以在子类(可能在FilterNode中)中重写,以检查子类是否属于正确的子类

代码示例

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

  1. /** Get the list of children.
  2. * @return the children
  3. */
  4. public final Children getChildren() {
  5. updateChildren();
  6. return hierarchy;
  7. }

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

  1. /** Test whether the node is a leaf, or may contain children.
  2. * @return <code>true</code> if the children list is actually {@link Children#LEAF}
  3. */
  4. public final boolean isLeaf() {
  5. updateChildren();
  6. return hierarchy == Children.LEAF;
  7. }

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

  1. /**
  2. * This method is used to change the Children from Children.LEAF to Children
  3. * typically used to when there is a setChildren() on the original node
  4. * setChildren will fire the appropriate events
  5. */
  6. @Override
  7. final void updateChildren() {
  8. if (isDefault()) {
  9. org.openide.nodes.Children newChildren = null;
  10. try {
  11. Children.PR.enterReadAccess();
  12. if ((original.hierarchy == Children.LEAF) && (hierarchy != Children.LEAF)) {
  13. newChildren = Children.LEAF;
  14. } else if ((original.hierarchy != Children.LEAF) && (hierarchy == Children.LEAF)) {
  15. newChildren = new Children(original);
  16. }
  17. } finally {
  18. Children.PR.exitReadAccess();
  19. }
  20. if (newChildren != null) {
  21. setChildren(newChildren);
  22. }
  23. } else {
  24. super.updateChildren();
  25. }
  26. }

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

  1. /** Get the list of children.
  2. * @return the children
  3. */
  4. public final Children getChildren () {
  5. updateChildren ();
  6. return hierarchy;
  7. }

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

  1. /** Test whether the node is a leaf, or may contain children.
  2. * @return <code>true</code> if the children list is actually {@link Children#LEAF}
  3. */
  4. public final boolean isLeaf () {
  5. updateChildren ();
  6. return hierarchy == Children.LEAF;
  7. }

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

  1. /** Get the list of children.
  2. * @return the children
  3. */
  4. public final Children getChildren () {
  5. updateChildren ();
  6. return hierarchy;
  7. }

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

  1. /** Test whether the node is a leaf, or may contain children.
  2. * @return <code>true</code> if the children list is actually {@link Children#LEAF}
  3. */
  4. public final boolean isLeaf () {
  5. updateChildren ();
  6. return hierarchy == Children.LEAF;
  7. }

相关文章