|
||||||||||
| 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.jape.JapeViewer
public class JapeViewer
A JAPE viewer that allows access to all phases of the grammar and provides syntax highlighting. Future versions may allow editing and reload of JAPE files.
| Nested Class Summary |
|---|
| 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.BaselineResizeBehavior, Component.BltBufferStrategy, Component.FlipBufferStrategy |
| Field Summary | |
|---|---|
private Map<Integer,Style> |
colorMap
A map that associates the syntactic elements of JAPE files with a colour for performing syntax highlighting |
private Style |
defaultStyle
The default style used by the text area. |
private JTextPane |
textArea
The text area where the JAPE source will be displayed |
private Transducer |
transducer
The JAPE transducer for which we need to show the JAPE source |
private JTree |
treePhases
The tree in which the phases of the grammar will be shown |
private JScrollPane |
treeScroll
|
private boolean |
updating
A flag so we can know if we are currently reading a highlighting a JAPE source file |
| 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 | |
|---|---|
JapeViewer()
|
|
| Method Summary | |
|---|---|
Resource |
init()
Initialise this resource, and return it. |
private void |
initGuiComponents()
|
void |
processFinished()
Called when the process is finished. |
void |
progressChanged(int progress)
Called when the progress has changed |
private void |
readJAPEFileContents(URL url)
|
void |
setTarget(Object target)
Called by the GUI when this viewer/editor has to initialise itself for a specific object. |
| Methods inherited from class gate.creole.AbstractVisualResource |
|---|
cleanup, 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 |
|---|
private JTextPane textArea
private JTree treePhases
private JScrollPane treeScroll
private boolean updating
private Transducer transducer
private Map<Integer,Style> colorMap
private Style defaultStyle
| Constructor Detail |
|---|
public JapeViewer()
| Method Detail |
|---|
public Resource init()
AbstractVisualResource
init in interface Resourceinit in class AbstractVisualResourceprivate void initGuiComponents()
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 displayprivate void readJAPEFileContents(URL url)
public void processFinished()
ProgressListener
processFinished in interface ProgressListenerpublic void progressChanged(int progress)
ProgressListener
progressChanged in interface ProgressListener
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||