sem.graphvis
Class GraphVisualiser

java.lang.Object
  extended by sem.graphvis.GraphVisualiser

public class GraphVisualiser
extends java.lang.Object

An application for visualising the graphs. Take a look at sem.examples.VisualiseGraphs for sample code on how to run it.

Navigate through sentences using Z and X, iterate over alternative parses (if available) using A and S.

An experimental feature for editing the graphs is also included (has to be enabled when initialising the visualiser).

The following commands are supported:


Field Summary
 javax.swing.JTextField commandArea
           
 
Constructor Summary
GraphVisualiser(boolean enableEditing)
          Constructor.
 
Method Summary
 void displayGraph(Graph graph)
          Display a single graph.
 void displayGraphs(java.util.ArrayList<Graph> graphs)
          Display a list of graphs.
 void displaySentences(java.util.ArrayList<java.util.ArrayList<Graph>> sentences)
          Display a list of sentences (a list of lists of graphs).
 Graph getCurrentGraph()
          Get the currently active graph.
static void main(java.lang.String[] args)
          This is a redundant function.
 void nextGraph()
          Show the next graph.
 void nextSentence()
          Show the next sentence.
 void prevGraph()
          Show the previous graph.
 void prevSentence()
          Show the previous sentence.
 void resetGraph()
          Reset and redraw the graph.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

commandArea

public javax.swing.JTextField commandArea
Constructor Detail

GraphVisualiser

public GraphVisualiser(boolean enableEditing)
Constructor.

Parameters:
enableEditing - Set to true if you want to enable graph editing.
Method Detail

nextSentence

public void nextSentence()
Show the next sentence.


prevSentence

public void prevSentence()
Show the previous sentence.


nextGraph

public void nextGraph()
Show the next graph.


prevGraph

public void prevGraph()
Show the previous graph.


getCurrentGraph

public Graph getCurrentGraph()
Get the currently active graph.

Returns:
The current graph.

resetGraph

public void resetGraph()
Reset and redraw the graph. Should be run after loading a different graph.


displayGraph

public void displayGraph(Graph graph)
Display a single graph.

Parameters:
graph -

displayGraphs

public void displayGraphs(java.util.ArrayList<Graph> graphs)
Display a list of graphs.

Parameters:
graphs -

displaySentences

public void displaySentences(java.util.ArrayList<java.util.ArrayList<Graph>> sentences)
Display a list of sentences (a list of lists of graphs). Useful for iterating over different sentences with alternative parses.

Parameters:
sentences -

main

public static void main(java.lang.String[] args)
This is a redundant function. Do not use. For reference only.