|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectgate.util.AbstractFeatureBearer
gate.creole.AbstractResource
gate.gui.docview.AbstractDocumentView
gate.gui.docview.AnnotationListView
public class AnnotationListView
A tabular view for a list of annotations. Used as part of the document viewer to display all the annotation currently highlighted.
| Nested Class Summary | |
|---|---|
protected class |
AnnotationListView.DeleteAction
|
protected class |
AnnotationListView.EditAnnotationAction
|
| Field Summary | |
|---|---|
protected List<AnnotationData> |
annDataList
Stores the AnnotationData objects representing the annotations
displayed by this view. |
protected Map<String,AnnotationVisualResource> |
editorsCache
A map that stores instantiated annotations editors in order to avoid the delay of building them at each request; |
protected JTextField |
filterTextField
|
protected boolean |
localSelectionUpdating
Flag used to mark the fact that the table selection is currently being updated, to synchronise it with the global selection. |
protected JPanel |
mainPanel
|
protected JScrollPane |
scroller
|
protected JLabel |
statusLabel
|
protected XJTable |
table
|
protected gate.gui.docview.AnnotationListView.AnnotationTableModel |
tableModel
|
protected TextualDocumentView |
textView
|
| Fields inherited from class gate.gui.docview.AbstractDocumentView |
|---|
active, document, guiInitialised, handle, owner |
| Fields inherited from class gate.creole.AbstractResource |
|---|
name |
| Fields inherited from class gate.util.AbstractFeatureBearer |
|---|
features |
| Fields inherited from interface gate.gui.docview.DocumentView |
|---|
CENTRAL, HORIZONTAL, VERTICAL |
| Constructor Summary | |
|---|---|
AnnotationListView()
|
|
| Method Summary | |
|---|---|
AnnotationDataImpl |
addAnnotation(Annotation ann,
AnnotationSet set)
Adds an annotation to be displayed in the list. |
List<AnnotationData> |
addAnnotations(List<Annotation> annotations,
AnnotationSet set)
Adds a batch of annotations in one go. |
void |
annotationChanged(Annotation ann,
AnnotationSet set,
String oldType)
Called by the annotation editor when an annotation has been changed. |
void |
annotationUpdated(AnnotationEvent e)
Called when an Annotation has been updated |
void |
cleanup()
releases the memory allocated to this resource |
List<AnnotationData> |
getAllAnnotations()
Returns the tags for all the annotations currently displayed |
AnnotationData |
getAnnotationAtRow(int row)
(non-Javadoc) |
List<Action> |
getGenericEditorActions(AnnotationSet set,
Annotation annotation)
|
Component |
getGUI()
Returns the actual UI component this view represents. |
Annotation |
getNextAnnotation()
Called by the editor for obtaining the next annotation to be edited. |
Annotation |
getPreviousAnnotation()
Called by the editor for obtaining the previous annotation to be edited. |
int |
getRowForAnnotation(AnnotationData data)
Returns the display row for a given annotation. |
ListSelectionModel |
getSelectionModel()
Obtains the selection model used by this list view. |
List<Action> |
getSpecificEditorActions(AnnotationSet set,
Annotation annotation)
|
JTextComponent |
getTextComponent()
Gets the UI component used to display the document text. |
int |
getType()
Returns the type of this view. |
protected void |
initGUI()
Implementers should override this method and use it for populating the GUI. |
protected void |
initListeners()
|
protected void |
registerHooks()
This method will be called whenever the view becomes active. |
void |
removeAnnotation(AnnotationData tag)
|
void |
removeAnnotations(Collection<AnnotationData> tags)
|
void |
selectAnnotation(AnnotationData data)
Called by the editor when a new annotation needs to be selected. |
void |
selectAnnotationForTag(Object tag)
Selects the annotation for the given tag. |
void |
setSelectedAnnotations(List<AnnotationData> selectedAnnots)
Some document views can use the concept of selected annotations. |
protected void |
unregisterHooks()
This method will be called whenever this view becomes inactive. |
| Methods inherited from class gate.gui.docview.AbstractDocumentView |
|---|
getActions, getDocument, getHandle, getOwner, isActive, setActive, setHandle, setOwner, setTarget |
| Methods inherited from class gate.creole.AbstractResource |
|---|
checkParameterValues, getBeanInfo, getName, getParameterValue, getParameterValue, init, removeResourceListeners, setName, setParameterValue, setParameterValue, setParameterValues, setParameterValues, setResourceListeners |
| Methods inherited from class gate.util.AbstractFeatureBearer |
|---|
getFeatures, setFeatures |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Methods inherited from interface gate.gui.docview.DocumentView |
|---|
isActive, setActive, setOwner |
| Methods inherited from interface gate.gui.ActionsPublisher |
|---|
getActions |
| Methods inherited from interface gate.VisualResource |
|---|
setHandle, setTarget |
| Methods inherited from interface gate.Resource |
|---|
getParameterValue, init, setParameterValue, setParameterValues |
| Methods inherited from interface gate.util.FeatureBearer |
|---|
getFeatures, setFeatures |
| Methods inherited from interface gate.util.NameBearer |
|---|
getName, setName |
| Methods inherited from interface gate.gui.annedit.AnnotationEditorOwner |
|---|
getDocument |
| Field Detail |
|---|
protected XJTable table
protected gate.gui.docview.AnnotationListView.AnnotationTableModel tableModel
protected JScrollPane scroller
protected List<AnnotationData> annDataList
AnnotationData objects representing the annotations
displayed by this view.
protected volatile boolean localSelectionUpdating
protected JPanel mainPanel
protected JLabel statusLabel
protected JTextField filterTextField
protected TextualDocumentView textView
protected Map<String,AnnotationVisualResource> editorsCache
| Constructor Detail |
|---|
public AnnotationListView()
| Method Detail |
|---|
public AnnotationData getAnnotationAtRow(int row)
getAnnotationAtRow in interface AnnotationListAnnotationList.getAnnotationAtRow(int)public ListSelectionModel getSelectionModel()
AnnotationList
getSelectionModel in interface AnnotationListListSelectionModel object.public void cleanup()
AbstractResource
cleanup in interface Resourcecleanup in class AbstractResourceprotected void initGUI()
AbstractDocumentView
initGUI in class AbstractDocumentViewpublic Component getGUI()
DocumentView
getGUI in interface DocumentViewComponent value.protected void initListeners()
public List<Action> getSpecificEditorActions(AnnotationSet set,
Annotation annotation)
public List<Action> getGenericEditorActions(AnnotationSet set,
Annotation annotation)
protected void registerHooks()
AbstractDocumentView
registerHooks in class AbstractDocumentViewprotected void unregisterHooks()
AbstractDocumentViewAbstractDocumentView.registerHooks().
unregisterHooks in class AbstractDocumentViewpublic int getType()
DocumentView
getType in interface DocumentViewDocumentView.CENTRAL,
DocumentView.HORIZONTAL,
DocumentView.VERTICAL
public AnnotationDataImpl addAnnotation(Annotation ann,
AnnotationSet set)
ann - the annotationset - the set containing the annotation
public void removeAnnotation(AnnotationData tag)
public void removeAnnotations(Collection<AnnotationData> tags)
public List<AnnotationData> addAnnotations(List<Annotation> annotations,
AnnotationSet set)
annotations - a collection of annotationsset - the annotation set to which all the annotations belong.
public List<AnnotationData> getAllAnnotations()
AnnotationDataImpl.public void annotationUpdated(AnnotationEvent e)
AnnotationListenerAnnotation has been updated
annotationUpdated in interface AnnotationListenerpublic void setSelectedAnnotations(List<AnnotationData> selectedAnnots)
DocumentViewDocumentEditor.setSelectedAnnotations(List) method.
setSelectedAnnotations in interface DocumentViewsetSelectedAnnotations in class AbstractDocumentViewpublic void selectAnnotationForTag(Object tag)
tag - the tag of the annotation to be selected.
public void annotationChanged(Annotation ann,
AnnotationSet set,
String oldType)
AnnotationEditorOwner
annotationChanged in interface AnnotationEditorOwnerann - the annotation modified (after the modification occurred).set - the parent annotation set for the annotationoldType - the old type of the annotation. This value is only set if
the annotation modification included a change of type.public Annotation getNextAnnotation()
AnnotationEditorOwner
getNextAnnotation in interface AnnotationEditorOwnerAnnotation value.public Annotation getPreviousAnnotation()
AnnotationEditorOwner
getPreviousAnnotation in interface AnnotationEditorOwnerAnnotation value.public JTextComponent getTextComponent()
AnnotationEditorOwner
getTextComponent in interface AnnotationEditorOwnerJTextComponent object.public void selectAnnotation(AnnotationData data)
AnnotationEditorOwner
selectAnnotation in interface AnnotationEditorOwnerpublic int getRowForAnnotation(AnnotationData data)
AnnotationList
getRowForAnnotation in interface AnnotationListdata - the annotation for which the row is required
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||