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

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

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

Node.getParentChildren介绍

[英]Finds the children we are attached to.
[中]找到我们所依恋的孩子。

代码示例

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

  1. /** Deassigns the node from a children, when it is removed from
  2. * a children.
  3. */
  4. final void deassignFrom(Children parent) {
  5. synchronized (LOCK) {
  6. Children p = getParentChildren();
  7. if (parent != p) {
  8. throw new IllegalArgumentException("Deassign from wrong parent. Old: " + p + " Caller: " + parent); //NOI18N
  9. }
  10. this.parent = null;
  11. }
  12. }

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

  1. /** Get the parent node.
  2. * @return the parent node, or <CODE>null</CODE> if this node is the root of a hierarchy
  3. */
  4. public final Node getParentNode() {
  5. // if contained in a list return its parent node
  6. Children ch = getParentChildren();
  7. return (ch == null) ? null : ch.getNode();
  8. }

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

  1. Children ch = getParentChildren();

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

  1. /** Deassignes the node from a children, when it is removed from
  2. * a children.
  3. */
  4. final synchronized void deassignFrom (Children parent) {
  5. Children p = getParentChildren ();
  6. if (parent != p) {
  7. throw new IllegalArgumentException ("Deassign from wrong parent. Old: " + p + " Caller: " + parent); //NOI18N
  8. }
  9. this.parent = null;
  10. }

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

  1. /** Deassignes the node from a children, when it is removed from
  2. * a children.
  3. */
  4. final synchronized void deassignFrom (Children parent) {
  5. Children p = getParentChildren ();
  6. if (parent != p) {
  7. throw new IllegalArgumentException ("Deassign from wrong parent. Old: " + p + " Caller: " + parent); //NOI18N
  8. }
  9. this.parent = null;
  10. }

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

  1. /** Get the parent node.
  2. * @return the parent node, or <CODE>null</CODE> if this node is the root of a hierarchy
  3. */
  4. public final Node getParentNode () {
  5. // if contained in a list return its parent node
  6. Children ch = getParentChildren ();
  7. return ch == null ? null : ch.getNode ();
  8. }

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

  1. /** Get the parent node.
  2. * @return the parent node, or <CODE>null</CODE> if this node is the root of a hierarchy
  3. */
  4. public final Node getParentNode () {
  5. // if contained in a list return its parent node
  6. Children ch = getParentChildren ();
  7. return ch == null ? null : ch.getNode ();
  8. }

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

  1. /** Method that allows Children to change the parent children of
  2. * the node when the node is add to a children.
  3. *
  4. * @param parent the children that wants to contain this node
  5. * @param index index that will be assigned to this node
  6. * @exception IllegalStateException if this node already belongs to a children
  7. */
  8. final synchronized void assignTo (Children parent, int index) {
  9. Children ch = getParentChildren ();
  10. if (ch != null && ch != parent) {
  11. throw new IllegalStateException ("Cannot initialize " + index + "th child of node " + parent.getNode () + "; it already belongs to node " + ch.getNode ()); // NOI18N
  12. }
  13. if ( ! ( this.parent instanceof ChildrenArray ) ) {
  14. this.parent = parent;
  15. }
  16. }

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

  1. /** Method that allows Children to change the parent children of
  2. * the node when the node is add to a children.
  3. *
  4. * @param parent the children that wants to contain this node
  5. * @param index index that will be assigned to this node
  6. * @exception IllegalStateException if this node already belongs to a children
  7. */
  8. final synchronized void assignTo (Children parent, int index) {
  9. Children ch = getParentChildren ();
  10. if (ch != null && ch != parent) {
  11. throw new IllegalStateException ("Cannot initialize " + index + "th child of node " + parent.getNode () + "; it already belongs to node " + ch.getNode ()); // NOI18N
  12. }
  13. if ( ! ( this.parent instanceof ChildrenArray ) ) {
  14. this.parent = parent;
  15. }
  16. }

相关文章