edu.ustc.cs.compile.platform.util.ASTView.core
类 ForwardsASTNode

java.lang.Object
  继承者 edu.ustc.cs.compile.platform.util.ASTView.core.ForwardsASTNode
所有已实现的接口:
javax.swing.tree.TreeNode

 class ForwardsASTNode
extends java.lang.Object
implements javax.swing.tree.TreeNode

Defines the tree node in the content area.

Each ForwardsASTNode corresponds to an ASTNode and has a field referred to the directed parent ForwardsASTNode in the content which is a tree.

自从:
1.5
版本:
1.0
作者:
SnowZh, Yu Zhang

字段摘要
private  int childIndex
          The index of children.
private  java.util.ArrayList childrenList
          The child ForwardsASTNodes of this ForwardsASTNode.
private  ForwardsASTNode parentNode
          The directed parent ForwardsASTNode.
private  org.eclipse.jdt.core.dom.ASTNode selfNode
          The ASTNode this ForwardsASTNode corresponds to.
 
构造函数摘要
ForwardsASTNode()
           
 
方法摘要
 void addChild(ForwardsASTNode child)
          Adds a child.
 java.util.Enumeration children()
          Returns the children of this ForwardsASTNode as an Enumeration.
 boolean getAllowsChildren()
          Returns true if this ForwardsASTNode allows children.
 javax.swing.tree.TreeNode getChildAt(int childIndex)
          Gets a specific child ForwardsASTNode.
 int getChildCount()
          Gets the number of the child ForwardsASTNode.
 int getChildIndex()
          Gets the index in the children list of the parent.
 java.util.ArrayList getChildren()
          Gets the list of the children ForwardsASTNodes.
 int getIndex(javax.swing.tree.TreeNode node)
          Gets the index of a specific child ForwardsASTNode.
 javax.swing.tree.TreeNode getParent()
          Gets the directed parent node.
 org.eclipse.jdt.core.dom.ASTNode getSelf()
          Gets the corresponding ASTNode.
 boolean isLeaf()
          Indicates whether this ForwardsASTNode is a leaf.
 void setChildIndex(int index)
          Sets the index in the children list of my parent.
 void setParent(ForwardsASTNode parent)
          Sets the parent ForwardsASTNode.
 void setSelf(org.eclipse.jdt.core.dom.ASTNode self)
          Sets the corresponding ASTNode.
 java.lang.String toString()
          Gets the string representation of this ForwardsASTNode.
 
从类 java.lang.Object 继承的方法
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

字段详细信息

childrenList

private java.util.ArrayList childrenList
The child ForwardsASTNodes of this ForwardsASTNode.


selfNode

private org.eclipse.jdt.core.dom.ASTNode selfNode
The ASTNode this ForwardsASTNode corresponds to.


parentNode

private ForwardsASTNode parentNode
The directed parent ForwardsASTNode.


childIndex

private int childIndex
The index of children.

构造函数详细信息

ForwardsASTNode

ForwardsASTNode()
方法详细信息

getParent

public javax.swing.tree.TreeNode getParent()
Gets the directed parent node.

指定者:
接口 javax.swing.tree.TreeNode 中的 getParent
返回:
the directed parent node and the actual type is ForwardsASTNode.

getChildCount

public int getChildCount()
Gets the number of the child ForwardsASTNode.

指定者:
接口 javax.swing.tree.TreeNode 中的 getChildCount
返回:
the number of the children

getChildAt

public javax.swing.tree.TreeNode getChildAt(int childIndex)
Gets a specific child ForwardsASTNode.

指定者:
接口 javax.swing.tree.TreeNode 中的 getChildAt
参数:
childIndex - the index of the child (from 0)
返回:
the child node and the actual type is ForwardsASTNode.

getIndex

public int getIndex(javax.swing.tree.TreeNode node)
Gets the index of a specific child ForwardsASTNode.

指定者:
接口 javax.swing.tree.TreeNode 中的 getIndex
参数:
node - the child ForwardsASTNode
返回:
the index of the child ForwardsASTNode.

getAllowsChildren

public boolean getAllowsChildren()
Returns true if this ForwardsASTNode allows children.

指定者:
接口 javax.swing.tree.TreeNode 中的 getAllowsChildren
返回:
true.

isLeaf

public boolean isLeaf()
Indicates whether this ForwardsASTNode is a leaf.

指定者:
接口 javax.swing.tree.TreeNode 中的 isLeaf
返回:
true if this ForwardsASTNode is a leaf.

children

public java.util.Enumeration children()
Returns the children of this ForwardsASTNode as an Enumeration.

指定者:
接口 javax.swing.tree.TreeNode 中的 children
返回:
an Enumeration and type of the element is ForwardsASTNode.

setParent

public void setParent(ForwardsASTNode parent)
Sets the parent ForwardsASTNode.

参数:
parent - the parent ForwardsASTNode

getChildren

public java.util.ArrayList getChildren()
Gets the list of the children ForwardsASTNodes.

返回:
the list of the children; each member is of type ForwardsASTNode.

addChild

public void addChild(ForwardsASTNode child)
Adds a child.

参数:
child - the ForwardsASTNode to be added.

getSelf

public org.eclipse.jdt.core.dom.ASTNode getSelf()
Gets the corresponding ASTNode.

返回:
the corrsponding ASTNode.

setSelf

public void setSelf(org.eclipse.jdt.core.dom.ASTNode self)
Sets the corresponding ASTNode.

参数:
self - the ASTNode to be set.

getChildIndex

public int getChildIndex()
Gets the index in the children list of the parent.

返回:
the index in the children list of the parent.

setChildIndex

public void setChildIndex(int index)
Sets the index in the children list of my parent.

参数:
index - the index in the children list of my parent.

toString

public java.lang.String toString()
Gets the string representation of this ForwardsASTNode.

覆盖:
java.lang.Object 中的 toString
返回:
the string representation of this ForwardsASTNode.