|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectjavax.swing.tree.DefaultMutableTreeNode
org.annotation.util.SpanTreeNode
SpanTreeNode is a data structure to hold a tree of spans. Spans are inserted such that any span which is contained by another span will be one of its children. Associated with a span is a data element which is is of type Object.
Field Summary | |
protected Span |
span
|
Fields inherited from class javax.swing.tree.DefaultMutableTreeNode |
allowsChildren, children, EMPTY_ENUMERATION, parent, userObject |
Constructor Summary | |
SpanTreeNode(Span s,
java.lang.Object data)
|
Method Summary | |
SpanTreeNode |
add(SpanTreeNode node)
Adds a SpanTreeNode to an existing tree inserting it in its proper location. |
protected SpanTreeNode |
equalAdd(SpanTreeNode node)
Inserts node into the tree and makes this its
child. |
protected int |
findInsertionIndex(Span s)
returns the index where the span s would be inserted if the spans were sorted based on their start index alone. |
SpanTreeNode[] |
getContainedNodesWithProperty(Span s,
java.lang.String p,
boolean top)
Finds nodes which are contained by span s and have
property p . |
SpanTreeNode[] |
getContainedNodesWithProperty(java.lang.String p,
boolean top)
Finds nodes which are contained by this node's span and have property p . |
SpanTreeNode |
getContainerNodeWithProperty(Span s,
java.lang.String p)
Finds node having property p which contains span
s |
SpanTreeNode |
getNode(Span s)
|
Span |
getSpan()
|
boolean |
hasProperty(java.lang.String p)
|
protected void |
init(java.lang.Object data)
|
void |
showIndent(java.lang.String indent)
|
void |
simpleAdd(SpanTreeNode node)
|
Methods inherited from class javax.swing.tree.DefaultMutableTreeNode |
add, breadthFirstEnumeration, children, clone, depthFirstEnumeration, getAllowsChildren, getChildAfter, getChildAt, getChildBefore, getChildCount, getDepth, getFirstChild, getFirstLeaf, getIndex, getLastChild, getLastLeaf, getLeafCount, getLevel, getNextLeaf, getNextNode, getNextSibling, getParent, getPath, getPathToRoot, getPreviousLeaf, getPreviousNode, getPreviousSibling, getRoot, getSharedAncestor, getSiblingCount, getUserObject, getUserObjectPath, insert, isLeaf, isNodeAncestor, isNodeChild, isNodeDescendant, isNodeRelated, isNodeSibling, isRoot, pathFromAncestorEnumeration, postorderEnumeration, preorderEnumeration, remove, remove, removeAllChildren, removeFromParent, setAllowsChildren, setParent, setUserObject, toString |
Methods inherited from class java.lang.Object |
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
protected Span span
Constructor Detail |
public SpanTreeNode(Span s, java.lang.Object data)
Method Detail |
protected void init(java.lang.Object data)
public Span getSpan()
public void simpleAdd(SpanTreeNode node)
public SpanTreeNode getNode(Span s)
protected SpanTreeNode equalAdd(SpanTreeNode node)
node
into the tree and makes this its
child. Called when node
has the same span as
this.
public SpanTreeNode add(SpanTreeNode node)
node
unless a node in the tree with the same
span already exist.
protected int findInsertionIndex(Span s)
public SpanTreeNode getContainerNodeWithProperty(Span s, java.lang.String p)
p
which contains span
s
public SpanTreeNode[] getContainedNodesWithProperty(java.lang.String p, boolean top)
p
. If top
is true then only the
top-most nodes are returned, otherwise all nodes satisfying the above
criteria are returned.
public SpanTreeNode[] getContainedNodesWithProperty(Span s, java.lang.String p, boolean top)
s
and have
property p
. If top
is true then only the
top-most nodes are returned, otherwise all nodes satisfying the above
criteria are returned.
public boolean hasProperty(java.lang.String p)
public void showIndent(java.lang.String indent)
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |