|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectjava.awt.Component
java.awt.Container
javax.swing.JComponent
javax.swing.JPanel
gate.creole.AbstractVisualResource
gate.gui.UnrestrictedAnnotationEditor
This class visually adds/edits features and annot type of an annotation
It does this without using an AnnotationSchema
.
The user can manipulate annotation and features at his own will.
It's his responsability.
Nested Class Summary | |
(package private) class |
UnrestrictedAnnotationEditor.MyCustomFeatureBearer
This class implements a feature bearer. |
Nested classes inherited from class javax.swing.JPanel |
JPanel.AccessibleJPanel |
Nested classes inherited from class javax.swing.JComponent |
JComponent.AccessibleJComponent |
Nested classes inherited from class java.awt.Container |
Container.AccessibleAWTContainer |
Nested classes inherited from class java.awt.Component |
Component.AccessibleAWTComponent, Component.BltBufferStrategy, Component.FlipBufferStrategy |
Field Summary | |
(package private) JLabel |
annotTypeLabel
|
(package private) JTextField |
annotTypeTextField
|
(package private) Annotation |
currentAnnot
The curent annotation 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 |
private UnrestrictedAnnotationEditor.MyCustomFeatureBearer |
data
|
(package private) FeaturesEditor |
featuresEditor
|
(package private) JLabel |
featuresLabel
|
Fields inherited from class gate.creole.AbstractVisualResource |
features |
Fields inherited from class javax.swing.JPanel |
|
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.Container |
|
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 | |
UnrestrictedAnnotationEditor()
Default constructor |
Method Summary | |
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. |
String |
getAnnotType()
Returns annot type edited with this tool |
protected FeatureMap |
getCurrentAnnotationFeatures()
Returns the features edited with this tool |
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 |
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 annotationType)
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 |
getAccessibleContext, getUI, getUIClassID, paramString, setUI, updateUI |
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 |
AnnotationSet currentAnnotSet
Annotation currentAnnot
Long currentStartOffset
Long currentEndOffset
private UnrestrictedAnnotationEditor.MyCustomFeatureBearer data
JLabel annotTypeLabel
JTextField annotTypeTextField
JLabel featuresLabel
FeaturesEditor featuresEditor
Constructor Detail |
public UnrestrictedAnnotationEditor()
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 annotationType)
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
GateException
public void cancelAction() throws GateException
AnnotationVisualResource
cancelAction
in interface AnnotationVisualResource
GateException
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 initGuiComponents()
protected void initListeners()
public String getAnnotType()
protected FeatureMap getCurrentAnnotationFeatures()
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |