GATE
Version 3.1-2270

gate.gui.docview
Class AnnotationEditor

java.lang.Object
  extended by gate.gui.docview.AnnotationEditor

public class AnnotationEditor
extends Object

Author:
Valentin Tablan

Nested Class Summary
protected  class AnnotationEditor.AnnotationAction
          Base class for actions on annotations.
protected  class AnnotationEditor.ApplyAction
           
protected  class AnnotationEditor.DeleteAnnotationAction
           
protected  class AnnotationEditor.DismissAction
           
protected  class AnnotationEditor.EndOffsetLeftAction
           
protected  class AnnotationEditor.EndOffsetRightAction
           
protected  class AnnotationEditor.StartOffsetLeftAction
           
protected  class AnnotationEditor.StartOffsetRightAction
           
 
Field Summary
protected  Annotation ann
           
protected  JWindow bottomWindow
           
protected static int CTRL_SHIFT_INCREMENT
           
protected  AnnotationEditor.DeleteAnnotationAction delAction
           
protected  AnnotationEditor.DismissAction dismissAction
           
protected  AnnotationEditor.EndOffsetLeftAction eolAction
           
protected  AnnotationEditor.EndOffsetRightAction eorAction
           
protected  FeaturesSchemaEditor featuresEditor
           
protected static int HIDE_DELAY
           
protected  Timer hideTimer
           
protected  Object highlight
           
protected  Map schemasByType
          Stores the Annotation schema objects available in the system.
protected  JScrollPane scroller
           
protected  AnnotationSet set
           
protected  AnnotationSetsView setsView
           
protected static int SHIFT_INCREMENT
           
protected  AnnotationEditor.StartOffsetLeftAction solAction
           
protected  AnnotationEditor.StartOffsetRightAction sorAction
           
protected  JEditorPane textPane
           
protected  TextualDocumentView textView
           
protected  JComboBox typeCombo
           
 
Constructor Summary
AnnotationEditor(TextualDocumentView textView, AnnotationSetsView setsView)
           
 
Method Summary
 void hide()
           
protected  void initBottomWindow(Window parent)
           
protected  void initData()
           
protected  void initGUI()
           
protected  void initListeners()
           
 boolean isShowing()
           
protected  void moveAnnotation(AnnotationSet set, Annotation oldAnnotation, Long newStartOffset, Long newEndOffset)
          Changes the span of an existing annotation by creating a new annotation with the same ID, type and features but with the new start and end offsets.
protected  void placeWindows()
           
 void setAnnotation(Annotation ann, AnnotationSet set)
           
 void show(boolean autohide)
          Shows the UI(s) involved in annotation editing.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

bottomWindow

protected JWindow bottomWindow

typeCombo

protected JComboBox typeCombo

featuresEditor

protected FeaturesSchemaEditor featuresEditor

scroller

protected JScrollPane scroller

solAction

protected AnnotationEditor.StartOffsetLeftAction solAction

sorAction

protected AnnotationEditor.StartOffsetRightAction sorAction

eolAction

protected AnnotationEditor.EndOffsetLeftAction eolAction

eorAction

protected AnnotationEditor.EndOffsetRightAction eorAction

dismissAction

protected AnnotationEditor.DismissAction dismissAction

delAction

protected AnnotationEditor.DeleteAnnotationAction delAction

hideTimer

protected Timer hideTimer

HIDE_DELAY

protected static final int HIDE_DELAY
See Also:
Constant Field Values

SHIFT_INCREMENT

protected static final int SHIFT_INCREMENT
See Also:
Constant Field Values

CTRL_SHIFT_INCREMENT

protected static final int CTRL_SHIFT_INCREMENT
See Also:
Constant Field Values

highlight

protected Object highlight

schemasByType

protected Map schemasByType
Stores the Annotation schema objects available in the system. The annotation types are used as keys for the map.


textView

protected TextualDocumentView textView

setsView

protected AnnotationSetsView setsView

textPane

protected JEditorPane textPane

ann

protected Annotation ann

set

protected AnnotationSet set
Constructor Detail

AnnotationEditor

public AnnotationEditor(TextualDocumentView textView,
                        AnnotationSetsView setsView)
Method Detail

initData

protected void initData()

initBottomWindow

protected void initBottomWindow(Window parent)

initListeners

protected void initListeners()

initGUI

protected void initGUI()

setAnnotation

public void setAnnotation(Annotation ann,
                          AnnotationSet set)

isShowing

public boolean isShowing()

show

public void show(boolean autohide)
Shows the UI(s) involved in annotation editing.


placeWindows

protected void placeWindows()

moveAnnotation

protected void moveAnnotation(AnnotationSet set,
                              Annotation oldAnnotation,
                              Long newStartOffset,
                              Long newEndOffset)
                       throws InvalidOffsetException
Changes the span of an existing annotation by creating a new annotation with the same ID, type and features but with the new start and end offsets.

Parameters:
set - the annotation set
oldAnnotation - the annotation to be moved
newStartOffset - the new start offset
newEndOffset - the new end offset
Throws:
InvalidOffsetException

hide

public void hide()

GATE
Version 3.1-2270