public class AnnotationListView extends AbstractDocumentView implements AnnotationListener, AnnotationList, AnnotationEditorOwner
| Modifier and Type | Class and Description |
|---|---|
protected class |
AnnotationListView.DeleteAction |
protected class |
AnnotationListView.EditAnnotationAction |
| Modifier and Type | Field and Description |
|---|---|
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 |
active, document, guiInitialised, handle, ownernamefeaturesCENTRAL, HORIZONTAL, VERTICAL| Constructor and Description |
|---|
AnnotationListView() |
| Modifier and Type | Method and Description |
|---|---|
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.
|
getActions, getDocument, getHandle, getOwner, isActive, setActive, setHandle, setOwner, setTargetcheckParameterValues, flushBeanInfoCache, forgetBeanInfo, getBeanInfo, getInitParameterValues, getInitParameterValues, getName, getParameterValue, getParameterValue, getParameterValues, init, removeResourceListeners, setName, setParameterValue, setParameterValue, setParameterValues, setParameterValues, setResourceListeners, toStringgetFeatures, setFeaturesclone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitisActive, setActive, setOwnergetActionssetHandle, setTarget, targetReinitialisedgetParameterValue, init, setParameterValue, setParameterValuesgetFeatures, setFeaturesgetName, setNamegetDocumentprotected 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
public AnnotationData getAnnotationAtRow(int row)
getAnnotationAtRow in interface AnnotationListAnnotationList.getAnnotationAtRow(int)public ListSelectionModel getSelectionModel()
AnnotationListgetSelectionModel in interface AnnotationListListSelectionModel object.public void cleanup()
AbstractResourcecleanup in interface Resourcecleanup in class AbstractResourceprotected void initGUI()
AbstractDocumentViewinitGUI in class AbstractDocumentViewpublic Component getGUI()
DocumentViewgetGUI 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()
AbstractDocumentViewregisterHooks in class AbstractDocumentViewprotected void unregisterHooks()
AbstractDocumentViewAbstractDocumentView.registerHooks().unregisterHooks in class AbstractDocumentViewpublic int getType()
DocumentViewgetType in interface DocumentViewDocumentView.CENTRAL,
DocumentView.HORIZONTAL,
DocumentView.VERTICALpublic AnnotationDataImpl addAnnotation(Annotation ann, AnnotationSet set)
ann - the annotationset - the set containing the annotationpublic 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 updatedannotationUpdated 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)
AnnotationEditorOwnerannotationChanged 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()
AnnotationEditorOwnergetNextAnnotation in interface AnnotationEditorOwnerAnnotation value.public Annotation getPreviousAnnotation()
AnnotationEditorOwnergetPreviousAnnotation in interface AnnotationEditorOwnerAnnotation value.public JTextComponent getTextComponent()
AnnotationEditorOwnergetTextComponent in interface AnnotationEditorOwnerJTextComponent object.public void selectAnnotation(AnnotationData data)
AnnotationEditorOwnerselectAnnotation in interface AnnotationEditorOwnerpublic int getRowForAnnotation(AnnotationData data)
AnnotationListgetRowForAnnotation in interface AnnotationListdata - the annotation for which the row is requiredCopyright © 2024 GATE. All rights reserved.