net.sourceforge.nite.gui.util
Class GenericDisplay

java.lang.Object
  extended by net.sourceforge.nite.gui.util.GenericDisplay
All Implemented Interfaces:
java.awt.event.WindowListener, java.util.EventListener

public class GenericDisplay
extends java.lang.Object
implements java.awt.event.WindowListener

A simple display that will work on any data set. It just renders each coding as a separate window, one line per element indented by level in the tree, with NAME:content(att1:val)(att2:val)... If the element is timed, it gets synchronized with the signals. It includes a search menu with highlighting of results on the main display. The default behaviour is to turn off lazy loading and load everything. However, if a query is passed as a command line argument, lazy loading is left on, and only those files directly loaded by the query are displayed. Future searches (and even the display process itself) may cause more data to be loaded but it will not be displayed. Problems: It works by grabbing all the document roots and doing a left-right, depth-first traversal, which means that in some corpus designs there are nodes that get visited more than once. We need to restrict visitation by colour, although this arrangement does have the advantage of not treating nite:child and child differently. This boots up as many signal players as there are signals. It's up to the user to close/mute all but one if they want to make sense of it. It would be better to use NTrees than text areas for the display (don't need to mess around with indentation and get collapsible nodes), but NTree doesn't currently implement the QueryResultHandler interface.

Author:
Jonathan Kilgour, Jean Carletta November 2003

Nested Class Summary
 class GenericDisplay.ExitAction
          A very simple "exit" action
 class GenericDisplay.MyMouseListener
           
 class GenericDisplay.SearchAction
          A "search" action - pops up a search GUI
 
Constructor Summary
GenericDisplay(java.lang.String c, java.lang.String o, java.lang.String q, boolean com)
           
GenericDisplay(java.lang.String c, java.lang.String o, java.lang.String q, int f)
           
GenericDisplay(java.lang.String c, java.lang.String o, java.lang.String q, int f, boolean com)
           
 
Method Summary
static void main(java.lang.String[] args)
          Called to start the application.
 void windowActivated(java.awt.event.WindowEvent event)
          NOP (methode needed for implementing WindowListener).
 void windowClosed(java.awt.event.WindowEvent event)
          NOP (methode needed for implementing WindowListener).
 void windowClosing(java.awt.event.WindowEvent event)
          Processes #exit().
 void windowDeactivated(java.awt.event.WindowEvent event)
          NOP (method needed for implementing WindowListener).
 void windowDeiconified(java.awt.event.WindowEvent event)
          NOP (method needed for implementing WindowListener).
 void windowIconified(java.awt.event.WindowEvent event)
          NOP (method needed for implementing WindowListener).
 void windowOpened(java.awt.event.WindowEvent event)
          NOP (method needed for implementing WindowListener).
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

GenericDisplay

public GenericDisplay(java.lang.String c,
                      java.lang.String o,
                      java.lang.String q,
                      int f)

GenericDisplay

public GenericDisplay(java.lang.String c,
                      java.lang.String o,
                      java.lang.String q,
                      boolean com)

GenericDisplay

public GenericDisplay(java.lang.String c,
                      java.lang.String o,
                      java.lang.String q,
                      int f,
                      boolean com)
Method Detail

main

public static void main(java.lang.String[] args)
Called to start the application. Legal command line arguments are: The corpus argument is the name of the metadata file; the observation names the observation to load and the optional query argument specifies a query that is run before the display starts up. Only the data loaded as a direct result of that query will be displayed (along with any corpus-level files). Finally, if the -comments argument is present, comments will be displayed.


windowActivated

public void windowActivated(java.awt.event.WindowEvent event)
NOP (methode needed for implementing WindowListener).

Specified by:
windowActivated in interface java.awt.event.WindowListener
Parameters:
event - parameter isn't used

windowClosed

public void windowClosed(java.awt.event.WindowEvent event)
NOP (methode needed for implementing WindowListener).

Specified by:
windowClosed in interface java.awt.event.WindowListener
Parameters:
event - parameter isn't used

windowClosing

public void windowClosing(java.awt.event.WindowEvent event)
Processes #exit().

Specified by:
windowClosing in interface java.awt.event.WindowListener
Parameters:
event - parameter isn't used

windowDeactivated

public void windowDeactivated(java.awt.event.WindowEvent event)
NOP (method needed for implementing WindowListener).

Specified by:
windowDeactivated in interface java.awt.event.WindowListener
Parameters:
event - parameter isn't used

windowDeiconified

public void windowDeiconified(java.awt.event.WindowEvent event)
NOP (method needed for implementing WindowListener).

Specified by:
windowDeiconified in interface java.awt.event.WindowListener
Parameters:
event - parameter isn't used

windowIconified

public void windowIconified(java.awt.event.WindowEvent event)
NOP (method needed for implementing WindowListener).

Specified by:
windowIconified in interface java.awt.event.WindowListener
Parameters:
event - parameter isn't used

windowOpened

public void windowOpened(java.awt.event.WindowEvent event)
NOP (method needed for implementing WindowListener).

Specified by:
windowOpened in interface java.awt.event.WindowListener
Parameters:
event - parameter isn't used