public abstract class AbstractDocumentView extends AbstractResource implements DocumentView
DocumentView that
can be extended by implementers of document views.
An implementation of a document view that extends this class will need to
provide implementations for the three abstract methods:
initGUI(), registerHooks() and unregisterHooks().| Modifier and Type | Field and Description |
|---|---|
protected boolean |
active
Stores the active state of this view.
|
protected Document |
document
The document this view displays.
|
protected boolean |
guiInitialised
Has the UI been initialised yet?
|
protected Handle |
handle
Stores the handle of this view.
|
protected DocumentEditor |
owner
The
DocumentEditor this view is part of. |
namefeaturesCENTRAL, HORIZONTAL, VERTICAL| Constructor and Description |
|---|
AbstractDocumentView() |
| Modifier and Type | Method and Description |
|---|---|
List<Action> |
getActions()
Returns a list of Action objects.
|
Document |
getDocument()
Gets the document this view displays.
|
Handle |
getHandle() |
DocumentEditor |
getOwner() |
protected abstract void |
initGUI()
Implementers should override this method and use it for populating the GUI.
|
boolean |
isActive()
Returns the active state of this view.
|
protected abstract void |
registerHooks()
This method will be called whenever the view becomes active.
|
void |
setActive(boolean active)
Notifies this view that it has become active or inactive.
|
void |
setHandle(Handle handle)
Used by the main GUI to tell this VR what handle created it.
|
void |
setOwner(DocumentEditor editor)
Stores the owner of this view into the
owner field. |
void |
setSelectedAnnotations(List<AnnotationData> selectedAnnots)
Some document views can use the concept of selected annotations.
|
void |
setTarget(Object target)
|
protected abstract void |
unregisterHooks()
This method will be called whenever this view becomes inactive.
|
checkParameterValues, cleanup, 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, waitgetGUI, getTypetargetReinitialisedcleanup, getParameterValue, init, setParameterValue, setParameterValuesgetFeatures, setFeaturesgetName, setNameprotected boolean active
protected Handle handle
protected boolean guiInitialised
protected Document document
protected DocumentEditor owner
DocumentEditor this view is part of.public void setActive(boolean active)
setActive in interface DocumentViewactive - a boolean value.public boolean isActive()
isActive in interface DocumentViewpublic void setSelectedAnnotations(List<AnnotationData> selectedAnnots)
DocumentViewDocumentEditor.setSelectedAnnotations(List) method.setSelectedAnnotations in interface DocumentViewpublic List<Action> getActions()
ActionsPublishergetActions in interface ActionsPublisherList of Actions.public void setHandle(Handle handle)
VisualResourcesetHandle in interface VisualResourcepublic void setTarget(Object target)
setTarget in interface VisualResourcetarget - the object (be it a Resource,
DataStore or whatever) this viewer has to displaypublic void setOwner(DocumentEditor editor)
owner field. The owner is
the DocumentEditor this view is part of.setOwner in interface DocumentVieweditor - the DocumentEditor that contains this view.public Handle getHandle()
public DocumentEditor getOwner()
protected abstract void initGUI()
protected abstract void registerHooks()
protected abstract void unregisterHooks()
registerHooks().Copyright © 2024 GATE. All rights reserved.