Class lilgpMonitor

Class lilgpMonitor

java.lang.Object
   |
   +----java.awt.Component
           |
           +----java.awt.Container
                   |
                   +----java.awt.Window
                           |
                           +----java.awt.Frame
                                   |
                                   +----lilgpMonitor

public class lilgpMonitor
extends Frame
implements Timed
This is the main class. It creates the various UI components and is responsible for dispatching events to the appropriate classes when the user changes settings.

Variable Index

 o numViewers

Constructor Index

 o lilgpMonitor()
The constructor method is responsible for creating each of the UI components and initializing variables.

Method Index

 o action(Event, Object)
 o handleEvent(Event)
 o main(String[])
The main method for the application.
 o readData(String)
This method actually reads the lilgp statistics file.
 o selectedAbout()
This method creates a dialog that describes the software
 o selectedCloseViewer()
This method closes a viewer.
 o selectedExitAll()
This method closes all viewers.
 o selectedLines()
This method responsible for updating the linestyle in the Graph object.
 o selectedLinesPoints()
This method responsible for updating the linestyle in the Graph object.
 o selectedManualUpdates()
This method manually updates the graph.
 o selectedNewViewer()
This method simply instantiates a new viewer
 o selectedOpen()
This method is called when the user selects Open from the file menu.
 o selectedSaveAs()
This method is called when the user selects Save As from the file menu.
 o setTimer(int)
This method sets a timer for automatic updates
 o stopTimer()
This method stops the current timer
 o tick(Timer)
Everytime we recieve a tick from our timer, reload the data file
 o updateGraphData(int, int, int, int)
This method is responsible for retrieving the correct data from the statistics and passing it into the Graph object.

Variables

 o numViewers
  public static int numViewers

Constructors

 o lilgpMonitor
  public lilgpMonitor()
The constructor method is responsible for creating each of the UI components and initializing variables.

Methods

 o handleEvent
  public boolean handleEvent(Event event)
Overrides:
handleEvent in class Component
 o action
  public boolean action(Event event,
                        Object arg)
Overrides:
action in class Component
 o main
  public static void main(String args[])
The main method for the application. Simply instantiates itself.
 o selectedOpen
  public void selectedOpen()
This method is called when the user selects Open from the file menu. It creates a file dialog and then calls the method that reads the data.
See Also:
readData
 o selectedSaveAs
  public void selectedSaveAs()
This method is called when the user selects Save As from the file menu. It opens a file dialog and then calls the conversion routine to create the GIF file.
 o selectedNewViewer
  public void selectedNewViewer()
This method simply instantiates a new viewer
 o selectedCloseViewer
  public void selectedCloseViewer()
This method closes a viewer.
 o selectedExitAll
  public void selectedExitAll()
This method closes all viewers.
 o selectedLines
  public void selectedLines()
This method responsible for updating the linestyle in the Graph object.
See Also:
setLineStyle
 o selectedLinesPoints
  public void selectedLinesPoints()
This method responsible for updating the linestyle in the Graph object.
See Also:
setLineStyle
 o selectedManualUpdates
  public void selectedManualUpdates()
This method manually updates the graph.
 o selectedAbout
  public void selectedAbout()
This method creates a dialog that describes the software
 o readData
  public void readData(String inputFile) throws IOException
This method actually reads the lilgp statistics file.
Parameters:
inputFile - pathname to the datafile.
 o updateGraphData
  public void updateGraphData(int m_One,
                              int m_Two,
                              int p_one,
                              int p_two)
This method is responsible for retrieving the correct data from the statistics and passing it into the Graph object.
Parameters:
m_One - the current selection for metric one
m_Two - the current selection for metric Two
p_one - the current selection for subpopulation one
p_two - the current selection for subpopulation two
See Also:
setGraphData
 o stopTimer
  public void stopTimer()
This method stops the current timer
 o setTimer
  public void setTimer(int minutes)
This method sets a timer for automatic updates
Parameters:
minutes - the amount of time in minutes for the timer
 o tick
  public void tick(Timer t)
Everytime we recieve a tick from our timer, reload the data file
Parameters:
t - a reference to the Timer object
See Also:
Timer