/*
 *    Debrief - the Open Source Maritime Analysis Application
 *    http://debrief.info
 *
 *    (C) 2000-2014, PlanetMayo Ltd
 *
 *    This library is free software; you can redistribute it and/or
 *    modify it under the terms of the Eclipse Public License v1.0
 *    (http://www.eclipse.org/legal/epl-v10.html)
 *
 *    This library 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. 
 */
package Debrief.GUI;

// Copyright MWC 1999, Debrief 3 Project
// $RCSfile: DebriefApp.java,v $
// @author $Author: Ian.Mayo $
// @version $Revision: 1.3 $
// $Log: DebriefApp.java,v $
// Revision 1.3  2005/12/13 09:06:15  Ian.Mayo
// Tidying - as recommended by Eclipse
//
// Revision 1.2  2004/07/06 09:17:26  Ian.Mayo
// Intellij tidying
//
// Revision 1.1.1.2  2003/07/21 14:46:53  Ian.Mayo
// Re-import Java files to keep correct line spacing
//
// Revision 1.2  2002-05-29 10:05:04+01  ian_mayo
// minor tidying
//
// Revision 1.1  2002-05-28 12:19:16+01  ian_mayo
// Following file name change


/**
 * This class can take a variable number of parameters on the command
 * line. Program execution begins with the main() method. The class
 * constructor is not invoked unless an object of type 'Class1'
 * created in the main() method.
 */

import Debrief.GUI.Frames.Application;
import Debrief.GUI.Frames.AWT.AWTApplication;
import Debrief.GUI.Frames.Swing.SwingApplication;

/**
 * Top level class for Debrief 3 application
 */
public class DebriefApp {

    /**
     * Whether to create a SWING application, or an AWT application
     */
    final boolean USE_SWING = true;

    /**
     * the application we start
     */
    protected static Application aw;

    /**
     * The main entry point for the application.
     *
     * @param args Array of parameters passed to the application via the command line.
     */
    public static void main(final String[] args) {

        new DebriefApp();

        // and now open any files, as requested
        final int num = args.length;
        aw.setCursor(java.awt.Cursor.WAIT_CURSOR);
        for (int i = 0; i < num; i++) {
            aw.openFile(new java.io.File(args[i]));
        }
        aw.setCursor(java.awt.Cursor.DEFAULT_CURSOR);

    }

    /**
     * Constructor for this class
     */
    public DebriefApp() {
        if (USE_SWING) {
            // try setting the look & feel
//            try {
// //           UIManager.setLookAndFeel("com.sun.java.swing.plaf.windows.WindowsLookAndFeel");
//                UIManager.setLookAndFeel("com.sun.java.swing.plaf.motif.MotifLookAndFeel");
//            } catch (ClassNotFoundException e) {
//                e.printStackTrace();  //To change body of catch statement use File | Settings | File Templates.
//            } catch (InstantiationException e) {
//                e.printStackTrace();  //To change body of catch statement use File | Settings | File Templates.
//            } catch (IllegalAccessException e) {
//                e.printStackTrace();  //To change body of catch statement use File | Settings | File Templates.
//            } catch (UnsupportedLookAndFeelException e) {
//                e.printStackTrace();  //To change body of catch statement use File | Settings | File Templates.
//            }
            aw = new SwingApplication();
        } else
            aw = new AWTApplication();
    }

}


@@ -1408,16 +1408,102 @@
 %0A */%0D%0A%0D%0A
+import javax.swing.UIManager;%0D%0Aimport javax.swing.UnsupportedLookAndFeelException;%0D%0A%0D%0A
 import D
@@ -2643,18 +2643,16 @@
 & feel%0D%0A
-//
         
@@ -2662,18 +2662,16 @@
  try %7B%0D%0A
-//
  //     
@@ -2765,34 +2765,32 @@
 //              
-  
 UIManager.setLoo
@@ -2842,34 +2842,132 @@
 LookAndFeel%22);%0D%0A
-//
+              UIManager.setLookAndFeel(UIManager.getSystemLookAndFeelClassName());%0D%0A              %0D%0A
             %7D ca
@@ -2992,34 +2992,32 @@
 Exception e) %7B%0D%0A
-//
                 
@@ -3105,34 +3105,32 @@
 ile Templates.%0D%0A
-//
             %7D ca
@@ -3155,34 +3155,32 @@
 Exception e) %7B%0D%0A
-//
                 
@@ -3268,34 +3268,32 @@
 ile Templates.%0D%0A
-//
             %7D ca
@@ -3318,34 +3318,32 @@
 Exception e) %7B%0D%0A
-//
                 
@@ -3431,34 +3431,32 @@
 ile Templates.%0D%0A
-//
             %7D ca
@@ -3498,18 +3498,16 @@
 n e) %7B%0D%0A
-//
         
@@ -3611,18 +3611,16 @@
 lates.%0D%0A
-//
         

put calculations into sub-menu