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.lang.Runnable, java.util.EventListener, StatusChangeListener

public final class MainWindow
extends java.awt.event.WindowAdapter
implements java.lang.Runnable, 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()
          Default constructor.
 
Method Summary
 void actionPerformed(java.awt.event.ActionEvent event)
          Handles all user interaction.
(package private)  void createGUI()
          Creates the GUI.
 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()
          Starts GUI creation and displays it.
 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()
Default constructor.

Method Detail

createGUI

void createGUI()
Creates the GUI.


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()
Starts GUI creation and displays it. Must be called be Swing event dispatcher thread.

Specified by:
run in interface java.lang.Runnable

exit

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