|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | 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.DocumentEditor
This class implements a viewer/editor for the annotations on a document.
As a viewer, this visual resource will display all the annotations found on
the document. The editor needs to have some data about annotation types in
order to allow the editing of annotations. This data comes from the
AnnotationSchema
objects that are loaded in the Gate
system at a given moment. If there are no such objects the editing of
annotations will be restricted to a very crude method allowing the user to
add any type of annotations having any features with any String values.
Nested Class Summary | |
class |
DocumentEditor.CustomLabelView
Fixes the 4406598 bug in swing text components. |
class |
DocumentEditor.CustomStyledEditorKit
Fixes the 4406598 bug in swing text components. |
class |
DocumentEditor.CustomStyledViewFactory
Fixes the 4406598 bug in swing text components. |
class |
DocumentEditor.TypeData
Holds the GUI metadata for a given annotation type. |
Field Summary |
Fields inherited from class javax.swing.JComponent |
TOOL_TIP_TEXT_KEY, 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 | |
DocumentEditor()
Default constructor. |
Method Summary | |
void |
addPropertyChangeListener(PropertyChangeListener l)
|
void |
addPropertyChangeListener(String propertyName,
PropertyChangeListener l)
|
void |
cleanup()
Does nothing now, but meant to clear all internal data |
Set |
getDisplayedAnnotations()
This method returns a list of annotations which are currently shown in the annotations table or null of the table is empty. |
Document |
getDocument()
Return the current selected document |
Resource |
init()
Initialise this resource, and return it. |
boolean |
isAnnotationsTableVisible()
|
boolean |
isCoreferenceVisible()
|
boolean |
isCorefOptionAvailable()
|
boolean |
isEditable()
Is the editor functionality enabled |
boolean |
isTextVisible()
|
boolean |
isTypesTreeVisible()
|
void |
removePropertyChangeListener(PropertyChangeListener l)
|
void |
setAnnotationsTableVisible(boolean annotationsTableVisible)
|
void |
setCoreferenceVisible(boolean coreferenceVisible)
|
void |
setCorefOptionAvailable(boolean corefOptionAvailable)
|
void |
setEditable(boolean newEditable)
Should the editor functionality of this component be enabled |
void |
setHandle(Handle handle)
Used by the main GUI to tell this VR what handle created it. |
void |
setTarget(Object target)
Sets the document to be displayed |
void |
setTextVisible(boolean textVisible)
|
void |
setTypesTreeVisible(boolean typesTreeVisible)
|
Methods inherited from class gate.creole.AbstractVisualResource |
getFeatures, getParameterValue, setFeatures, setParameterValue, setParameterValues |
Methods inherited from class javax.swing.JPanel |
getAccessibleContext, getUI, getUIClassID, setUI, updateUI |
Methods inherited from class java.lang.Object |
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Methods inherited from interface gate.util.NameBearer |
getName, setName |
Constructor Detail |
public DocumentEditor()
Method Detail |
public Resource init()
AbstractVisualResource
init
in interface Resource
init
in class AbstractVisualResource
public void removePropertyChangeListener(PropertyChangeListener l)
removePropertyChangeListener
in class JComponent
public void addPropertyChangeListener(PropertyChangeListener l)
addPropertyChangeListener
in class JComponent
public void addPropertyChangeListener(String propertyName, PropertyChangeListener l)
addPropertyChangeListener
in class JComponent
public Document getDocument()
public void setTarget(Object target)
setTarget
in interface VisualResource
setTarget
in class AbstractVisualResource
target
- the object (be it a Resource
,
DataStore
or whatever) this viewer has to displaypublic void setHandle(Handle handle)
AbstractVisualResource
setHandle
in interface VisualResource
setHandle
in class AbstractVisualResource
public void cleanup()
AbstractVisualResource
cleanup
in interface Resource
cleanup
in class AbstractVisualResource
public Set getDisplayedAnnotations()
public void setEditable(boolean newEditable)
public boolean isEditable()
public void setAnnotationsTableVisible(boolean annotationsTableVisible)
public boolean isAnnotationsTableVisible()
public void setCoreferenceVisible(boolean coreferenceVisible)
public boolean isCoreferenceVisible()
public void setTextVisible(boolean textVisible)
public boolean isTextVisible()
public void setTypesTreeVisible(boolean typesTreeVisible)
public boolean isTypesTreeVisible()
public void setCorefOptionAvailable(boolean corefOptionAvailable)
public boolean isCorefOptionAvailable()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |