|
GATE Version 3.1-2270 |
|||||||||
| 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.docview.DocumentEditor
public class DocumentEditor
This is the GATE Document viewer/editor. This class is only the shell of the
main document VR, which gets populated with views (objects that implement
the DocumentView interface.
| Nested Class Summary | |
|---|---|
protected class |
DocumentEditor.ViewButton
|
| Nested classes/interfaces inherited from class javax.swing.JPanel |
|---|
JPanel.AccessibleJPanel |
| Nested classes/interfaces inherited from class javax.swing.JComponent |
|---|
JComponent.AccessibleJComponent |
| Nested classes/interfaces inherited from class java.awt.Container |
|---|
Container.AccessibleAWTContainer |
| Nested classes/interfaces inherited from class java.awt.Component |
|---|
Component.AccessibleAWTComponent, Component.BltBufferStrategy, Component.FlipBufferStrategy |
| Field Summary | |
|---|---|
protected JSplitPane |
bottomSplit
|
protected int |
bottomViewIdx
The index in horizontalViews of the currently active bottom view. |
protected int |
centralViewIdx
The index in centralViews of the currently active central view. |
protected List |
centralViews
A list of DocumentView objects of type DocumentView.CENTRAL |
protected Document |
document
|
protected JSplitPane |
horizontalSplit
|
protected List |
horizontalViews
A list of DocumentView objects of type
DocumentView.HORIZONTAL |
protected int |
rightViewIdx
The index in verticalViews of the currently active right view. |
protected JToolBar |
topBar
|
protected JSplitPane |
topSplit
|
protected int |
topViewIdx
The index in horizontalViews of the currently active top view. |
protected List |
verticalViews
A list of DocumentView objects of type
DocumentView.VERTICAL |
protected boolean |
viewsInited
|
| Fields inherited from class gate.creole.AbstractVisualResource |
|---|
features, handle |
| 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.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()
|
|
| Method Summary | |
|---|---|
protected void |
addView(DocumentView view,
String name)
Registers a new view by adding it to the right list and creating the activation button for it. |
void |
cleanup()
Does nothing now, but meant to clear all internal data |
List |
getActions()
The document view is just an empty shell. |
protected DocumentView |
getBottomView()
Gets the currently showing bottom view |
protected DocumentView |
getCentralView()
Gets the currently showing central view |
List |
getCentralViews()
|
List |
getHorizontalViews()
|
protected DocumentView |
getRightView()
Gets the currently showing right view |
protected DocumentView |
getTopView()
Gets the currently showing top view |
List |
getVerticalViews()
|
Resource |
init()
Initialise this resource, and return it. |
protected void |
initViews()
|
protected void |
setBottomView(DocumentView view)
Sets a new UI component in the top location. |
protected void |
setBottomView(int index)
Shows a new bottom view based on an index in the horizontalViews
list. |
protected void |
setCentralView(DocumentView view)
Sets a new UI component in the central location. |
protected void |
setCentralView(int index)
Shows a new central view based on an index in the centralViews
list. |
protected void |
setRightView(DocumentView view)
Sets a new UI component in the right hand side location. |
protected void |
setRightView(int index)
Shows a new right view based on an index in the verticalViews
list. |
void |
setTarget(Object target)
Called by the GUI when this viewer/editor has to initialise itself for a specific object. |
protected void |
setTopView(DocumentView view)
Sets a new UI component in the top location. |
protected void |
setTopView(int index)
Shows a new top view based on an index in the horizontalViews
list. |
protected void |
updateBar(JToolBar toolbar)
Updates the selected state of the buttons on one of the toolbars. |
protected void |
updateSplitLocation(JSplitPane split,
int foo)
|
| Methods inherited from class gate.creole.AbstractVisualResource |
|---|
getFeatures, getParameterValue, 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.util.NameBearer |
|---|
getName, setName |
| Field Detail |
|---|
protected JSplitPane horizontalSplit
protected JSplitPane topSplit
protected JSplitPane bottomSplit
protected JToolBar topBar
protected Document document
protected List centralViews
DocumentView objects of type DocumentView.CENTRAL
protected List verticalViews
DocumentView objects of type
DocumentView.VERTICAL
protected List horizontalViews
DocumentView objects of type
DocumentView.HORIZONTAL
protected int centralViewIdx
centralViews of the currently active central view.
-1 if none is active.
protected int rightViewIdx
verticalViews of the currently active right view.
-1 if none is active.
protected int topViewIdx
horizontalViews of the currently active top view.
-1 if none is active.
protected int bottomViewIdx
horizontalViews of the currently active bottom view.
-1 if none is active.
protected boolean viewsInited
| Constructor Detail |
|---|
public DocumentEditor()
| Method Detail |
|---|
public List getActions()
getActions in interface ActionsPublisherList of Actions.
public Resource init()
throws ResourceInstantiationException
AbstractVisualResource
init in interface Resourceinit in class AbstractVisualResourceResourceInstantiationExceptionpublic void cleanup()
AbstractVisualResource
cleanup in interface Resourcecleanup in class AbstractVisualResourceprotected void initViews()
public List getCentralViews()
public List getHorizontalViews()
public List getVerticalViews()
protected void addView(DocumentView view,
String name)
view - protected DocumentView getTopView()
DocumentView object.protected void setTopView(int index)
horizontalViews
list.
index - the index in horizontalViews list for the new
view to be shown.protected void setTopView(DocumentView view)
setTopView(int).
view - the new view to be shown.protected DocumentView getCentralView()
DocumentView object.protected void setCentralView(int index)
centralViews
list.
index - the index in centralViews list for the new
view to be shown.protected void setCentralView(DocumentView view)
setCentralView(int).
view - the new view to be shown.protected DocumentView getBottomView()
DocumentView object.protected void setBottomView(int index)
horizontalViews
list.
index - the index in horizontalViews list for the new
view to be shown.protected void setBottomView(DocumentView view)
setBottomView(int).
view - the new view to be shown.protected DocumentView getRightView()
DocumentView object.protected void setRightView(int index)
verticalViews
list.
index - the index in verticalViews list for the new
view to be shown.protected void setRightView(DocumentView view)
setRightView(int).
view - the new view to be shown.
protected void updateSplitLocation(JSplitPane split,
int foo)
public void setTarget(Object target)
AbstractVisualResource
setTarget in interface VisualResourcesetTarget in class AbstractVisualResourcetarget - the object (be it a Resource,
DataStore or whatever) this viewer has to displayprotected void updateBar(JToolBar toolbar)
toolbar -
|
GATE Version 3.1-2270 |
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||