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
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, remove, remove, removeAllChildren, removeFromParent, setAllowsChildren, setParent, setUserObject, toString |
DEBUG
private static final boolean DEBUG
- Debug flag
- See Also:
- Constant Field Values
ADDEDSET
private static final String ADDEDSET
- See Also:
- Constant Field Values
REMOVEDSET
private static final String REMOVEDSET
- See Also:
- Constant Field Values
nextID
static int nextID
level
int level
nodeID
int nodeID
start
long start
end
long end
annot
Annotation annot
STreeNode
public STreeNode(Annotation annot)
STreeNode
public STreeNode(long start,
long end)
STreeNode
public STreeNode()
getLevel
public int getLevel()
- Overrides:
getLevel
in class DefaultMutableTreeNode
setLevel
public void setLevel(long level)
setLevel
public void setLevel(int level)
getID
public int getID()
getStart
public long getStart()
setStart
public void setStart(long start)
getEnd
public long getEnd()
setEnd
public void setEnd(long 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,
long 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!
transferAnnotations
public static boolean transferAnnotations(Document doc,
AnnotationSet targetAS)
- Transfers the annotations from added to the given annotation set
Also, for each annotation in removed, removes it from the given annotation set
Called by OkAction() in the treeViewer to finalise the changes.
undo
public static void undo(Document doc)
removeAnnotation
public void removeAnnotation(Document doc)
- Store the annotation in the deleted list so it can retrieved later