Docjar: A Java Source and Docuemnt Enginecom.*    java.*    javax.*    org.*    all    new    plug-in

Quick Search    Search Deep

edu.stanford.genetics.treeview.app
Class TreeViewApp  view TreeViewApp download TreeViewApp.java

java.lang.Object
  extended byedu.stanford.genetics.treeview.app.TreeViewApp
All Implemented Interfaces:
java.util.EventListener, java.awt.event.WindowListener
Direct Known Subclasses:
KnnViewApp, LinkedViewApp, TreeViewAppX

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

This class defines the treeview application. The actual Gui handling of a given window is done by TreeViewFrame, which represents a single document. Because multiple documents can be open at a given time, there can be multiple TVFrame objects. however, there can be only one TreeView object. what this really means is that TreeView itself just manages two resources, the window list and the global config. Anything that effects these resources should bottleneck through TreeView. 1/16/2003 by popular demand (with the exception of my advisor) I have decided to try and make an applet version. as a first cut, I'm just going to make this class extend applet and pop open a jframe. 9/24/2003 this has now been superceded by the applet.ButtonApplet class.

The main difference between the apps is which ViewFrame they use. TreeViewApp uses TreeViewFrame.

Version:
@version $Revision: 1.20 $ $Date: 2003/10/27 20:38:42 $

Field Summary
private  edu.stanford.genetics.treeview.XmlConfig globalConfig
          holds global config
static java.lang.String updateUrl
           
static java.lang.String versionTag
          Description of the Field
protected  java.util.Vector windows
          holds all open windows
 
Constructor Summary
TreeViewApp()
          Constructor for the TreeViewApp object.
TreeViewApp(edu.stanford.genetics.treeview.XmlConfig xmlConfig)
          Constructor for the TreeViewApp object takes configuration from the passed in XmlConfig.
 
Method Summary
 void closeAllWindows()
          loops over the list of windows the TreeViewApp has collected through the WindowListener interface.
private  void endProgram()
          Stores the globalconfig, closes all windows, and then exits.
 edu.stanford.genetics.treeview.XmlConfig getGlobalConfig()
          returns an XmlConfig representing global configuration variables
static java.lang.String getUpdateUrl()
          Getter for updateUrl, a string representing a website where you can download newer versions.
static java.lang.String getVersionTag()
          The release-level version tag for the whole application.
private  java.lang.String globalConfigName()
          Get a per-user file in which to store global config info.
static void main(java.lang.String[] astring)
          Main method for TreeView application.
 void openNew()
          opens a ViewFrame window
 void openNew(edu.stanford.genetics.treeview.FileSet fileSet)
          opens a new ViewFrame window displaying the specified FileSet
 void rebuildWindowMenus()
          rebuilds all the window menus.
 void windowActivated(java.awt.event.WindowEvent e)
          This method is called when a window is activated.
 void windowClosed(java.awt.event.WindowEvent e)
          A WindowListener, which allows other windows to react to another window being closed.
 void windowClosing(java.awt.event.WindowEvent e)
          This method is called when the user calls the system menu close function, giving the program a chance to cancel the close.
 void windowDeactivated(java.awt.event.WindowEvent e)
          This method is called when the window is deactivated.
 void windowDeiconified(java.awt.event.WindowEvent e)
          This method is called when the window is deiconified.
 void windowIconified(java.awt.event.WindowEvent e)
          This method is called when the window is iconified.
 void windowOpened(java.awt.event.WindowEvent e)
          A WindowListener, which allows other windows to react to another window being opened.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

versionTag

public static final java.lang.String versionTag
Description of the Field

See Also:
Constant Field Values

updateUrl

public static final java.lang.String updateUrl
See Also:
Constant Field Values

windows

protected java.util.Vector windows
holds all open windows


globalConfig

private edu.stanford.genetics.treeview.XmlConfig globalConfig
holds global config

Constructor Detail

TreeViewApp

public TreeViewApp()
Constructor for the TreeViewApp object. Opens up a globalConfig from the default location.


TreeViewApp

public TreeViewApp(edu.stanford.genetics.treeview.XmlConfig xmlConfig)
Constructor for the TreeViewApp object takes configuration from the passed in XmlConfig.

Method Detail

getVersionTag

public static java.lang.String getVersionTag()
The release-level version tag for the whole application.


getUpdateUrl

public static java.lang.String getUpdateUrl()
Getter for updateUrl, a string representing a website where you can download newer versions.


openNew

public void openNew()
opens a ViewFrame window


openNew

public void openNew(edu.stanford.genetics.treeview.FileSet fileSet)
             throws edu.stanford.genetics.treeview.LoadException
opens a new ViewFrame window displaying the specified FileSet


getGlobalConfig

public edu.stanford.genetics.treeview.XmlConfig getGlobalConfig()
returns an XmlConfig representing global configuration variables


windowOpened

public void windowOpened(java.awt.event.WindowEvent e)
A WindowListener, which allows other windows to react to another window being opened.

Specified by:
windowOpened in interface java.awt.event.WindowListener

rebuildWindowMenus

public void rebuildWindowMenus()
rebuilds all the window menus. Should be called whenever a ViewFrame is created, destroyed, or changes its name. The first two cases are handled by TreeViewApp, the ViewFrame itself should call this method when it changes its name.


windowClosed

public void windowClosed(java.awt.event.WindowEvent e)
A WindowListener, which allows other windows to react to another window being closed.

Specified by:
windowClosed in interface java.awt.event.WindowListener

closeAllWindows

public void closeAllWindows()
loops over the list of windows the TreeViewApp has collected through the WindowListener interface. just closes the window; other bookkeeping stuff is done by the windowClosed method.


endProgram

private void endProgram()
Stores the globalconfig, closes all windows, and then exits.


windowActivated

public void windowActivated(java.awt.event.WindowEvent e)
Description copied from interface: java.awt.event.WindowListener
This method is called when a window is activated. Only Frames and Dialogs can be active, and the active window always contains the component with focus.

Specified by:
windowActivated in interface java.awt.event.WindowListener

windowClosing

public void windowClosing(java.awt.event.WindowEvent e)
Description copied from interface: java.awt.event.WindowListener
This method is called when the user calls the system menu close function, giving the program a chance to cancel the close.

Specified by:
windowClosing in interface java.awt.event.WindowListener

windowDeactivated

public void windowDeactivated(java.awt.event.WindowEvent e)
Description copied from interface: java.awt.event.WindowListener
This method is called when the window is deactivated.

Specified by:
windowDeactivated in interface java.awt.event.WindowListener

windowDeiconified

public void windowDeiconified(java.awt.event.WindowEvent e)
Description copied from interface: java.awt.event.WindowListener
This method is called when the window is deiconified.

Specified by:
windowDeiconified in interface java.awt.event.WindowListener

windowIconified

public void windowIconified(java.awt.event.WindowEvent e)
Description copied from interface: java.awt.event.WindowListener
This method is called when the window is iconified.

Specified by:
windowIconified in interface java.awt.event.WindowListener

globalConfigName

private java.lang.String globalConfigName()
Get a per-user file in which to store global config info. Read the code to find out exactly how it guesses.


main

public static void main(java.lang.String[] astring)
Main method for TreeView application.