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

Fields inherited from class javax.swing.tree.DefaultMutableTreeNode
EMPTY_ENUMERATION
 
Constructor Summary
STreeNode()
           
STreeNode(Annotation annot)
           
STreeNode(int start, int end)
           
 
Method Summary
 boolean createAnnotation(Document doc, String type, String text, int utteranceOffset)
          Creates an annotation of the given type.
 void disconnectChildren()
           
 Annotation getAnnotation()
           
 int getEnd()
           
 int getID()
           
 int getLevel()
           
 int getStart()
           
 void removeAnnotation(Document doc)
          Store the annotation in the deleted list so it can retrieved later
 void setAnnotation(Annotation annot)
          This also sets the span to match the annotation span!
 void setEnd(int end)
           
 void setLevel(int level)
           
 void setStart(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, 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, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

STreeNode

public STreeNode(Annotation annot)

STreeNode

public STreeNode(int start,
                 int end)

STreeNode

public STreeNode()
Method Detail

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