gate.gui
Class STreeNode
java.lang.Object
|
+--javax.swing.tree.DefaultMutableTreeNode
|
+--gate.gui.STreeNode
- All Implemented Interfaces:
- Cloneable, MutableTreeNode, Serializable, TreeNode
- public class STreeNode
- extends DefaultMutableTreeNode
- See Also:
- Serialized Form
Field Summary |
(package private) Annotation |
annot
|
private static boolean |
DEBUG
Debug flag |
(package private) int |
end
|
(package private) int |
level
|
(package private) static int |
nextID
|
(package private) int |
nodeID
|
(package private) int |
start
|
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, 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, readObject, remove, remove, removeAllChildren, removeFromParent, setAllowsChildren, setParent, setUserObject, toString, writeObject |
DEBUG
private static final boolean DEBUG
- Debug flag
nextID
static int nextID
level
int level
nodeID
int nodeID
start
int start
end
int end
annot
Annotation annot
STreeNode
public STreeNode(Annotation annot)
STreeNode
public STreeNode(int start,
int end)
STreeNode
public STreeNode()
getLevel
public int getLevel()
- Overrides:
getLevel
in class DefaultMutableTreeNode
setLevel
public void setLevel(int level)
getID
public int getID()
getStart
public int getStart()
setStart
public void setStart(int start)
getEnd
public int getEnd()
setEnd
public void setEnd(int end)
setAnnotation
public void setAnnotation(Annotation annot)
- This also sets the span to match the annotation span!
getAnnotation
public Annotation getAnnotation()
disconnectChildren
public void disconnectChildren()
createAnnotation
public boolean createAnnotation(Document doc,
String type,
String text,
int utteranceOffset)
- Creates an annotation of the given type. If the children don't have their
annotation objects created, it creates them and assigns the pointers.
Expects the text string relative to which all offsets were created!
removeAnnotation
public void removeAnnotation(Document doc)
- Store the annotation in the deleted list so it can retrieved later