org.sump.analyzer
Class MainWindow

java.lang.Object
  extended by java.awt.event.WindowAdapter
      extended by org.sump.analyzer.MainWindow
All Implemented Interfaces:
java.awt.event.ActionListener, java.awt.event.WindowFocusListener, java.awt.event.WindowListener, java.awt.event.WindowStateListener, java.util.EventListener, StatusChangeListener

public final class MainWindow
extends java.awt.event.WindowAdapter
implements java.awt.event.ActionListener, java.awt.event.WindowListener, StatusChangeListener

Main frame and starter for Logic Analyzer Client.

This class only provides a simple end-user frontend and no functionality to be used by other code.

Version:
0.7
Author:
Michael "Mr. Sump" Poppitz

Constructor Summary
MainWindow()
          Constructs and displays the main window.
 
Method Summary
 void actionPerformed(java.awt.event.ActionEvent event)
          Handles all user interaction.
 void exit()
          Tells the main thread to exit.
 void loadData(java.io.File file)
          Load the given file as data.
 void loadProject(java.io.File file)
          Load the given file as project.
 void run()
          Home of the main thread.
 void statusChanged(java.lang.String s)
          Handles status change requests.
 void windowClosing(java.awt.event.WindowEvent event)
          Handles window close requests.
 
Methods inherited from class java.awt.event.WindowAdapter
windowActivated, windowClosed, windowDeactivated, windowDeiconified, windowGainedFocus, windowIconified, windowLostFocus, windowOpened, windowStateChanged
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface java.awt.event.WindowListener
windowActivated, windowClosed, windowDeactivated, windowDeiconified, windowIconified, windowOpened
 

Constructor Detail

MainWindow

public MainWindow()
Constructs and displays the main window.

Method Detail

actionPerformed

public void actionPerformed(java.awt.event.ActionEvent event)
Handles all user interaction.

Specified by:
actionPerformed in interface java.awt.event.ActionListener

statusChanged

public void statusChanged(java.lang.String s)
Handles status change requests.

Specified by:
statusChanged in interface StatusChangeListener
Parameters:
s - new status bar text

windowClosing

public void windowClosing(java.awt.event.WindowEvent event)
Handles window close requests.

Specified by:
windowClosing in interface java.awt.event.WindowListener
Overrides:
windowClosing in class java.awt.event.WindowAdapter

loadData

public void loadData(java.io.File file)
              throws java.io.IOException
Load the given file as data.

Parameters:
file - file to be loaded as data
Throws:
java.io.IOException - when an IO error occurs

loadProject

public void loadProject(java.io.File file)
                 throws java.io.IOException
Load the given file as project.

Parameters:
file - file to be loaded as projects
Throws:
java.io.IOException - when an IO error occurs

run

public void run()
Home of the main thread. Which happens to be a lazy one.


exit

public void exit()
Tells the main thread to exit. This will stop the VM.