package com.rle.monitor; /* * RLE Surface Crack Detector Graphing Software * * Copyright (C) 2002 RLE Technologies * For more information visit http://www.rletech.com/ * * This program is free software; you can redistribute it and/or * modify it under the terms of the GNU General Public License * as published by the Free Software Foundation; either version 2 * of the License, or (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, * USA. */ /** * @author Andy Goth * @author Eric Peterson * @author Matt Lane * @version 0.1 */ import java.io.*; import java.lang.*; import java.util.*; import javax.swing.*; /** The main class. */ public class App { private Buffer buffer = new Buffer("COM1"); private Window window = new Window(this); private Display display = new Display(this); private Setup setup = new Setup(this); /** Constructor. */ public App() throws IOException { buffer.setDisplay(display); window.setPanel(display); buffer.open(); } /** Returns the main window. */ public Window getWindow() {return window;} /** Returns the data display frame. */ public Display getDisplay() {return display;} /** Returns the setup frame. */ public Setup getSetup() {return setup;} /** Returns the sample buffer. */ public Buffer getBuffer() {return buffer;} /** Ends the program. */ public void shutdown () { try { buffer.close(); } catch (Exception x) {} System.exit(0); } /** Ye olde main function. */ public static void main(String[] args) { try { UIManager.setLookAndFeel( "javax.swing.plaf.metal.MetalLookAndFeel"); } catch (Exception e) { e.printStackTrace(); } try { App app = new App(); } catch (Exception e) { e.printStackTrace(); JOptionPane.showMessageDialog(null, e.getMessage(), "Unhandled Exception", JOptionPane.ERROR_MESSAGE); System.exit(1); } } }