|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--java.awt.Component | +--java.awt.Container | +--javax.swing.JComponent | +--javax.swing.JPanel | +--gate.creole.AbstractVisualResource | +--gate.gui.SchemaAnnotationEditor
This class is a viewer which adds/edits features on a GATE annotation.
This viewer is AnnotationSchema
driven.
Inner Class Summary | |
protected class |
SchemaAnnotationEditor.FeaturesTableModel
|
(package private) class |
SchemaAnnotationEditor.InnerFeaturesEditor
This inner class deals with the feature type being eddited. |
(package private) class |
SchemaAnnotationEditor.RowData
Internal class used in the inner FeaturesTableModel class |
Inner classes inherited from class javax.swing.JPanel |
JPanel.AccessibleJPanel |
Inner classes inherited from class javax.swing.JComponent |
JComponent.AccessibleJComponent, JComponent.ActionStandin, JComponent.IntVector, JComponent.KeyboardState |
Inner classes inherited from class java.awt.Container |
Container.AccessibleAWTContainer |
Inner classes inherited from class java.awt.Component |
Component.AccessibleAWTComponent, Component.AWTTreeLock |
Field Summary | |
(package private) JButton |
addFeatButton
This button does the opposite of the above |
(package private) JComboBox |
annotSchemaComboBox
Displays all possible annotation schema loaded into the system |
(package private) Annotation |
currentAnnot
The curent annotation used by the editor |
(package private) List |
currentAnnotationSchemaList
The annotation schema present into the system |
(package private) FeatureMap |
currentAnnotFeaturesMap
The current FeatureMap used by the editor |
(package private) AnnotationSchema |
currentAnnotSchema
This is the currentAnnotSchema being used by the editor |
(package private) AnnotationSet |
currentAnnotSet
The curent annotation set used by the editor |
(package private) Long |
currentEndOffset
The end offset of the span covered by the currentAnnot |
(package private) Long |
currentStartOffset
The start offset of the span covered by the currentAnnot |
(package private) JList |
featureSchemaList
Displays all possible features of the annotation being editted (taken from AnnotationSchema) |
(package private) SchemaAnnotationEditor.InnerFeaturesEditor |
featuresEditor
This inner class deals with feature editting |
(package private) JScrollPane |
featuresListScroll
A JScroll for the featuresTable component |
(package private) JTable |
featuresTable
Displays the current features of the annotation being editted |
(package private) JScrollPane |
featuresTableScroll
A JScroll for the featuresTable component |
(package private) DefaultListModel |
listModel
A list model used to represent the features not assigned to an annot |
(package private) Map |
name2annotSchemaMap
A map from annotation type to its AnnotationSchema definition |
(package private) Map |
name2featureSchemaMap
A map from feature name to its FeatureSchema definition |
(package private) JButton |
removeFeatButton
This button removes current features and add them to possible feature list |
(package private) FeatureMap |
responseMap
This field is returned when a featureMap was editted or created |
(package private) SchemaAnnotationEditor.FeaturesTableModel |
tableModel
This field is the table model used to represent features |
Fields inherited from class gate.creole.AbstractVisualResource |
features |
Fields inherited from class javax.swing.JPanel |
defaultLayout, uiClassID |
Fields inherited from class java.awt.Container |
component, containerListener, containerSerializedDataVersion, dbg, dispatcher, layoutMgr, listeningBoundsChildren, listeningChildren, maxSize, ncomponents, printing, printingThreads, serialVersionUID |
Fields inherited from interface java.awt.image.ImageObserver |
ABORT, ALLBITS, ERROR, FRAMEBITS, HEIGHT, PROPERTIES, SOMEBITS, WIDTH |
Constructor Summary | |
SchemaAnnotationEditor()
Default constructor |
Method Summary | |
protected void |
buildGuiComponents()
This method creates the GUI components and paces them into the layout |
void |
cancelAction()
Called by the GUI when the user has pressed the "Cancel" button. |
boolean |
canDisplayAnnotationType(String annotationType)
Checks whether this viewer/editor can handle a specific annotation type. |
private void |
doAddFeature(String aFeatureName)
This method adds a feature from the list to the table |
private void |
doAddFeatures()
This method adds features from the list to the table |
private void |
doRemoveFeature(int rowIndex)
This removes the feature @ rowIndex |
private void |
doRemoveFeatures()
This method remove a feature from the table and adds it to the list |
protected void |
initGuiComponents()
Init GUI components with values taken from local data |
protected void |
initListeners()
Init all the listeners |
protected void |
initLocalData()
Init local data needed by the GUI components to initialize |
void |
okAction()
Called by the GUI when the user has pressed the "OK" button. |
void |
setAnnotation(Annotation ann)
Used when the viewer/editor has to display/edit an existing annotation |
void |
setSpan(Long startOffset,
Long endOffset,
String annotType)
Used when the viewer has to create new annotations. |
void |
setTarget(Object target)
Called by the GUI when this viewer/editor has to initialise itself for a specific annotation or text span. |
Methods inherited from class gate.creole.AbstractVisualResource |
cleanup, getFeatures, getParameterValue, init, setFeatures, setHandle, setParameterValue, setParameterValues |
Methods inherited from class javax.swing.JPanel |
|
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, registerNatives, 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 |
List currentAnnotationSchemaList
AnnotationSet currentAnnotSet
Annotation currentAnnot
Long currentStartOffset
Long currentEndOffset
AnnotationSchema currentAnnotSchema
FeatureMap currentAnnotFeaturesMap
FeatureMap responseMap
SchemaAnnotationEditor.FeaturesTableModel tableModel
Map name2featureSchemaMap
Map name2annotSchemaMap
DefaultListModel listModel
JTable featuresTable
JScrollPane featuresTableScroll
JList featureSchemaList
JScrollPane featuresListScroll
JButton removeFeatButton
JButton addFeatButton
JComboBox annotSchemaComboBox
SchemaAnnotationEditor.InnerFeaturesEditor featuresEditor
Constructor Detail |
public SchemaAnnotationEditor()
Method Detail |
public void setTarget(Object target)
setTarget
in interface AnnotationVisualResource
setTarget
in class AbstractVisualResource
target
- the object which will always be a AnnotationSet
public void setAnnotation(Annotation ann)
setAnnotation
in interface AnnotationVisualResource
ann
- the annotation to be displayed or edited. If ann is null then
the method simply returnspublic void setSpan(Long startOffset, Long endOffset, String annotType)
setSpan
in interface AnnotationVisualResource
startOffset
- the start offset of the span covered by the new
annotation(s). If is null the method will simply return.endOffset
- the end offset of the span covered by the new
annotation(s). If is null the method will simply return.public void okAction() throws GateException
okAction
in interface AnnotationVisualResource
public void cancelAction() throws GateException
AnnotationVisualResource
cancelAction
in interface AnnotationVisualResource
public boolean canDisplayAnnotationType(String annotationType)
canDisplayAnnotationType
in interface AnnotationVisualResource
annotationType
- represents the annotation type being questioned.If
it is null then the method will return false.protected void initLocalData()
protected void buildGuiComponents()
protected void initGuiComponents()
protected void initListeners()
private void doRemoveFeatures()
private void doRemoveFeature(int rowIndex)
private void doAddFeatures()
private void doAddFeature(String aFeatureName)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |