|
GATE Version 3.1-2270 |
|||||||||
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.TextualDocumentView
public class TextualDocumentView
This class provides a central view for a textual document.
Nested Class Summary | |
---|---|
protected class |
TextualDocumentView.BlinkAction
Blinks the blinking highlights if any. |
Field Summary | |
---|---|
protected AnnotationListView |
annotationListView
|
protected static int |
BLINK_DELAY
The delay used by the blinker. |
protected Timer |
blinker
|
protected Map |
blinkingTagsForAnnotations
The annotations used for blinking highlights and their tags. |
protected gate.gui.docview.TextualDocumentView.GateDocumentListener |
gateDocListener
|
protected JScrollPane |
scroller
|
protected JEditorPane |
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 | |
---|---|
TextualDocumentView()
|
Method Summary | |
---|---|
void |
addBlinkingHighlight(Annotation ann)
|
Object |
addHighlight(Annotation ann,
AnnotationSet set,
Color colour)
|
List |
addHighlights(Collection annotations,
AnnotationSet set,
Color colour)
Ads several highlights in one go. |
Component |
getGUI()
Returns the actual UI component this view represents. |
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()
|
void |
moveHighlight(Object tag,
int newStart,
int newEnd)
Gives access to the highliter's change highlight operation. |
protected void |
registerHooks()
This method will be called whenever the view becomes active. |
void |
removeAllBlinkingHighlights()
|
void |
removeBlinkingHighlight(Annotation ann)
|
void |
removeHighlight(Object tag)
|
void |
removeHighlights(Collection tags)
Removes several highlights in one go. |
void |
scrollAnnotationToVisible(Annotation ann)
|
void |
setTarget(Object target)
Stores the target (which should always be a Document ) into the
AbstractDocumentView.document field. |
protected void |
unregisterHooks()
This method will be called whenever this view becomes inactive. |
Methods inherited from class gate.gui.docview.AbstractDocumentView |
---|
getActions, getDocument, isActive, setActive, setHandle, setOwner |
Methods inherited from class gate.creole.AbstractResource |
---|
checkParameterValues, cleanup, 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.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 |
---|
protected JScrollPane scroller
protected AnnotationListView annotationListView
protected gate.gui.docview.TextualDocumentView.GateDocumentListener gateDocListener
protected Map blinkingTagsForAnnotations
Annotation
ID to tag(i.e. Object
).
protected Timer blinker
protected JEditorPane textView
protected static final int BLINK_DELAY
Constructor Detail |
---|
public TextualDocumentView()
Method Detail |
---|
public Object addHighlight(Annotation ann, AnnotationSet set, Color colour)
public void scrollAnnotationToVisible(Annotation ann)
public void removeHighlight(Object tag)
public void moveHighlight(Object tag, int newStart, int newEnd) throws BadLocationException
tag
- the tag for the highlightnewStart
- new start offset.newEnd
- new end offset.
BadLocationException
public List addHighlights(Collection annotations, AnnotationSet set, Color colour)
annotations
- the collection of annotations for which highlights
are to be added.set
- the annotation set all the annotations belong to.colour
- the colour for the highlights.
public void removeHighlights(Collection tags)
tags
- the tags for the highlights to be removedpublic void addBlinkingHighlight(Annotation ann)
public void removeBlinkingHighlight(Annotation ann)
public void removeAllBlinkingHighlights()
public int getType()
DocumentView
DocumentView.CENTRAL
,
DocumentView.HORIZONTAL
,
DocumentView.VERTICAL
public void setTarget(Object target)
Document
) into the
AbstractDocumentView.document
field.
setTarget
in interface VisualResource
setTarget
in class AbstractDocumentView
target
- the object (be it a Resource
,
DataStore
or whatever) this viewer has to displayprotected void initGUI()
AbstractDocumentView
initGUI
in class AbstractDocumentView
public Component getGUI()
DocumentView
Component
value.protected void initListeners()
protected void unregisterHooks()
AbstractDocumentView
AbstractDocumentView.registerHooks()
.
unregisterHooks
in class AbstractDocumentView
protected void registerHooks()
AbstractDocumentView
registerHooks
in class AbstractDocumentView
|
GATE Version 3.1-2270 |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |