gate.gui
Class SchemaAnnotationEditor

java.lang.Object
  extended by java.awt.Component
      extended by java.awt.Container
          extended by javax.swing.JComponent
              extended by javax.swing.JPanel
                  extended by gate.creole.AbstractVisualResource
                      extended by gate.gui.SchemaAnnotationEditor
All Implemented Interfaces:
AnnotationVisualResource, ResizableVisualResource, Resource, FeatureBearer, NameBearer, VisualResource, ImageObserver, MenuContainer, Serializable, Accessible

Deprecated.

public class SchemaAnnotationEditor
extends AbstractVisualResource
implements AnnotationVisualResource, ResizableVisualResource

This class is a viewer which adds/edits features on a GATE annotation. This viewer is AnnotationSchema driven. This class has been deprecated! This functionality is now provided by the AnnotationEditor and SchemaAnnotationEditor classes.

See Also:
Serialized Form

Nested Class Summary
protected  class SchemaAnnotationEditor.FeaturesTableModel
          Deprecated.  
(package private)  class SchemaAnnotationEditor.InnerFeaturesEditor
          Deprecated. This inner class deals with the feature type being eddited.
(package private)  class SchemaAnnotationEditor.RowData
          Deprecated. Internal class used in the inner FeaturesTableModel class
 
Nested classes/interfaces inherited from class javax.swing.JPanel
JPanel.AccessibleJPanel
 
Nested classes/interfaces inherited from class javax.swing.JComponent
JComponent.AccessibleJComponent
 
Nested classes/interfaces inherited from class java.awt.Container
Container.AccessibleAWTContainer
 
Nested classes/interfaces inherited from class java.awt.Component
Component.AccessibleAWTComponent, Component.BaselineResizeBehavior, Component.BltBufferStrategy, Component.FlipBufferStrategy
 
Field Summary
(package private)  JButton addFeatButton
          Deprecated. This button does the opposite of the above
(package private)  JComboBox annotSchemaComboBox
          Deprecated. Displays all possible annotation schema loaded into the system
(package private)  Annotation currentAnnot
          Deprecated. The curent annotation used by the editor
(package private)  List currentAnnotationSchemaList
          Deprecated. The annotation schema present into the system
(package private)  FeatureMap currentAnnotFeaturesMap
          Deprecated. The current FeatureMap used by the editor
(package private)  AnnotationSchema currentAnnotSchema
          Deprecated. This is the currentAnnotSchema being used by the editor
(package private)  AnnotationSet currentAnnotSet
          Deprecated. The curent annotation set used by the editor
(package private)  Long currentEndOffset
          Deprecated. The end offset of the span covered by the currentAnnot
(package private)  Long currentStartOffset
          Deprecated. The start offset of the span covered by the currentAnnot
(package private)  JList featureSchemaList
          Deprecated. Displays all possible features of the annotation being editted (taken from AnnotationSchema)
(package private)  SchemaAnnotationEditor.InnerFeaturesEditor featuresEditor
          Deprecated. This inner class deals with feature editting
(package private)  JScrollPane featuresListScroll
          Deprecated. A JScroll for the featuresTable component
(package private)  JTable featuresTable
          Deprecated. Displays the current features of the annotation being editted
(package private)  JScrollPane featuresTableScroll
          Deprecated. A JScroll for the featuresTable component
(package private)  DefaultListModel listModel
          Deprecated. A list model used to represent the features not assigned to an annot
(package private)  Map name2annotSchemaMap
          Deprecated. A map from annotation type to its AnnotationSchema definition
(package private)  Map name2featureSchemaMap
          Deprecated. A map from feature name to its FeatureSchema definition
(package private)  JButton removeFeatButton
          Deprecated. This button removes current features and add them to possible feature list
(package private)  FeatureMap responseMap
          Deprecated. This field is returned when a featureMap was editted or created
(package private)  SchemaAnnotationEditor.FeaturesTableModel tableModel
          Deprecated. This field is the table model used to represent features
 
Fields inherited from class gate.creole.AbstractVisualResource
features, handle
 
Fields inherited from class javax.swing.JComponent
accessibleContext, listenerList, TOOL_TIP_TEXT_KEY, ui, UNDEFINED_CONDITION, WHEN_ANCESTOR_OF_FOCUSED_COMPONENT, WHEN_FOCUSED, WHEN_IN_FOCUSED_WINDOW
 
Fields inherited from class java.awt.Component
BOTTOM_ALIGNMENT, CENTER_ALIGNMENT, LEFT_ALIGNMENT, RIGHT_ALIGNMENT, TOP_ALIGNMENT
 
Fields inherited from interface java.awt.image.ImageObserver
ABORT, ALLBITS, ERROR, FRAMEBITS, HEIGHT, PROPERTIES, SOMEBITS, WIDTH
 
Constructor Summary
SchemaAnnotationEditor()
          Deprecated. Default constructor
 
Method Summary
protected  void buildGuiComponents()
          Deprecated. This method creates the GUI components and places them into the layout
 void cancelAction()
          Deprecated. Called by the GUI when the user has pressed the "Cancel" button.
 boolean canDisplayAnnotationType(String annotationType)
          Deprecated. Checks whether this viewer/editor can handle a specific annotation type.
private  void doAddFeature(String aFeatureName)
          Deprecated. This method adds a feature from the list to the table
private  void doAddFeatures()
          Deprecated. This method adds features from the list to the table
private  void doRemoveFeature(int rowIndex)
          Deprecated. This removes the feature @ rowIndex
private  void doRemoveFeatures()
          Deprecated. This method remove a feature from the table and adds it to the list
 void editAnnotation(Annotation ann, AnnotationSet set)
          Deprecated. Used when the viewer/editor has to display/edit an existing annotation
 boolean editingFinished()
          Deprecated. Always returns true.
 Annotation getAnnotationCurrentlyEdited()
          Deprecated. Returns the anntoation curerntly edited.
 AnnotationSet getAnnotationSetCurrentlyEdited()
          Deprecated.  
protected  void initGuiComponents()
          Deprecated. Init GUI components with values taken from local data
protected  void initListeners()
          Deprecated. Init all the listeners
protected  void initLocalData()
          Deprecated. Init local data needed by the GUI components to initialize
 boolean isActive()
          Deprecated. Checks whether the annotation editor is active (shown on screen and ready to edit annotations.
 void okAction()
          Deprecated. Called by the GUI when the user has pressed the "OK" button.
 void setTarget(Object target)
          Deprecated. Called by the GUI when this viewer/editor has to initialise itself for a specific annotation or text span.
 boolean supportsCancel()
          Deprecated. Returns true
 
Methods inherited from class gate.creole.AbstractVisualResource
cleanup, getFeatures, getParameterValue, init, setFeatures, setHandle, setParameterValue, setParameterValues
 
Methods inherited from class javax.swing.JPanel
getAccessibleContext, getUI, getUIClassID, paramString, setUI, updateUI
 
Methods inherited from class javax.swing.JComponent
addAncestorListener, addNotify, addVetoableChangeListener, computeVisibleRect, contains, createToolTip, disable, enable, firePropertyChange, firePropertyChange, firePropertyChange, fireVetoableChange, getActionForKeyStroke, getActionMap, getAlignmentX, getAlignmentY, getAncestorListeners, getAutoscrolls, getBaseline, getBaselineResizeBehavior, getBorder, getBounds, getClientProperty, getComponentGraphics, getComponentPopupMenu, getConditionForKeyStroke, getDebugGraphicsOptions, getDefaultLocale, getFontMetrics, getGraphics, getHeight, getInheritsPopupMenu, getInputMap, getInputMap, getInputVerifier, getInsets, getInsets, getListeners, getLocation, getMaximumSize, getMinimumSize, getNextFocusableComponent, getPopupLocation, getPreferredSize, getRegisteredKeyStrokes, getRootPane, getSize, getToolTipLocation, getToolTipText, getToolTipText, getTopLevelAncestor, getTransferHandler, getVerifyInputWhenFocusTarget, getVetoableChangeListeners, getVisibleRect, getWidth, getX, getY, grabFocus, isDoubleBuffered, isLightweightComponent, isManagingFocus, isOpaque, isOptimizedDrawingEnabled, isPaintingForPrint, isPaintingTile, isRequestFocusEnabled, isValidateRoot, paint, paintBorder, paintChildren, paintComponent, paintImmediately, paintImmediately, print, printAll, printBorder, printChildren, printComponent, processComponentKeyEvent, processKeyBinding, processKeyEvent, processMouseEvent, processMouseMotionEvent, putClientProperty, registerKeyboardAction, registerKeyboardAction, removeAncestorListener, removeNotify, removeVetoableChangeListener, repaint, repaint, requestDefaultFocus, requestFocus, requestFocus, requestFocusInWindow, requestFocusInWindow, resetKeyboardActions, reshape, revalidate, scrollRectToVisible, setActionMap, setAlignmentX, setAlignmentY, setAutoscrolls, setBackground, setBorder, setComponentPopupMenu, setDebugGraphicsOptions, setDefaultLocale, setDoubleBuffered, setEnabled, setFocusTraversalKeys, setFont, setForeground, setInheritsPopupMenu, setInputMap, setInputVerifier, setMaximumSize, setMinimumSize, setNextFocusableComponent, setOpaque, setPreferredSize, setRequestFocusEnabled, setToolTipText, setTransferHandler, setUI, setVerifyInputWhenFocusTarget, setVisible, unregisterKeyboardAction, update
 
Methods inherited from class java.awt.Container
add, add, add, add, add, addContainerListener, addImpl, addPropertyChangeListener, addPropertyChangeListener, applyComponentOrientation, areFocusTraversalKeysSet, countComponents, deliverEvent, doLayout, findComponentAt, findComponentAt, getComponent, getComponentAt, getComponentAt, getComponentCount, getComponents, getComponentZOrder, getContainerListeners, getFocusTraversalKeys, getFocusTraversalPolicy, getLayout, getMousePosition, insets, invalidate, isAncestorOf, isFocusCycleRoot, isFocusCycleRoot, isFocusTraversalPolicyProvider, isFocusTraversalPolicySet, layout, list, list, locate, minimumSize, paintComponents, preferredSize, printComponents, processContainerEvent, processEvent, remove, remove, removeAll, removeContainerListener, setComponentZOrder, setFocusCycleRoot, setFocusTraversalPolicy, setFocusTraversalPolicyProvider, setLayout, transferFocusBackward, transferFocusDownCycle, validate, validateTree
 
Methods inherited from class java.awt.Component
action, add, addComponentListener, addFocusListener, addHierarchyBoundsListener, addHierarchyListener, addInputMethodListener, addKeyListener, addMouseListener, addMouseMotionListener, addMouseWheelListener, bounds, checkImage, checkImage, coalesceEvents, contains, createImage, createImage, createVolatileImage, createVolatileImage, disableEvents, dispatchEvent, enable, enableEvents, enableInputMethods, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, getBackground, getBounds, getColorModel, getComponentListeners, getComponentOrientation, getCursor, getDropTarget, getFocusCycleRootAncestor, getFocusListeners, getFocusTraversalKeysEnabled, getFont, getForeground, getGraphicsConfiguration, getHierarchyBoundsListeners, getHierarchyListeners, getIgnoreRepaint, getInputContext, getInputMethodListeners, getInputMethodRequests, getKeyListeners, getLocale, getLocation, getLocationOnScreen, getMouseListeners, getMouseMotionListeners, getMousePosition, getMouseWheelListeners, getName, getParent, getPeer, getPropertyChangeListeners, getPropertyChangeListeners, getSize, getToolkit, getTreeLock, gotFocus, handleEvent, hasFocus, hide, imageUpdate, inside, isBackgroundSet, isCursorSet, isDisplayable, isEnabled, isFocusable, isFocusOwner, isFocusTraversable, isFontSet, isForegroundSet, isLightweight, isMaximumSizeSet, isMinimumSizeSet, isPreferredSizeSet, isShowing, isValid, isVisible, keyDown, keyUp, list, list, list, location, lostFocus, mouseDown, mouseDrag, mouseEnter, mouseExit, mouseMove, mouseUp, move, nextFocus, paintAll, postEvent, prepareImage, prepareImage, processComponentEvent, processFocusEvent, processHierarchyBoundsEvent, processHierarchyEvent, processInputMethodEvent, processMouseWheelEvent, remove, removeComponentListener, removeFocusListener, removeHierarchyBoundsListener, removeHierarchyListener, removeInputMethodListener, removeKeyListener, removeMouseListener, removeMouseMotionListener, removeMouseWheelListener, removePropertyChangeListener, removePropertyChangeListener, repaint, repaint, repaint, resize, resize, setBounds, setBounds, setComponentOrientation, setCursor, setDropTarget, setFocusable, setFocusTraversalKeysEnabled, setIgnoreRepaint, setLocale, setLocation, setLocation, setName, setSize, setSize, show, show, size, toString, transferFocus, transferFocusUpCycle
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface gate.VisualResource
setHandle
 
Methods inherited from interface gate.Resource
cleanup, getParameterValue, init, setParameterValue, setParameterValues
 
Methods inherited from interface gate.util.FeatureBearer
getFeatures, setFeatures
 
Methods inherited from interface gate.util.NameBearer
getName, setName
 

Field Detail

currentAnnotationSchemaList

List currentAnnotationSchemaList
Deprecated. 
The annotation schema present into the system


currentAnnotSet

AnnotationSet currentAnnotSet
Deprecated. 
The curent annotation set used by the editor


currentAnnot

Annotation currentAnnot
Deprecated. 
The curent annotation used by the editor


currentStartOffset

Long currentStartOffset
Deprecated. 
The start offset of the span covered by the currentAnnot


currentEndOffset

Long currentEndOffset
Deprecated. 
The end offset of the span covered by the currentAnnot


currentAnnotSchema

AnnotationSchema currentAnnotSchema
Deprecated. 
This is the currentAnnotSchema being used by the editor


currentAnnotFeaturesMap

FeatureMap currentAnnotFeaturesMap
Deprecated. 
The current FeatureMap used by the editor


responseMap

FeatureMap responseMap
Deprecated. 
This field is returned when a featureMap was editted or created


tableModel

SchemaAnnotationEditor.FeaturesTableModel tableModel
Deprecated. 
This field is the table model used to represent features


name2featureSchemaMap

Map name2featureSchemaMap
Deprecated. 
A map from feature name to its FeatureSchema definition


name2annotSchemaMap

Map name2annotSchemaMap
Deprecated. 
A map from annotation type to its AnnotationSchema definition


listModel

DefaultListModel listModel
Deprecated. 
A list model used to represent the features not assigned to an annot


featuresTable

JTable featuresTable
Deprecated. 
Displays the current features of the annotation being editted


featuresTableScroll

JScrollPane featuresTableScroll
Deprecated. 
A JScroll for the featuresTable component


featureSchemaList

JList featureSchemaList
Deprecated. 
Displays all possible features of the annotation being editted (taken from AnnotationSchema)


featuresListScroll

JScrollPane featuresListScroll
Deprecated. 
A JScroll for the featuresTable component


removeFeatButton

JButton removeFeatButton
Deprecated. 
This button removes current features and add them to possible feature list


addFeatButton

JButton addFeatButton
Deprecated. 
This button does the opposite of the above


annotSchemaComboBox

JComboBox annotSchemaComboBox
Deprecated. 
Displays all possible annotation schema loaded into the system


featuresEditor

SchemaAnnotationEditor.InnerFeaturesEditor featuresEditor
Deprecated. 
This inner class deals with feature editting

Constructor Detail

SchemaAnnotationEditor

public SchemaAnnotationEditor()
Deprecated. 
Default constructor

Method Detail

setTarget

public void setTarget(Object target)
Deprecated. 
Called by the GUI when this viewer/editor has to initialise itself for a specific annotation or text span.

Specified by:
setTarget in interface VisualResource
Overrides:
setTarget in class AbstractVisualResource
Parameters:
target - the object which will always be a AnnotationSet

editAnnotation

public void editAnnotation(Annotation ann,
                           AnnotationSet set)
Deprecated. 
Used when the viewer/editor has to display/edit an existing annotation

Specified by:
editAnnotation in interface AnnotationVisualResource
Parameters:
ann - the annotation to be displayed or edited. If ann is null then the method simply returns
set - the set to which the new annotation belongs.

okAction

public void okAction()
              throws GateException
Deprecated. 
Called by the GUI when the user has pressed the "OK" button. This should trigger the saving of the newly created annotation(s)

Specified by:
okAction in interface AnnotationVisualResource
Throws:
GateException

cancelAction

public void cancelAction()
                  throws GateException
Deprecated. 
Description copied from interface: AnnotationVisualResource
Called by the GUI when the user has pressed the "Cancel" button. This should trigger cleaning up action, if the editor has done any changes to the annotation sets or document or annotation

Specified by:
cancelAction in interface AnnotationVisualResource
Throws:
GateException

canDisplayAnnotationType

public boolean canDisplayAnnotationType(String annotationType)
Deprecated. 
Checks whether this viewer/editor can handle a specific annotation type.

Specified by:
canDisplayAnnotationType in interface AnnotationVisualResource
Parameters:
annotationType - represents the annotation type being questioned.If it is null then the method will return false.
Returns:
true if the SchemaAnnotationEditor can handle the annotationType or false otherwise.

editingFinished

public boolean editingFinished()
Deprecated. 
Always returns true.

Specified by:
editingFinished in interface AnnotationVisualResource
Returns:
true iff the editor has finished editing the current annotation. This might return false for instance when the current annotation does not yet comply with the schema and the editor implementation is designed to enforce schemas.

getAnnotationCurrentlyEdited

public Annotation getAnnotationCurrentlyEdited()
Deprecated. 
Returns the anntoation curerntly edited.

Specified by:
getAnnotationCurrentlyEdited in interface AnnotationVisualResource
Returns:
the annotation currently edited

getAnnotationSetCurrentlyEdited

public AnnotationSet getAnnotationSetCurrentlyEdited()
Deprecated. 
Specified by:
getAnnotationSetCurrentlyEdited in interface AnnotationVisualResource
Returns:
the annotation set currently edited

isActive

public boolean isActive()
Deprecated. 
Description copied from interface: AnnotationVisualResource
Checks whether the annotation editor is active (shown on screen and ready to edit annotations.

Specified by:
isActive in interface AnnotationVisualResource
Returns:
true iff the editor is active.

supportsCancel

public boolean supportsCancel()
Deprecated. 
Returns true

Specified by:
supportsCancel in interface AnnotationVisualResource
Returns:
true iff this editor can rollback changes.

initLocalData

protected void initLocalData()
Deprecated. 
Init local data needed by the GUI components to initialize


buildGuiComponents

protected void buildGuiComponents()
Deprecated. 
This method creates the GUI components and places them into the layout


initGuiComponents

protected void initGuiComponents()
Deprecated. 
Init GUI components with values taken from local data


initListeners

protected void initListeners()
Deprecated. 
Init all the listeners


doRemoveFeatures

private void doRemoveFeatures()
Deprecated. 
This method remove a feature from the table and adds it to the list


doRemoveFeature

private void doRemoveFeature(int rowIndex)
Deprecated. 
This removes the feature @ rowIndex


doAddFeatures

private void doAddFeatures()
Deprecated. 
This method adds features from the list to the table


doAddFeature

private void doAddFeature(String aFeatureName)
Deprecated. 
This method adds a feature from the list to the table