Package GUI

Source Code of GUI.mainForm

/*
* To change this template, choose Tools | Templates
* and open the template in the editor.
*/

/*
* MainForm.java
*
* Created on Sep 5, 2009, 10:14:25 AM
*/
package GUI;

import Core.Data;
import Core.DataManager;
import Core.GraphResultDrawer;
import Core.Result;
import Core.ResultDrawer;
import Core.ResultManager;
import Core.TabularResultDrawer;
import java.awt.HeadlessException;
import java.awt.Image;
import java.io.BufferedWriter;
import java.io.File;
import java.io.FileNotFoundException;
import java.io.FileWriter;
import java.io.IOException;
import java.io.Writer;
import java.util.logging.Level;
import java.util.logging.Logger;
import javax.swing.ImageIcon;
import javax.swing.JFileChooser;
import javax.swing.JFrame;
import javax.swing.JOptionPane;
import javax.swing.JPanel;
import javax.swing.JTable;
import javax.swing.filechooser.FileNameExtensionFilter;

/**
*
* @author M Shakeer Anver
*/
public class mainForm extends javax.swing.JFrame {

    Data data;
    Result result;
    ResultManager resultManager;
    GraphResultDrawer graphDrawer;
    TabularResultDrawer tableDrawer;
    SelectProjectDlg welcomeWizard;
    DataInputWizard dataInputWizard;
    String projectPath;
    boolean projectIsSaved;
    boolean dataIsChanged;

    /**
     * Returns current project's path
     * @return  current project's path
     */
    public String getProjectPath() {
        return projectPath;
    }

    /**
     * Sets the path of the current project
     * @param projectPath   path of the current project
     */
    public void setProjectPath(String projectPath) {
        this.projectPath = projectPath;
    }

    /**
     * Returns the current data
     * @return Current data
     */
    public Data getData() {
        return data;
    }

    /**
     * Sets a new data as current
     * @param data new data
     */
    public void setData(Data data) {
        this.data = data;
        resultManager = new ResultManager(data);
    }

    /**
     * Returns the current calculated results
     * @return Current results
     */
    public Result getResult() {
        return result;
    }

    /**
     * Sets a new result as current
     * @param result New result
     */
    public void setResult(Result result) {
        this.result = result;
    }

    /** Creates new form MainForm */
    public mainForm() {

        initComponents();
        result = new Result();
        welcomeWizard = new SelectProjectDlg(this, true);
        dataInputWizard = new DataInputWizard(this, true);
        projectPath = new String();
        projectIsSaved = false;
        dataIsChanged = false;



    }

    /**
     * Returns whether the current data has been changed since its last save
     * @return true if data has been changed
     *         false if data has not been changed
     */
    public boolean isDataIsChanged() {
        return dataIsChanged;
    }

    /**
     * Sets the state od the curent data as either changed or unchanged
     * @param dataIsChanged state od the curent data as either changed or unchanged
     */
    public void setDataIsChanged(boolean dataIsChanged) {
        this.dataIsChanged = dataIsChanged;
    }

    /**
     * Returns whether the project has already been saved
     * @return true if the project has already been saved
     *         false if project has not been saved yet
     */
    public boolean projectIsSaved() {
        return projectIsSaved;
    }

    /**
     * Sets whether project has been saved based on the value of parameter
     * @param projectIsSaved whether project has been saved
     */
    public void setProjectIsSaved(boolean projectIsSaved) {
        this.projectIsSaved = projectIsSaved;
    }

    /**
     * Sets the data preview table in the preview pane on data input pane
     * @param new_dataTable data preview table
     */
    public void setDataPreviewTable(JTable new_dataTable) {
        this.dataPreviewTable = new_dataTable;
    }

    private void exitSystem() throws HeadlessException {
       String curPath = new String(projectPath);

        if (dataIsChanged) {
            int answer = JOptionPane.showConfirmDialog(this, "Do you want to save the changes?", "WinSIS", JOptionPane.YES_NO_CANCEL_OPTION, JOptionPane.QUESTION_MESSAGE);
            if (answer == JOptionPane.YES_OPTION) {
                if (!projectIsSaved) {
                    projectPath = showProjectSaveDialog();
                }
                saveProject(true);
                if(curPath.equals(projectPath))
                    System.exit(0);
            }
            if (answer == JOptionPane.NO_OPTION) {
                System.exit(0);
            }
            if (answer == JOptionPane.CANCEL_OPTION) {
               
            }
        }else
            System.exit(0);
       
    }

    /** This method is called from within the constructor to
     * initialize the form.
     * WARNING: Do NOT modify this code. The content of this method is
     * always regenerated by the Form Editor.
     */
    @SuppressWarnings("unchecked")
    // <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents
    private void initComponents() {

        buttonGroup1 = new javax.swing.ButtonGroup();
        graphsBtnGroup = new javax.swing.ButtonGroup();
        reportsBtnGroup = new javax.swing.ButtonGroup();
        coverPageButtonGroup = new javax.swing.ButtonGroup();
        jToolBar1 = new javax.swing.JToolBar();
        projectWizardBtn = new javax.swing.JButton();
        saveToolbarBtn = new javax.swing.JButton();
        navigationPnl = new javax.swing.JPanel();
        dataInputBtn = new javax.swing.JToggleButton();
        resultsBtn = new javax.swing.JToggleButton();
        reportsBtn = new javax.swing.JToggleButton();
        navigationTfld = new javax.swing.JTextField();
        dataInputFld = new javax.swing.JTextField();
        resultsFld = new javax.swing.JTextField();
        reportsFld = new javax.swing.JTextField();
        jDesktopPane1 = new javax.swing.JDesktopPane();
        dataInputFrm = new javax.swing.JInternalFrame();
        dataInputTasksPnl = new javax.swing.JPanel();
        enterDataBtn = new javax.swing.JButton();
        jSeparator4 = new javax.swing.JSeparator();
        jLabel1 = new javax.swing.JLabel();
        dataDescriptionLbl1 = new javax.swing.JLabel();
        dataInputDataFieldsPnl = new javax.swing.JPanel();
        pileNodesDataRdBtn = new javax.swing.JRadioButton();
        dataInputPreviewPnl = new javax.swing.JPanel();
        jScrollPane1 = new javax.swing.JScrollPane();
        dataPreviewTable = new javax.swing.JTable();
        resultFrm = new javax.swing.JInternalFrame();
        resultsTasksPnl = new javax.swing.JPanel();
        generateGraphBtn = new javax.swing.JButton();
        generateTableBtn = new javax.swing.JButton();
        jSeparator5 = new javax.swing.JSeparator();
        jLabel2 = new javax.swing.JLabel();
        resultDescriptionLbl1 = new javax.swing.JLabel();
        resultDataFieldsPnl = new javax.swing.JPanel();
        soilMovementRdBtn = new javax.swing.JRadioButton();
        soilPressureRdBtn = new javax.swing.JRadioButton();
        absLimitRdBtn = new javax.swing.JRadioButton();
        dispRdBtn = new javax.swing.JRadioButton();
        rotRdBtn = new javax.swing.JRadioButton();
        bendmRdBtn = new javax.swing.JRadioButton();
        shearForceRdBtn = new javax.swing.JRadioButton();
        resultsPreviewPnl = new javax.swing.JPanel();
        graphPreviewLbl = new javax.swing.JLabel();
        reportsFrm = new javax.swing.JInternalFrame();
        reportsTasksPnl = new javax.swing.JPanel();
        jSeparator6 = new javax.swing.JSeparator();
        jLabel3 = new javax.swing.JLabel();
        reportDescriptionLbl1 = new javax.swing.JLabel();
        textReportRdBtn = new javax.swing.JRadioButton();
        excelReportRdBtn = new javax.swing.JRadioButton();
        pdfReportRdBtn = new javax.swing.JRadioButton();
        reportsDataFieldsPnl = new javax.swing.JPanel();
        landscapeRdBtn = new javax.swing.JRadioButton();
        portraitRdBtn = new javax.swing.JRadioButton();
        coverPageCheckBox = new javax.swing.JCheckBox();
        authorLabel = new javax.swing.JLabel();
        authorField = new javax.swing.JTextField();
        projectDescriptionLabel = new javax.swing.JLabel();
        jScrollPane2 = new javax.swing.JScrollPane();
        projectDescriptionTextArea = new javax.swing.JTextArea();
        notesCheckBox = new javax.swing.JCheckBox();
        reportsNotesPnl = new javax.swing.JPanel();
        jScrollPane3 = new javax.swing.JScrollPane();
        notesTextArea = new javax.swing.JTextArea();
        generateBtn = new javax.swing.JButton();
        jMenuBar1 = new javax.swing.JMenuBar();
        fileMenu = new javax.swing.JMenu();
        projectWizardMenuBtn = new javax.swing.JMenuItem();
        saveBtn = new javax.swing.JMenuItem();
        saveAsBtn = new javax.swing.JMenuItem();
        fileMenuSeparator = new javax.swing.JSeparator();
        closeBtn = new javax.swing.JMenuItem();
        exitBtn = new javax.swing.JMenuItem();
        dataMenu = new javax.swing.JMenu();
        enterDataMenuBtn = new javax.swing.JMenuItem();
        viewDataBtn = new javax.swing.JMenuItem();
        resultsMenu = new javax.swing.JMenu();
        tabularResultsBtn = new javax.swing.JMenuItem();
        graphicalResultsBtn = new javax.swing.JMenuItem();
        jMenu2 = new javax.swing.JMenu();
        helpBtn = new javax.swing.JMenuItem();
        aboutBtn = new javax.swing.JMenuItem();

        setDefaultCloseOperation(javax.swing.WindowConstants.DO_NOTHING_ON_CLOSE);
        setTitle("WinSIS - Untitled Project");
        addWindowListener(new java.awt.event.WindowAdapter() {
            public void windowClosing(java.awt.event.WindowEvent evt) {
                formWindowClosing(evt);
            }
            public void windowOpened(java.awt.event.WindowEvent evt) {
                formWindowOpened(evt);
            }
        });

        jToolBar1.setFloatable(false);
        jToolBar1.setRollover(true);

        projectWizardBtn.setIcon(new javax.swing.ImageIcon(getClass().getResource("/icons/wizard.png"))); // NOI18N
        projectWizardBtn.setToolTipText("Project Wizard");
        projectWizardBtn.setAlignmentX(0.5F);
        projectWizardBtn.setFocusable(false);
        projectWizardBtn.setHorizontalTextPosition(javax.swing.SwingConstants.CENTER);
        projectWizardBtn.setIconTextGap(5);
        projectWizardBtn.setVerticalTextPosition(javax.swing.SwingConstants.BOTTOM);
        projectWizardBtn.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                projectWizardBtnActionPerformed(evt);
            }
        });
        jToolBar1.add(projectWizardBtn);

        saveToolbarBtn.setIcon(new javax.swing.ImageIcon(getClass().getResource("/icons/Save-Icon.jpg"))); // NOI18N
        saveToolbarBtn.setToolTipText("Save");
        saveToolbarBtn.setFocusable(false);
        saveToolbarBtn.setHorizontalTextPosition(javax.swing.SwingConstants.CENTER);
        saveToolbarBtn.setVerticalTextPosition(javax.swing.SwingConstants.BOTTOM);
        saveToolbarBtn.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                saveToolbarBtnActionPerformed(evt);
            }
        });
        jToolBar1.add(saveToolbarBtn);

        navigationPnl.setBackground(new java.awt.Color(255, 255, 255));
        navigationPnl.setBorder(javax.swing.BorderFactory.createLineBorder(new java.awt.Color(153, 153, 153)));

        dataInputBtn.setBackground(new java.awt.Color(255, 255, 255));
        buttonGroup1.add(dataInputBtn);
        dataInputBtn.setIcon(new javax.swing.ImageIcon(getClass().getResource("/icons/dataimage.jpg"))); // NOI18N
        dataInputBtn.setSelected(true);
        dataInputBtn.setBorder(null);
        dataInputBtn.setSelectedIcon(new javax.swing.ImageIcon(getClass().getResource("/icons/dataimageonselect.jpg"))); // NOI18N
        dataInputBtn.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                dataInputBtnActionPerformed(evt);
            }
        });

        resultsBtn.setBackground(new java.awt.Color(255, 255, 255));
        buttonGroup1.add(resultsBtn);
        resultsBtn.setIcon(new javax.swing.ImageIcon(getClass().getResource("/icons/resultimage.jpg"))); // NOI18N
        resultsBtn.setBorder(null);
        resultsBtn.setSelectedIcon(new javax.swing.ImageIcon(getClass().getResource("/icons/resultimageonselect.jpg"))); // NOI18N
        resultsBtn.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                resultsBtnActionPerformed(evt);
            }
        });

        reportsBtn.setBackground(new java.awt.Color(255, 255, 255));
        buttonGroup1.add(reportsBtn);
        reportsBtn.setIcon(new javax.swing.ImageIcon(getClass().getResource("/icons/reportsmage.jpg"))); // NOI18N
        reportsBtn.setBorder(null);
        reportsBtn.setSelectedIcon(new javax.swing.ImageIcon(getClass().getResource("/icons/reportsmageonselect.jpg"))); // NOI18N
        reportsBtn.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                reportsBtnActionPerformed(evt);
            }
        });

        navigationTfld.setBackground(new java.awt.Color(204, 204, 255));
        navigationTfld.setEditable(false);
        navigationTfld.setFont(new java.awt.Font("Verdana", 1, 11));
        navigationTfld.setHorizontalAlignment(javax.swing.JTextField.CENTER);
        navigationTfld.setText("Navigation");

        dataInputFld.setEditable(false);
        dataInputFld.setFont(new java.awt.Font("Tahoma", 1, 11));
        dataInputFld.setHorizontalAlignment(javax.swing.JTextField.CENTER);
        dataInputFld.setText("Data Input");
        dataInputFld.setBorder(null);

        resultsFld.setEditable(false);
        resultsFld.setFont(new java.awt.Font("Tahoma", 1, 11));
        resultsFld.setHorizontalAlignment(javax.swing.JTextField.CENTER);
        resultsFld.setText("Results");
        resultsFld.setBorder(null);

        reportsFld.setEditable(false);
        reportsFld.setFont(new java.awt.Font("Tahoma", 1, 11));
        reportsFld.setHorizontalAlignment(javax.swing.JTextField.CENTER);
        reportsFld.setText("Reports");
        reportsFld.setBorder(null);

        javax.swing.GroupLayout navigationPnlLayout = new javax.swing.GroupLayout(navigationPnl);
        navigationPnl.setLayout(navigationPnlLayout);
        navigationPnlLayout.setHorizontalGroup(
            navigationPnlLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(navigationPnlLayout.createSequentialGroup()
                .addGap(30, 30, 30)
                .addGroup(navigationPnlLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.CENTER)
                    .addComponent(dataInputBtn, javax.swing.GroupLayout.PREFERRED_SIZE, 65, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(reportsBtn, javax.swing.GroupLayout.PREFERRED_SIZE, 65, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(resultsBtn, javax.swing.GroupLayout.PREFERRED_SIZE, 66, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(dataInputFld, javax.swing.GroupLayout.PREFERRED_SIZE, 66, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(resultsFld, javax.swing.GroupLayout.PREFERRED_SIZE, 53, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(reportsFld, javax.swing.GroupLayout.PREFERRED_SIZE, 53, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addContainerGap(34, Short.MAX_VALUE))
            .addComponent(navigationTfld, javax.swing.GroupLayout.DEFAULT_SIZE, 130, Short.MAX_VALUE)
        );
        navigationPnlLayout.setVerticalGroup(
            navigationPnlLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(navigationPnlLayout.createSequentialGroup()
                .addComponent(navigationTfld, javax.swing.GroupLayout.PREFERRED_SIZE, 29, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addGap(47, 47, 47)
                .addComponent(dataInputBtn, javax.swing.GroupLayout.PREFERRED_SIZE, 62, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addComponent(dataInputFld, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, 69, Short.MAX_VALUE)
                .addComponent(resultsBtn, javax.swing.GroupLayout.PREFERRED_SIZE, 64, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addComponent(resultsFld, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addGap(63, 63, 63)
                .addComponent(reportsBtn, javax.swing.GroupLayout.PREFERRED_SIZE, 62, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addComponent(reportsFld, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addGap(49, 49, 49))
        );

        jDesktopPane1.setBackground(new java.awt.Color(204, 204, 204));
        jDesktopPane1.setBorder(javax.swing.BorderFactory.createLineBorder(new java.awt.Color(153, 153, 153)));
        jDesktopPane1.setDoubleBuffered(true);
        dataInputFrm.setVisible(true);

        dataInputFrm.setBackground(new java.awt.Color(255, 255, 255));
        dataInputFrm.setBorder(javax.swing.BorderFactory.createLineBorder(new java.awt.Color(0, 0, 0)));
        dataInputFrm.setMaximizable(true);
        dataInputFrm.setPreferredSize(new java.awt.Dimension(620, 500));

        dataInputTasksPnl.setBackground(new java.awt.Color(255, 255, 255));
        dataInputTasksPnl.setBorder(javax.swing.BorderFactory.createTitledBorder(null, "Tasks", javax.swing.border.TitledBorder.DEFAULT_JUSTIFICATION, javax.swing.border.TitledBorder.DEFAULT_POSITION, new java.awt.Font("Verdana", 1, 11), new java.awt.Color(153, 153, 153))); // NOI18N
        dataInputTasksPnl.setPreferredSize(new java.awt.Dimension(590, 120));

        enterDataBtn.setText("Enter Data Using Wizard");
        enterDataBtn.setBorder(new javax.swing.border.LineBorder(new java.awt.Color(51, 153, 255), 1, true));
        enterDataBtn.setContentAreaFilled(false);
        enterDataBtn.addMouseListener(new java.awt.event.MouseAdapter() {
            public void mouseEntered(java.awt.event.MouseEvent evt) {
                enterDataBtnMouseEntered(evt);
            }
            public void mouseExited(java.awt.event.MouseEvent evt) {
                enterDataBtnMouseExited(evt);
            }
        });
        enterDataBtn.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                enterDataBtnActionPerformed(evt);
            }
        });

        jSeparator4.setOrientation(javax.swing.SwingConstants.VERTICAL);

        jLabel1.setText("Description:");
        jLabel1.setEnabled(false);

        javax.swing.GroupLayout dataInputTasksPnlLayout = new javax.swing.GroupLayout(dataInputTasksPnl);
        dataInputTasksPnl.setLayout(dataInputTasksPnlLayout);
        dataInputTasksPnlLayout.setHorizontalGroup(
            dataInputTasksPnlLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(dataInputTasksPnlLayout.createSequentialGroup()
                .addContainerGap()
                .addComponent(enterDataBtn, javax.swing.GroupLayout.PREFERRED_SIZE, 173, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addGap(84, 84, 84)
                .addComponent(jSeparator4, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addGroup(dataInputTasksPnlLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addComponent(jLabel1)
                    .addComponent(dataDescriptionLbl1, javax.swing.GroupLayout.DEFAULT_SIZE, 303, Short.MAX_VALUE))
                .addContainerGap())
        );
        dataInputTasksPnlLayout.setVerticalGroup(
            dataInputTasksPnlLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(dataInputTasksPnlLayout.createSequentialGroup()
                .addGroup(dataInputTasksPnlLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addComponent(jSeparator4, javax.swing.GroupLayout.DEFAULT_SIZE, 81, Short.MAX_VALUE)
                    .addGroup(dataInputTasksPnlLayout.createSequentialGroup()
                        .addComponent(jLabel1)
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                        .addComponent(dataDescriptionLbl1, javax.swing.GroupLayout.PREFERRED_SIZE, 15, javax.swing.GroupLayout.PREFERRED_SIZE))
                    .addComponent(enterDataBtn, javax.swing.GroupLayout.PREFERRED_SIZE, 24, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addContainerGap())
        );

        dataInputDataFieldsPnl.setBackground(new java.awt.Color(255, 255, 255));
        dataInputDataFieldsPnl.setBorder(javax.swing.BorderFactory.createTitledBorder(null, "Data Fields", javax.swing.border.TitledBorder.DEFAULT_JUSTIFICATION, javax.swing.border.TitledBorder.DEFAULT_POSITION, new java.awt.Font("Verdana", 1, 11), new java.awt.Color(153, 153, 153))); // NOI18N
        dataInputDataFieldsPnl.setPreferredSize(new java.awt.Dimension(270, 320));

        pileNodesDataRdBtn.setBackground(new java.awt.Color(255, 255, 255));
        pileNodesDataRdBtn.setText("Pile Nodes Data");
        pileNodesDataRdBtn.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                pileNodesDataRdBtnActionPerformed(evt);
            }
        });

        javax.swing.GroupLayout dataInputDataFieldsPnlLayout = new javax.swing.GroupLayout(dataInputDataFieldsPnl);
        dataInputDataFieldsPnl.setLayout(dataInputDataFieldsPnlLayout);
        dataInputDataFieldsPnlLayout.setHorizontalGroup(
            dataInputDataFieldsPnlLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(dataInputDataFieldsPnlLayout.createSequentialGroup()
                .addContainerGap()
                .addComponent(pileNodesDataRdBtn)
                .addContainerGap(151, Short.MAX_VALUE))
        );
        dataInputDataFieldsPnlLayout.setVerticalGroup(
            dataInputDataFieldsPnlLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(dataInputDataFieldsPnlLayout.createSequentialGroup()
                .addGap(15, 15, 15)
                .addComponent(pileNodesDataRdBtn)
                .addContainerGap(254, Short.MAX_VALUE))
        );

        dataInputPreviewPnl.setBackground(new java.awt.Color(255, 255, 255));
        dataInputPreviewPnl.setBorder(javax.swing.BorderFactory.createTitledBorder(null, "Preview", javax.swing.border.TitledBorder.DEFAULT_JUSTIFICATION, javax.swing.border.TitledBorder.DEFAULT_POSITION, new java.awt.Font("Verdana", 1, 11), new java.awt.Color(153, 153, 153))); // NOI18N
        dataInputPreviewPnl.setPreferredSize(new java.awt.Dimension(320, 320));

        dataPreviewTable.setModel(new javax.swing.table.DefaultTableModel(
            new Object [][] {

            },
            new String [] {

            }
        ));
        dataPreviewTable.setToolTipText("Preview the entered data here");
        dataPreviewTable.setColumnSelectionAllowed(true);
        dataPreviewTable.setEnabled(false);
        jScrollPane1.setViewportView(dataPreviewTable);
        dataPreviewTable.getColumnModel().getSelectionModel().setSelectionMode(javax.swing.ListSelectionModel.SINGLE_SELECTION);

        javax.swing.GroupLayout dataInputPreviewPnlLayout = new javax.swing.GroupLayout(dataInputPreviewPnl);
        dataInputPreviewPnl.setLayout(dataInputPreviewPnlLayout);
        dataInputPreviewPnlLayout.setHorizontalGroup(
            dataInputPreviewPnlLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(dataInputPreviewPnlLayout.createSequentialGroup()
                .addContainerGap()
                .addComponent(jScrollPane1, javax.swing.GroupLayout.DEFAULT_SIZE, 290, Short.MAX_VALUE)
                .addContainerGap())
        );
        dataInputPreviewPnlLayout.setVerticalGroup(
            dataInputPreviewPnlLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(dataInputPreviewPnlLayout.createSequentialGroup()
                .addComponent(jScrollPane1, javax.swing.GroupLayout.DEFAULT_SIZE, 281, Short.MAX_VALUE)
                .addContainerGap())
        );

        javax.swing.GroupLayout dataInputFrmLayout = new javax.swing.GroupLayout(dataInputFrm.getContentPane());
        dataInputFrm.getContentPane().setLayout(dataInputFrmLayout);
        dataInputFrmLayout.setHorizontalGroup(
            dataInputFrmLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(dataInputFrmLayout.createSequentialGroup()
                .addContainerGap()
                .addGroup(dataInputFrmLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addComponent(dataInputTasksPnl, javax.swing.GroupLayout.DEFAULT_SIZE, 598, Short.MAX_VALUE)
                    .addGroup(dataInputFrmLayout.createSequentialGroup()
                        .addComponent(dataInputDataFieldsPnl, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                        .addComponent(dataInputPreviewPnl, javax.swing.GroupLayout.DEFAULT_SIZE, 322, Short.MAX_VALUE)))
                .addContainerGap())
        );
        dataInputFrmLayout.setVerticalGroup(
            dataInputFrmLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(dataInputFrmLayout.createSequentialGroup()
                .addContainerGap()
                .addComponent(dataInputTasksPnl, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addGroup(dataInputFrmLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false)
                    .addComponent(dataInputPreviewPnl, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                    .addComponent(dataInputDataFieldsPnl, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
                .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
        );

        dataInputFrm.setBounds(10, 10, 620, 490);
        jDesktopPane1.add(dataInputFrm, javax.swing.JLayeredPane.DEFAULT_LAYER);

        resultFrm.setBackground(new java.awt.Color(255, 255, 255));
        resultFrm.setBorder(javax.swing.BorderFactory.createLineBorder(new java.awt.Color(0, 0, 0)));
        resultFrm.setMaximizable(true);
        resultFrm.setPreferredSize(new java.awt.Dimension(620, 490));

        resultsTasksPnl.setBackground(new java.awt.Color(255, 255, 255));
        resultsTasksPnl.setBorder(javax.swing.BorderFactory.createTitledBorder(null, "Tasks", javax.swing.border.TitledBorder.DEFAULT_JUSTIFICATION, javax.swing.border.TitledBorder.DEFAULT_POSITION, new java.awt.Font("Verdana", 1, 11), new java.awt.Color(153, 153, 153))); // NOI18N
        resultsTasksPnl.setFont(new java.awt.Font("Verdana", 1, 11));
        resultsTasksPnl.setPreferredSize(new java.awt.Dimension(596, 120));

        generateGraphBtn.setText("Generate Graphical Results");
        generateGraphBtn.setBorder(new javax.swing.border.LineBorder(new java.awt.Color(51, 153, 255), 1, true));
        generateGraphBtn.setContentAreaFilled(false);
        generateGraphBtn.addMouseListener(new java.awt.event.MouseAdapter() {
            public void mouseEntered(java.awt.event.MouseEvent evt) {
                generateGraphBtnMouseEntered(evt);
            }
            public void mouseExited(java.awt.event.MouseEvent evt) {
                generateGraphBtnMouseExited(evt);
            }
        });
        generateGraphBtn.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                generateGraphBtnActionPerformed(evt);
            }
        });

        generateTableBtn.setText("Generate Tabular Results");
        generateTableBtn.setBorder(new javax.swing.border.LineBorder(new java.awt.Color(51, 153, 255), 1, true));
        generateTableBtn.setContentAreaFilled(false);
        generateTableBtn.addMouseListener(new java.awt.event.MouseAdapter() {
            public void mouseEntered(java.awt.event.MouseEvent evt) {
                generateTableBtnMouseEntered(evt);
            }
            public void mouseExited(java.awt.event.MouseEvent evt) {
                generateTableBtnMouseExited(evt);
            }
        });
        generateTableBtn.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                generateTableBtnActionPerformed(evt);
            }
        });

        jSeparator5.setOrientation(javax.swing.SwingConstants.VERTICAL);

        jLabel2.setText("Description:");
        jLabel2.setEnabled(false);

        javax.swing.GroupLayout resultsTasksPnlLayout = new javax.swing.GroupLayout(resultsTasksPnl);
        resultsTasksPnl.setLayout(resultsTasksPnlLayout);
        resultsTasksPnlLayout.setHorizontalGroup(
            resultsTasksPnlLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(resultsTasksPnlLayout.createSequentialGroup()
                .addContainerGap()
                .addGroup(resultsTasksPnlLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addComponent(generateGraphBtn, javax.swing.GroupLayout.PREFERRED_SIZE, 173, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(generateTableBtn, javax.swing.GroupLayout.PREFERRED_SIZE, 173, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addGap(87, 87, 87)
                .addComponent(jSeparator5, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addGroup(resultsTasksPnlLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addComponent(jLabel2)
                    .addComponent(resultDescriptionLbl1, javax.swing.GroupLayout.DEFAULT_SIZE, 298, Short.MAX_VALUE))
                .addContainerGap())
        );
        resultsTasksPnlLayout.setVerticalGroup(
            resultsTasksPnlLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(resultsTasksPnlLayout.createSequentialGroup()
                .addGroup(resultsTasksPnlLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addGroup(resultsTasksPnlLayout.createSequentialGroup()
                        .addComponent(generateGraphBtn, javax.swing.GroupLayout.PREFERRED_SIZE, 24, javax.swing.GroupLayout.PREFERRED_SIZE)
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                        .addComponent(generateTableBtn, javax.swing.GroupLayout.PREFERRED_SIZE, 24, javax.swing.GroupLayout.PREFERRED_SIZE))
                    .addComponent(jSeparator5, javax.swing.GroupLayout.DEFAULT_SIZE, 81, Short.MAX_VALUE)
                    .addGroup(resultsTasksPnlLayout.createSequentialGroup()
                        .addComponent(jLabel2)
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                        .addComponent(resultDescriptionLbl1, javax.swing.GroupLayout.PREFERRED_SIZE, 15, javax.swing.GroupLayout.PREFERRED_SIZE)
                        .addGap(46, 46, 46)))
                .addContainerGap())
        );

        resultDataFieldsPnl.setBackground(new java.awt.Color(255, 255, 255));
        resultDataFieldsPnl.setBorder(javax.swing.BorderFactory.createTitledBorder(null, "Generated Charts", javax.swing.border.TitledBorder.DEFAULT_JUSTIFICATION, javax.swing.border.TitledBorder.DEFAULT_POSITION, new java.awt.Font("Verdana", 1, 11), new java.awt.Color(153, 153, 153))); // NOI18N
        resultDataFieldsPnl.setPreferredSize(new java.awt.Dimension(270, 320));

        soilMovementRdBtn.setBackground(new java.awt.Color(255, 255, 255));
        graphsBtnGroup.add(soilMovementRdBtn);
        soilMovementRdBtn.setText("Soil Movement");
        soilMovementRdBtn.setEnabled(false);
        soilMovementRdBtn.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                soilMovementRdBtnActionPerformed(evt);
            }
        });

        soilPressureRdBtn.setBackground(new java.awt.Color(255, 255, 255));
        graphsBtnGroup.add(soilPressureRdBtn);
        soilPressureRdBtn.setText("Soil Pressure");
        soilPressureRdBtn.setEnabled(false);
        soilPressureRdBtn.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                soilPressureRdBtnActionPerformed(evt);
            }
        });

        absLimitRdBtn.setBackground(new java.awt.Color(255, 255, 255));
        graphsBtnGroup.add(absLimitRdBtn);
        absLimitRdBtn.setText("ABS Limit Pressure");
        absLimitRdBtn.setEnabled(false);
        absLimitRdBtn.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                absLimitRdBtnActionPerformed(evt);
            }
        });

        dispRdBtn.setBackground(new java.awt.Color(255, 255, 255));
        graphsBtnGroup.add(dispRdBtn);
        dispRdBtn.setText("Displacement");
        dispRdBtn.setEnabled(false);
        dispRdBtn.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                dispRdBtnActionPerformed(evt);
            }
        });

        rotRdBtn.setBackground(new java.awt.Color(255, 255, 255));
        graphsBtnGroup.add(rotRdBtn);
        rotRdBtn.setText("Rotation");
        rotRdBtn.setEnabled(false);
        rotRdBtn.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                rotRdBtnActionPerformed(evt);
            }
        });

        bendmRdBtn.setBackground(new java.awt.Color(255, 255, 255));
        graphsBtnGroup.add(bendmRdBtn);
        bendmRdBtn.setText("Bending Moment");
        bendmRdBtn.setEnabled(false);
        bendmRdBtn.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                bendmRdBtnActionPerformed(evt);
            }
        });

        shearForceRdBtn.setBackground(new java.awt.Color(255, 255, 255));
        graphsBtnGroup.add(shearForceRdBtn);
        shearForceRdBtn.setText("Shear Force");
        shearForceRdBtn.setEnabled(false);
        shearForceRdBtn.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                shearForceRdBtnActionPerformed(evt);
            }
        });

        javax.swing.GroupLayout resultDataFieldsPnlLayout = new javax.swing.GroupLayout(resultDataFieldsPnl);
        resultDataFieldsPnl.setLayout(resultDataFieldsPnlLayout);
        resultDataFieldsPnlLayout.setHorizontalGroup(
            resultDataFieldsPnlLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(resultDataFieldsPnlLayout.createSequentialGroup()
                .addContainerGap()
                .addGroup(resultDataFieldsPnlLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addComponent(soilMovementRdBtn)
                    .addComponent(soilPressureRdBtn)
                    .addComponent(absLimitRdBtn)
                    .addComponent(dispRdBtn)
                    .addComponent(rotRdBtn)
                    .addComponent(bendmRdBtn)
                    .addComponent(shearForceRdBtn))
                .addContainerGap(139, Short.MAX_VALUE))
        );
        resultDataFieldsPnlLayout.setVerticalGroup(
            resultDataFieldsPnlLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(resultDataFieldsPnlLayout.createSequentialGroup()
                .addContainerGap()
                .addComponent(soilMovementRdBtn)
                .addGap(18, 18, 18)
                .addComponent(soilPressureRdBtn)
                .addGap(18, 18, 18)
                .addComponent(absLimitRdBtn)
                .addGap(18, 18, 18)
                .addComponent(dispRdBtn)
                .addGap(18, 18, 18)
                .addComponent(rotRdBtn)
                .addGap(18, 18, 18)
                .addComponent(bendmRdBtn)
                .addGap(18, 18, 18)
                .addComponent(shearForceRdBtn)
                .addContainerGap(16, Short.MAX_VALUE))
        );

        resultsPreviewPnl.setBackground(new java.awt.Color(255, 255, 255));
        resultsPreviewPnl.setBorder(javax.swing.BorderFactory.createTitledBorder(null, "Preview", javax.swing.border.TitledBorder.DEFAULT_JUSTIFICATION, javax.swing.border.TitledBorder.DEFAULT_POSITION, new java.awt.Font("Verdana", 1, 11), new java.awt.Color(153, 153, 153))); // NOI18N
        resultsPreviewPnl.setPreferredSize(new java.awt.Dimension(320, 320));

        javax.swing.GroupLayout resultsPreviewPnlLayout = new javax.swing.GroupLayout(resultsPreviewPnl);
        resultsPreviewPnl.setLayout(resultsPreviewPnlLayout);
        resultsPreviewPnlLayout.setHorizontalGroup(
            resultsPreviewPnlLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(resultsPreviewPnlLayout.createSequentialGroup()
                .addContainerGap()
                .addComponent(graphPreviewLbl)
                .addContainerGap())
        );
        resultsPreviewPnlLayout.setVerticalGroup(
            resultsPreviewPnlLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(resultsPreviewPnlLayout.createSequentialGroup()
                .addComponent(graphPreviewLbl)
                .addContainerGap(292, Short.MAX_VALUE))
        );

        javax.swing.GroupLayout resultFrmLayout = new javax.swing.GroupLayout(resultFrm.getContentPane());
        resultFrm.getContentPane().setLayout(resultFrmLayout);
        resultFrmLayout.setHorizontalGroup(
            resultFrmLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(resultFrmLayout.createSequentialGroup()
                .addContainerGap()
                .addGroup(resultFrmLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING, false)
                    .addComponent(resultsTasksPnl, javax.swing.GroupLayout.Alignment.LEADING, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                    .addGroup(javax.swing.GroupLayout.Alignment.LEADING, resultFrmLayout.createSequentialGroup()
                        .addComponent(resultDataFieldsPnl, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                        .addComponent(resultsPreviewPnl, javax.swing.GroupLayout.PREFERRED_SIZE, 320, javax.swing.GroupLayout.PREFERRED_SIZE)))
                .addContainerGap(51, Short.MAX_VALUE))
        );
        resultFrmLayout.setVerticalGroup(
            resultFrmLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(resultFrmLayout.createSequentialGroup()
                .addContainerGap()
                .addComponent(resultsTasksPnl, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addGroup(resultFrmLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addComponent(resultDataFieldsPnl, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(resultsPreviewPnl, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
        );

        resultFrm.setBounds(10, 10, 620, 490);
        jDesktopPane1.add(resultFrm, javax.swing.JLayeredPane.DEFAULT_LAYER);

        reportsFrm.setBackground(new java.awt.Color(255, 255, 255));
        reportsFrm.setBorder(javax.swing.BorderFactory.createLineBorder(new java.awt.Color(0, 0, 0)));
        reportsFrm.setMaximizable(true);
        reportsFrm.setPreferredSize(new java.awt.Dimension(620, 490));

        reportsTasksPnl.setBackground(new java.awt.Color(255, 255, 255));
        reportsTasksPnl.setBorder(javax.swing.BorderFactory.createTitledBorder(null, "Tasks", javax.swing.border.TitledBorder.DEFAULT_JUSTIFICATION, javax.swing.border.TitledBorder.DEFAULT_POSITION, new java.awt.Font("Verdana", 1, 11), new java.awt.Color(153, 153, 153))); // NOI18N
        reportsTasksPnl.setPreferredSize(new java.awt.Dimension(596, 120));

        jSeparator6.setOrientation(javax.swing.SwingConstants.VERTICAL);

        jLabel3.setText("Description:");
        jLabel3.setEnabled(false);

        textReportRdBtn.setBackground(new java.awt.Color(255, 255, 255));
        reportsBtnGroup.add(textReportRdBtn);
        textReportRdBtn.setText("Plain Text Report");
        textReportRdBtn.addMouseListener(new java.awt.event.MouseAdapter() {
            public void mouseEntered(java.awt.event.MouseEvent evt) {
                textReportRdBtnMouseEntered(evt);
            }
            public void mouseExited(java.awt.event.MouseEvent evt) {
                textReportRdBtnMouseExited(evt);
            }
        });
        textReportRdBtn.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                textReportRdBtnActionPerformed(evt);
            }
        });

        excelReportRdBtn.setBackground(new java.awt.Color(255, 255, 255));
        reportsBtnGroup.add(excelReportRdBtn);
        excelReportRdBtn.setText("Excel Report");
        excelReportRdBtn.addMouseListener(new java.awt.event.MouseAdapter() {
            public void mouseEntered(java.awt.event.MouseEvent evt) {
                excelReportRdBtnMouseEntered(evt);
            }
            public void mouseExited(java.awt.event.MouseEvent evt) {
                excelReportRdBtnMouseExited(evt);
            }
        });
        excelReportRdBtn.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                excelReportRdBtnActionPerformed(evt);
            }
        });

        pdfReportRdBtn.setBackground(new java.awt.Color(255, 255, 255));
        reportsBtnGroup.add(pdfReportRdBtn);
        pdfReportRdBtn.setText("PDF Report");
        pdfReportRdBtn.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                pdfReportRdBtnActionPerformed(evt);
            }
        });

        javax.swing.GroupLayout reportsTasksPnlLayout = new javax.swing.GroupLayout(reportsTasksPnl);
        reportsTasksPnl.setLayout(reportsTasksPnlLayout);
        reportsTasksPnlLayout.setHorizontalGroup(
            reportsTasksPnlLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, reportsTasksPnlLayout.createSequentialGroup()
                .addContainerGap()
                .addGroup(reportsTasksPnlLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addComponent(textReportRdBtn)
                    .addComponent(excelReportRdBtn)
                    .addComponent(pdfReportRdBtn))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, 151, Short.MAX_VALUE)
                .addComponent(jSeparator6, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addGroup(reportsTasksPnlLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)
                    .addGroup(reportsTasksPnlLayout.createSequentialGroup()
                        .addComponent(jLabel3)
                        .addGap(253, 253, 253))
                    .addGroup(reportsTasksPnlLayout.createSequentialGroup()
                        .addComponent(reportDescriptionLbl1, javax.swing.GroupLayout.DEFAULT_SIZE, 302, Short.MAX_VALUE)
                        .addContainerGap())))
        );
        reportsTasksPnlLayout.setVerticalGroup(
            reportsTasksPnlLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(reportsTasksPnlLayout.createSequentialGroup()
                .addGroup(reportsTasksPnlLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addComponent(jSeparator6, javax.swing.GroupLayout.DEFAULT_SIZE, 82, Short.MAX_VALUE)
                    .addGroup(reportsTasksPnlLayout.createSequentialGroup()
                        .addComponent(jLabel3)
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                        .addComponent(reportDescriptionLbl1, javax.swing.GroupLayout.PREFERRED_SIZE, 15, javax.swing.GroupLayout.PREFERRED_SIZE)
                        .addGap(46, 46, 46))
                    .addGroup(reportsTasksPnlLayout.createSequentialGroup()
                        .addContainerGap()
                        .addComponent(textReportRdBtn)
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                        .addComponent(excelReportRdBtn)
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                        .addComponent(pdfReportRdBtn)))
                .addContainerGap())
        );

        reportsDataFieldsPnl.setBackground(new java.awt.Color(255, 255, 255));
        reportsDataFieldsPnl.setBorder(javax.swing.BorderFactory.createTitledBorder(null, "Properties", javax.swing.border.TitledBorder.DEFAULT_JUSTIFICATION, javax.swing.border.TitledBorder.DEFAULT_POSITION, new java.awt.Font("Verdana", 1, 11), new java.awt.Color(153, 153, 153))); // NOI18N
        reportsDataFieldsPnl.setPreferredSize(new java.awt.Dimension(270, 320));

        landscapeRdBtn.setBackground(new java.awt.Color(255, 255, 255));
        coverPageButtonGroup.add(landscapeRdBtn);
        landscapeRdBtn.setText("Landscape");
        landscapeRdBtn.setEnabled(false);

        portraitRdBtn.setBackground(new java.awt.Color(255, 255, 255));
        coverPageButtonGroup.add(portraitRdBtn);
        portraitRdBtn.setText("Portrait");
        portraitRdBtn.setEnabled(false);

        coverPageCheckBox.setBackground(new java.awt.Color(255, 255, 255));
        coverPageCheckBox.setText("Cover Page");
        coverPageCheckBox.setEnabled(false);

        authorLabel.setText("Author");
        authorLabel.setEnabled(false);

        authorField.setEnabled(false);

        projectDescriptionLabel.setText("Project Description");
        projectDescriptionLabel.setEnabled(false);

        projectDescriptionTextArea.setColumns(20);
        projectDescriptionTextArea.setRows(5);
        projectDescriptionTextArea.setEnabled(false);
        jScrollPane2.setViewportView(projectDescriptionTextArea);

        notesCheckBox.setBackground(new java.awt.Color(255, 255, 255));
        notesCheckBox.setText("Notes");
        notesCheckBox.setEnabled(false);
        notesCheckBox.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                notesCheckBoxActionPerformed(evt);
            }
        });

        javax.swing.GroupLayout reportsDataFieldsPnlLayout = new javax.swing.GroupLayout(reportsDataFieldsPnl);
        reportsDataFieldsPnl.setLayout(reportsDataFieldsPnlLayout);
        reportsDataFieldsPnlLayout.setHorizontalGroup(
            reportsDataFieldsPnlLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(reportsDataFieldsPnlLayout.createSequentialGroup()
                .addContainerGap()
                .addGroup(reportsDataFieldsPnlLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addComponent(notesCheckBox)
                    .addComponent(coverPageCheckBox)
                    .addComponent(jScrollPane2, javax.swing.GroupLayout.DEFAULT_SIZE, 238, Short.MAX_VALUE)
                    .addGroup(reportsDataFieldsPnlLayout.createSequentialGroup()
                        .addComponent(landscapeRdBtn)
                        .addGap(10, 10, 10)
                        .addComponent(portraitRdBtn))
                    .addGroup(reportsDataFieldsPnlLayout.createSequentialGroup()
                        .addComponent(authorLabel)
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                        .addComponent(authorField, javax.swing.GroupLayout.DEFAULT_SIZE, 201, Short.MAX_VALUE))
                    .addComponent(projectDescriptionLabel))
                .addContainerGap())
        );
        reportsDataFieldsPnlLayout.setVerticalGroup(
            reportsDataFieldsPnlLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(reportsDataFieldsPnlLayout.createSequentialGroup()
                .addContainerGap()
                .addGroup(reportsDataFieldsPnlLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(landscapeRdBtn)
                    .addComponent(portraitRdBtn))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                .addGroup(reportsDataFieldsPnlLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(authorLabel)
                    .addComponent(authorField, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                .addComponent(projectDescriptionLabel)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addComponent(jScrollPane2, javax.swing.GroupLayout.PREFERRED_SIZE, 102, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                .addComponent(coverPageCheckBox)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                .addComponent(notesCheckBox)
                .addContainerGap(46, Short.MAX_VALUE))
        );

        reportsNotesPnl.setBackground(new java.awt.Color(255, 255, 255));
        reportsNotesPnl.setBorder(javax.swing.BorderFactory.createTitledBorder(null, "Notes", javax.swing.border.TitledBorder.DEFAULT_JUSTIFICATION, javax.swing.border.TitledBorder.DEFAULT_POSITION, new java.awt.Font("Verdana", 1, 11), new java.awt.Color(153, 153, 153))); // NOI18N
        reportsNotesPnl.setPreferredSize(new java.awt.Dimension(320, 320));

        notesTextArea.setColumns(20);
        notesTextArea.setRows(5);
        notesTextArea.setEnabled(false);
        jScrollPane3.setViewportView(notesTextArea);

        javax.swing.GroupLayout reportsNotesPnlLayout = new javax.swing.GroupLayout(reportsNotesPnl);
        reportsNotesPnl.setLayout(reportsNotesPnlLayout);
        reportsNotesPnlLayout.setHorizontalGroup(
            reportsNotesPnlLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(reportsNotesPnlLayout.createSequentialGroup()
                .addContainerGap()
                .addComponent(jScrollPane3, javax.swing.GroupLayout.DEFAULT_SIZE, 288, Short.MAX_VALUE)
                .addContainerGap())
        );
        reportsNotesPnlLayout.setVerticalGroup(
            reportsNotesPnlLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(reportsNotesPnlLayout.createSequentialGroup()
                .addContainerGap()
                .addComponent(jScrollPane3, javax.swing.GroupLayout.DEFAULT_SIZE, 161, Short.MAX_VALUE)
                .addContainerGap())
        );

        generateBtn.setText("Generate Report");
        generateBtn.setEnabled(false);
        generateBtn.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                generateBtnActionPerformed(evt);
            }
        });

        javax.swing.GroupLayout reportsFrmLayout = new javax.swing.GroupLayout(reportsFrm.getContentPane());
        reportsFrm.getContentPane().setLayout(reportsFrmLayout);
        reportsFrmLayout.setHorizontalGroup(
            reportsFrmLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(reportsFrmLayout.createSequentialGroup()
                .addContainerGap()
                .addGroup(reportsFrmLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addComponent(reportsTasksPnl, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addGroup(reportsFrmLayout.createSequentialGroup()
                        .addComponent(reportsDataFieldsPnl, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                        .addGroup(reportsFrmLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                            .addGroup(reportsFrmLayout.createSequentialGroup()
                                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                                .addComponent(reportsNotesPnl, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                            .addGroup(reportsFrmLayout.createSequentialGroup()
                                .addGap(116, 116, 116)
                                .addComponent(generateBtn)))))
                .addContainerGap())
        );
        reportsFrmLayout.setVerticalGroup(
            reportsFrmLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(reportsFrmLayout.createSequentialGroup()
                .addContainerGap()
                .addComponent(reportsTasksPnl, javax.swing.GroupLayout.PREFERRED_SIZE, 120, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addGroup(reportsFrmLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false)
                    .addGroup(reportsFrmLayout.createSequentialGroup()
                        .addComponent(reportsNotesPnl, javax.swing.GroupLayout.PREFERRED_SIZE, 211, javax.swing.GroupLayout.PREFERRED_SIZE)
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                        .addComponent(generateBtn))
                    .addComponent(reportsDataFieldsPnl, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addContainerGap())
        );

        reportsFrm.setBounds(10, 10, 620, 490);
        jDesktopPane1.add(reportsFrm, javax.swing.JLayeredPane.DEFAULT_LAYER);

        fileMenu.setText("Project");

        projectWizardMenuBtn.setAccelerator(javax.swing.KeyStroke.getKeyStroke(java.awt.event.KeyEvent.VK_N, java.awt.event.InputEvent.CTRL_MASK));
        projectWizardMenuBtn.setIcon(new javax.swing.ImageIcon(getClass().getResource("/icons/wizard.png"))); // NOI18N
        projectWizardMenuBtn.setText("Project Wizard...");
        projectWizardMenuBtn.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                projectWizardMenuBtnActionPerformed(evt);
            }
        });
        fileMenu.add(projectWizardMenuBtn);

        saveBtn.setAccelerator(javax.swing.KeyStroke.getKeyStroke(java.awt.event.KeyEvent.VK_S, java.awt.event.InputEvent.CTRL_MASK));
        saveBtn.setIcon(new javax.swing.ImageIcon(getClass().getResource("/icons/Save-Icon.jpg"))); // NOI18N
        saveBtn.setText("Save");
        saveBtn.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                saveBtnActionPerformed(evt);
            }
        });
        fileMenu.add(saveBtn);

        saveAsBtn.setText("Save as...");
        saveAsBtn.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                saveAsBtnActionPerformed(evt);
            }
        });
        fileMenu.add(saveAsBtn);
        fileMenu.add(fileMenuSeparator);

        closeBtn.setText("Close");
        closeBtn.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                closeBtnActionPerformed(evt);
            }
        });
        fileMenu.add(closeBtn);

        exitBtn.setText("Exit");
        exitBtn.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                exitBtnActionPerformed(evt);
            }
        });
        fileMenu.add(exitBtn);

        jMenuBar1.add(fileMenu);

        dataMenu.setText("Data");

        enterDataMenuBtn.setAccelerator(javax.swing.KeyStroke.getKeyStroke(java.awt.event.KeyEvent.VK_I, java.awt.event.InputEvent.CTRL_MASK));
        enterDataMenuBtn.setText("Enter/Modify Data...");
        enterDataMenuBtn.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                enterDataMenuBtnActionPerformed(evt);
            }
        });
        dataMenu.add(enterDataMenuBtn);

        viewDataBtn.setAccelerator(javax.swing.KeyStroke.getKeyStroke(java.awt.event.KeyEvent.VK_D, java.awt.event.InputEvent.CTRL_MASK));
        viewDataBtn.setText("View Current Data");
        viewDataBtn.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                viewDataBtnActionPerformed(evt);
            }
        });
        dataMenu.add(viewDataBtn);

        jMenuBar1.add(dataMenu);

        resultsMenu.setText("Results");

        tabularResultsBtn.setAccelerator(javax.swing.KeyStroke.getKeyStroke(java.awt.event.KeyEvent.VK_T, java.awt.event.InputEvent.CTRL_MASK));
        tabularResultsBtn.setText("Tabular Results");
        tabularResultsBtn.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                tabularResultsBtnActionPerformed(evt);
            }
        });
        resultsMenu.add(tabularResultsBtn);

        graphicalResultsBtn.setAccelerator(javax.swing.KeyStroke.getKeyStroke(java.awt.event.KeyEvent.VK_G, java.awt.event.InputEvent.CTRL_MASK));
        graphicalResultsBtn.setText("Graphical Results");
        graphicalResultsBtn.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                graphicalResultsBtnActionPerformed(evt);
            }
        });
        resultsMenu.add(graphicalResultsBtn);

        jMenuBar1.add(resultsMenu);

        jMenu2.setText("Help");

        helpBtn.setAccelerator(javax.swing.KeyStroke.getKeyStroke(java.awt.event.KeyEvent.VK_F1, 0));
        helpBtn.setText("Help Conents...");
        helpBtn.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                helpBtnActionPerformed(evt);
            }
        });
        jMenu2.add(helpBtn);

        aboutBtn.setText("About...");
        aboutBtn.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                aboutBtnActionPerformed(evt);
            }
        });
        jMenu2.add(aboutBtn);

        jMenuBar1.add(jMenu2);

        setJMenuBar(jMenuBar1);

        javax.swing.GroupLayout layout = new javax.swing.GroupLayout(getContentPane());
        getContentPane().setLayout(layout);
        layout.setHorizontalGroup(
            layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addComponent(jToolBar1, javax.swing.GroupLayout.DEFAULT_SIZE, 806, Short.MAX_VALUE)
            .addGroup(layout.createSequentialGroup()
                .addContainerGap()
                .addComponent(navigationPnl, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addComponent(jDesktopPane1, javax.swing.GroupLayout.DEFAULT_SIZE, 648, Short.MAX_VALUE)
                .addContainerGap())
        );
        layout.setVerticalGroup(
            layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(layout.createSequentialGroup()
                .addComponent(jToolBar1, javax.swing.GroupLayout.PREFERRED_SIZE, 25, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addComponent(jDesktopPane1, javax.swing.GroupLayout.DEFAULT_SIZE, 507, Short.MAX_VALUE)
                    .addComponent(navigationPnl, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
                .addContainerGap())
        );

        pack();
    }// </editor-fold>//GEN-END:initComponents

    private void dataInputBtnActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_dataInputBtnActionPerformed
        dataInputFrm.setVisible(dataInputBtn.hasFocus());
        resultFrm.setVisible(resultsBtn.hasFocus());
        reportsFrm.setVisible(reportsBtn.hasFocus());

    }//GEN-LAST:event_dataInputBtnActionPerformed

    private void resultsBtnActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_resultsBtnActionPerformed
        // TODO add your handling code here:
        dataInputFrm.setVisible(dataInputBtn.hasFocus());
        resultFrm.setVisible(resultsBtn.hasFocus());
        reportsFrm.setVisible(reportsBtn.hasFocus());
    }//GEN-LAST:event_resultsBtnActionPerformed

    private void reportsBtnActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_reportsBtnActionPerformed
        // TODO add your handling code here:
        dataInputFrm.setVisible(dataInputBtn.hasFocus());
        resultFrm.setVisible(resultsBtn.hasFocus());
        reportsFrm.setVisible(reportsBtn.hasFocus());

    }//GEN-LAST:event_reportsBtnActionPerformed

    private void formWindowOpened(java.awt.event.WindowEvent evt) {//GEN-FIRST:event_formWindowOpened

        welcomeWizard.setData(data);
        welcomeWizard.setVisible(true);



    }//GEN-LAST:event_formWindowOpened

    private void aboutBtnActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_aboutBtnActionPerformed

        AboutDlg aboutDialog = new AboutDlg(this, true);
        aboutDialog.setVisible(true);

    }//GEN-LAST:event_aboutBtnActionPerformed

    private void enterDataBtnActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_enterDataBtnActionPerformed
        if (data == null) {
            data = new Data();
        }
        dataInputWizard.setData(data);
        dataInputWizard.getDataTabPane().setSelectedIndex(0);
        dataInputWizard.setVisible(true);
    }//GEN-LAST:event_enterDataBtnActionPerformed

    private void pileNodesDataRdBtnActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_pileNodesDataRdBtnActionPerformed


        if (data == null) {
            data = new Data();
        }
        dataInputWizard.setData(data);
        dataPreviewTable.setModel(dataInputWizard.getPileNodesDataTable().getModel());

        dataPreviewTable.repaint();

    }//GEN-LAST:event_pileNodesDataRdBtnActionPerformed

    private void enterDataBtnMouseEntered(java.awt.event.MouseEvent evt) {//GEN-FIRST:event_enterDataBtnMouseEntered
        dataDescriptionLbl1.setText("Click to Enter Data Manually using Wizard");
    }//GEN-LAST:event_enterDataBtnMouseEntered

    private void enterDataBtnMouseExited(java.awt.event.MouseEvent evt) {//GEN-FIRST:event_enterDataBtnMouseExited
        dataDescriptionLbl1.setText(" ");
    }//GEN-LAST:event_enterDataBtnMouseExited

    private void generateGraphBtnMouseEntered(java.awt.event.MouseEvent evt) {//GEN-FIRST:event_generateGraphBtnMouseEntered
        resultDescriptionLbl1.setText("Click to draw the results in graphical format");
    }//GEN-LAST:event_generateGraphBtnMouseEntered

    private void generateGraphBtnMouseExited(java.awt.event.MouseEvent evt) {//GEN-FIRST:event_generateGraphBtnMouseExited
        resultDescriptionLbl1.setText(" ");
    }//GEN-LAST:event_generateGraphBtnMouseExited

    private void generateGraphBtnActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_generateGraphBtnActionPerformed
        generateGraphicalResult();


    }//GEN-LAST:event_generateGraphBtnActionPerformed

    private void generateTableBtnMouseEntered(java.awt.event.MouseEvent evt) {//GEN-FIRST:event_generateTableBtnMouseEntered
        resultDescriptionLbl1.setText("Click to draw the results in tabular format");
    }//GEN-LAST:event_generateTableBtnMouseEntered

    private void generateTableBtnMouseExited(java.awt.event.MouseEvent evt) {//GEN-FIRST:event_generateTableBtnMouseExited
        resultDescriptionLbl1.setText(" ");
    }//GEN-LAST:event_generateTableBtnMouseExited

    private void generateTableBtnActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_generateTableBtnActionPerformed
        generateTabularResult();
    }//GEN-LAST:event_generateTableBtnActionPerformed

    private void soilMovementRdBtnActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_soilMovementRdBtnActionPerformed
        Image[] graphs = graphDrawer.getGraphImages();
        ImageIcon graph = new ImageIcon(graphs[0]);
        graphPreviewLbl.setIcon(graph);
    }//GEN-LAST:event_soilMovementRdBtnActionPerformed

    private void soilPressureRdBtnActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_soilPressureRdBtnActionPerformed
        Image[] graphs = graphDrawer.getGraphImages();
        ImageIcon graph = new ImageIcon(graphs[1]);
        graphPreviewLbl.setIcon(graph);
    }//GEN-LAST:event_soilPressureRdBtnActionPerformed

    private void absLimitRdBtnActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_absLimitRdBtnActionPerformed
        Image[] graphs = graphDrawer.getGraphImages();
        ImageIcon graph = new ImageIcon(graphs[2]);
        graphPreviewLbl.setIcon(graph);
    }//GEN-LAST:event_absLimitRdBtnActionPerformed

    private void dispRdBtnActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_dispRdBtnActionPerformed
        Image[] graphs = graphDrawer.getGraphImages();
        ImageIcon graph = new ImageIcon(graphs[3]);
        graphPreviewLbl.setIcon(graph);
    }//GEN-LAST:event_dispRdBtnActionPerformed

    private void rotRdBtnActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_rotRdBtnActionPerformed
        Image[] graphs = graphDrawer.getGraphImages();
        ImageIcon graph = new ImageIcon(graphs[4]);
        graphPreviewLbl.setIcon(graph);
    }//GEN-LAST:event_rotRdBtnActionPerformed

    private void bendmRdBtnActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_bendmRdBtnActionPerformed
        Image[] graphs = graphDrawer.getGraphImages();
        ImageIcon graph = new ImageIcon(graphs[5]);
        graphPreviewLbl.setIcon(graph);
    }//GEN-LAST:event_bendmRdBtnActionPerformed

    private void shearForceRdBtnActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_shearForceRdBtnActionPerformed
        Image[] graphs = graphDrawer.getGraphImages();
        ImageIcon graph = new ImageIcon(graphs[6]);
        graphPreviewLbl.setIcon(graph);
    }//GEN-LAST:event_shearForceRdBtnActionPerformed

    private void textReportRdBtnMouseEntered(java.awt.event.MouseEvent evt) {//GEN-FIRST:event_textReportRdBtnMouseEntered
        resultDescriptionLbl1.setText("Opens in almost any text editor");
    }//GEN-LAST:event_textReportRdBtnMouseEntered

    private void textReportRdBtnMouseExited(java.awt.event.MouseEvent evt) {//GEN-FIRST:event_textReportRdBtnMouseExited
        resultDescriptionLbl1.setText(" ");
    }//GEN-LAST:event_textReportRdBtnMouseExited

    private void excelReportRdBtnMouseEntered(java.awt.event.MouseEvent evt) {//GEN-FIRST:event_excelReportRdBtnMouseEntered
        resultDescriptionLbl1.setText("Opens Microsoft Excel 97 and above");
    }//GEN-LAST:event_excelReportRdBtnMouseEntered

    private void excelReportRdBtnMouseExited(java.awt.event.MouseEvent evt) {//GEN-FIRST:event_excelReportRdBtnMouseExited
        resultDescriptionLbl1.setText(" ");
    }//GEN-LAST:event_excelReportRdBtnMouseExited

    private void generateBtnActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_generateBtnActionPerformed
        Runtime run = Runtime.getRuntime();
        Process p;
        boolean reportTypeSelected = false;
        boolean saveIsSelected = false;
        try {
            resultManager.setData(data);
            result = resultManager.getResult();
            String reportFilePath = new String();
            if (textReportRdBtn.isSelected()) {
                reportTypeSelected = true;
                FileNameExtensionFilter csvFilter = new FileNameExtensionFilter("Comma Seperated Values File(*.csv)", "csv");
                JFileChooser saveTextReportDlg = new JFileChooser("./");
                saveTextReportDlg.addChoosableFileFilter(csvFilter);
                int returnVal = saveTextReportDlg.showSaveDialog(this);
                if (returnVal == JFileChooser.APPROVE_OPTION) {
                    reportFilePath = saveTextReportDlg.getSelectedFile().getPath();
                    if (!reportFilePath.toLowerCase().endsWith(".csv")) {
                        reportFilePath = reportFilePath.concat(".csv");
                }
                    resultManager.saveToFile(reportFilePath);
                    saveIsSelected = true;
                }
            }
            if (excelReportRdBtn.isSelected()) {
                reportTypeSelected = true;
                FileNameExtensionFilter excelFilter = new FileNameExtensionFilter("Microsoft Excel 97-2003 Spreadsheet(*.xls)", "xls");
                JFileChooser saveTextReportDlg = new JFileChooser("./");
                saveTextReportDlg.addChoosableFileFilter(excelFilter);
                int returnVal = saveTextReportDlg.showSaveDialog(this);
                if (returnVal == JFileChooser.APPROVE_OPTION) {
                    reportFilePath = saveTextReportDlg.getSelectedFile().getPath();
                    if (!reportFilePath.toLowerCase().endsWith(".xls")) {
                        reportFilePath = reportFilePath.concat(".xls");
                }
                    resultManager.saveToFile(reportFilePath);
                    saveIsSelected = true;
                }
            }
            if (pdfReportRdBtn.isSelected()) {
                reportTypeSelected = true;
                FileNameExtensionFilter excelFilter = new FileNameExtensionFilter("Adobe Portable Document Format(*.pdf)", "pdf");
                JFileChooser saveExcelReportDlg = new JFileChooser("./");
                saveExcelReportDlg.addChoosableFileFilter(excelFilter);
                int returnVal = saveExcelReportDlg.showSaveDialog(this);
                if (returnVal == JFileChooser.APPROVE_OPTION) {
                    reportFilePath = saveExcelReportDlg.getSelectedFile().getPath();
                    if (!reportFilePath.toLowerCase().endsWith(".pdf")) {
                        reportFilePath = reportFilePath.concat(".pdf");
                    }
                if (portraitRdBtn.isSelected()) {
                    resultManager.setPage(true);
                }else {
                    resultManager.setPage(false);
                }
                if (coverPageCheckBox.isSelected()) {
                    resultManager.enabledCoverPage(true);
                }else {
                    resultManager.enabledCoverPage(false);
                }

                resultManager.setAuthor(authorField.getText());
                resultManager.setProjectDesc(projectDescriptionTextArea.getText());

                String notes = notesTextArea.getText();

                if(notes.isEmpty() == false) {
                    Writer writer = null;
                    File file = new File("notes.txt");
                    writer = new BufferedWriter(new FileWriter(file));
                    writer.write(notes);
                    writer.close();
                }

                    resultManager.saveToFile(reportFilePath);
                    saveIsSelected = true;

                }
            }
            if (!reportTypeSelected) {
                throw new Exception("Select a report type first!");
            }

            if(saveIsSelected){
                int answer = JOptionPane.showConfirmDialog(this, "Report Created! Open Now?", "WinSIS", JOptionPane.YES_NO_OPTION, JOptionPane.QUESTION_MESSAGE);
                if (answer == JOptionPane.YES_OPTION) {
                    Runtime.getRuntime().exec("rundll32 SHELL32.DLL,ShellExec_RunDLL \""+reportFilePath+"\"");
                }
                saveIsSelected = false;
            }


        } catch (FileNotFoundException ex) {
            JOptionPane.showMessageDialog(this, ex.getMessage(), "WinSIS", JOptionPane.ERROR_MESSAGE);
        } catch (IOException ex) {
            JOptionPane.showMessageDialog(this, ex.getMessage(), "WinSIS", JOptionPane.ERROR_MESSAGE);
        } catch (Exception ex) {
            JOptionPane.showMessageDialog(this, "Results are outdated. Regenerate the results any try again.\n", "WinSIS", JOptionPane.ERROR_MESSAGE);
        }

    }//GEN-LAST:event_generateBtnActionPerformed

    private void textReportRdBtnActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_textReportRdBtnActionPerformed
        generateBtn.setEnabled(true);
        generateBtn.setEnabled(true);
        landscapeRdBtn.setEnabled(false);
        portraitRdBtn.setEnabled(false);
        coverPageCheckBox.setEnabled(false);
        authorField.setEnabled(false);
        authorLabel.setEnabled(false);
        projectDescriptionLabel.setEnabled(false);
        projectDescriptionTextArea.setEnabled(false);
        notesCheckBox.setEnabled(false);
        notesTextArea.setEnabled(false);

    }//GEN-LAST:event_textReportRdBtnActionPerformed

    private void excelReportRdBtnActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_excelReportRdBtnActionPerformed
        generateBtn.setEnabled(true);
        generateBtn.setEnabled(true);
        landscapeRdBtn.setEnabled(false);
        portraitRdBtn.setEnabled(false);
        coverPageCheckBox.setEnabled(false);
        authorField.setEnabled(false);
        authorLabel.setEnabled(false);
        projectDescriptionLabel.setEnabled(false);
        projectDescriptionTextArea.setEnabled(false);
        notesCheckBox.setEnabled(false);
        notesTextArea.setEnabled(false);

    }//GEN-LAST:event_excelReportRdBtnActionPerformed

    private void projectWizardBtnActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_projectWizardBtnActionPerformed
        openStartupWizard();
    }//GEN-LAST:event_projectWizardBtnActionPerformed

    private void enterDataMenuBtnActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_enterDataMenuBtnActionPerformed
        if (data == null) {
            data = new Data();
        }
        dataInputWizard.setData(data);
        dataInputWizard.setVisible(true);

    }//GEN-LAST:event_enterDataMenuBtnActionPerformed

private void viewDataBtnActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_viewDataBtnActionPerformed
    if (data == null || data.getNumOfElements() == 0) {
        JOptionPane.showMessageDialog(this, "Data is not ready yet.\nThis could " +
                "be because you have not imported/inserted any data.", "WinSIS", JOptionPane.ERROR_MESSAGE);
//            dataInputWizard.setData(data);
//            dataPreviewTable.setModel(dataInputWizard.getPileNodesDataTable().getModel()) ;
        } else {
        JFrame dataViewWindow = new JFrame("WinSIS|Data Preview");
        dataViewWindow.setDefaultCloseOperation(DISPOSE_ON_CLOSE);
        JPanel dataViewPanel = new JPanel();
        dataInputWizard.setData(data);
       
        JTable dataTable = new JTable(dataInputWizard.getPileNodesDataTable().getModel());
       
        dataTable.setEnabled(false);
        dataTable.setAutoCreateColumnsFromModel(true);

        dataViewPanel.add(dataTable);
        dataViewWindow.add(dataViewPanel);
        dataViewWindow.pack();
        dataViewWindow.setResizable(false);
        dataViewWindow.setVisible(true);

    }
}//GEN-LAST:event_viewDataBtnActionPerformed

private void tabularResultsBtnActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_tabularResultsBtnActionPerformed
    generateTabularResult();
}//GEN-LAST:event_tabularResultsBtnActionPerformed

private void graphicalResultsBtnActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_graphicalResultsBtnActionPerformed
    generateGraphicalResult();
}//GEN-LAST:event_graphicalResultsBtnActionPerformed

private void projectWizardMenuBtnActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_projectWizardMenuBtnActionPerformed
    openStartupWizard();

}//GEN-LAST:event_projectWizardMenuBtnActionPerformed

private void helpBtnActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_helpBtnActionPerformed
        try {
            Runtime.getRuntime().exec("rundll32 SHELL32.DLL,ShellExec_RunDLL \"" + "help.pdf" + "\"");
        } catch (IOException ex) {
            JOptionPane.showMessageDialog(this, "Unable to find the help file!", "WinSIS", JOptionPane.ERROR_MESSAGE);
        }
}//GEN-LAST:event_helpBtnActionPerformed

private void saveToolbarBtnActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_saveToolbarBtnActionPerformed

    if (!projectIsSaved) {
        projectPath = showProjectSaveDialog();
    }
    saveProject(true);

}//GEN-LAST:event_saveToolbarBtnActionPerformed

private void saveBtnActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_saveBtnActionPerformed
    if (!projectIsSaved) {
        projectPath = showProjectSaveDialog();
    }
    saveProject(true);
}//GEN-LAST:event_saveBtnActionPerformed

private void saveAsBtnActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_saveAsBtnActionPerformed

    projectPath = showProjectSaveDialog();
    saveProject(true);

}//GEN-LAST:event_saveAsBtnActionPerformed

private void closeBtnActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_closeBtnActionPerformed
    boolean closeCancelled = false;
    if (dataIsChanged) {
        int answer = JOptionPane.showConfirmDialog(this, "Do you want to save the changes?", "WinSIS",
                JOptionPane.YES_NO_CANCEL_OPTION, JOptionPane.QUESTION_MESSAGE);
        if (answer == JOptionPane.YES_OPTION) {
            if (!projectIsSaved) {
                projectPath = showProjectSaveDialog();
            }
            saveProject(true);
            resetProgram();
        }

        if (answer == JOptionPane.NO_OPTION) {
            resetProgram();
        }
        if (answer == JOptionPane.CANCEL_OPTION) {
            closeCancelled = true;
        }
    }
    if (!closeCancelled) {
        resetProgram();
    }
}//GEN-LAST:event_closeBtnActionPerformed

private void exitBtnActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_exitBtnActionPerformed
        exitSystem();
}//GEN-LAST:event_exitBtnActionPerformed

private void formWindowClosing(java.awt.event.WindowEvent evt) {//GEN-FIRST:event_formWindowClosing
        exitSystem();
}//GEN-LAST:event_formWindowClosing

private void pdfReportRdBtnActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_pdfReportRdBtnActionPerformed
    generateBtn.setEnabled(true);
    if(pdfReportRdBtn.isSelected()) {
       landscapeRdBtn.setEnabled(true);
       portraitRdBtn.setEnabled(true);
       coverPageCheckBox.setEnabled(true);
       notesCheckBox.setEnabled(true);
       authorField.setEnabled(true);
       authorLabel.setEnabled(true);
       projectDescriptionLabel.setEnabled(true);
       projectDescriptionTextArea.setEnabled(true);
    }

}//GEN-LAST:event_pdfReportRdBtnActionPerformed

private void notesCheckBoxActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_notesCheckBoxActionPerformed
    if(notesCheckBox.isSelected()) {
            notesTextArea.setEnabled(true);
            notesTextArea.setText("");

        } else {
            File f = new File("notes.txt");
            if(f.exists()) {
                f.delete();
            }
            notesTextArea.setText("");
            notesTextArea.setEnabled(false);
        }
}//GEN-LAST:event_notesCheckBoxActionPerformed

    // Variables declaration - do not modify//GEN-BEGIN:variables
    private javax.swing.JMenuItem aboutBtn;
    private javax.swing.JRadioButton absLimitRdBtn;
    private javax.swing.JTextField authorField;
    private javax.swing.JLabel authorLabel;
    private javax.swing.JRadioButton bendmRdBtn;
    private javax.swing.ButtonGroup buttonGroup1;
    private javax.swing.JMenuItem closeBtn;
    private javax.swing.ButtonGroup coverPageButtonGroup;
    private javax.swing.JCheckBox coverPageCheckBox;
    private javax.swing.JLabel dataDescriptionLbl1;
    private javax.swing.JToggleButton dataInputBtn;
    private javax.swing.JPanel dataInputDataFieldsPnl;
    private javax.swing.JTextField dataInputFld;
    private javax.swing.JInternalFrame dataInputFrm;
    private javax.swing.JPanel dataInputPreviewPnl;
    private javax.swing.JPanel dataInputTasksPnl;
    private javax.swing.JMenu dataMenu;
    private javax.swing.JTable dataPreviewTable;
    private javax.swing.JRadioButton dispRdBtn;
    private javax.swing.JButton enterDataBtn;
    private javax.swing.JMenuItem enterDataMenuBtn;
    private javax.swing.JRadioButton excelReportRdBtn;
    private javax.swing.JMenuItem exitBtn;
    private javax.swing.JMenu fileMenu;
    private javax.swing.JSeparator fileMenuSeparator;
    private javax.swing.JButton generateBtn;
    private javax.swing.JButton generateGraphBtn;
    private javax.swing.JButton generateTableBtn;
    private javax.swing.JLabel graphPreviewLbl;
    private javax.swing.JMenuItem graphicalResultsBtn;
    private javax.swing.ButtonGroup graphsBtnGroup;
    private javax.swing.JMenuItem helpBtn;
    private javax.swing.JDesktopPane jDesktopPane1;
    private javax.swing.JLabel jLabel1;
    private javax.swing.JLabel jLabel2;
    private javax.swing.JLabel jLabel3;
    private javax.swing.JMenu jMenu2;
    private javax.swing.JMenuBar jMenuBar1;
    private javax.swing.JScrollPane jScrollPane1;
    private javax.swing.JScrollPane jScrollPane2;
    private javax.swing.JScrollPane jScrollPane3;
    private javax.swing.JSeparator jSeparator4;
    private javax.swing.JSeparator jSeparator5;
    private javax.swing.JSeparator jSeparator6;
    private javax.swing.JToolBar jToolBar1;
    private javax.swing.JRadioButton landscapeRdBtn;
    private javax.swing.JPanel navigationPnl;
    private javax.swing.JTextField navigationTfld;
    private javax.swing.JCheckBox notesCheckBox;
    private javax.swing.JTextArea notesTextArea;
    private javax.swing.JRadioButton pdfReportRdBtn;
    private javax.swing.JRadioButton pileNodesDataRdBtn;
    private javax.swing.JRadioButton portraitRdBtn;
    private javax.swing.JLabel projectDescriptionLabel;
    private javax.swing.JTextArea projectDescriptionTextArea;
    private javax.swing.JButton projectWizardBtn;
    private javax.swing.JMenuItem projectWizardMenuBtn;
    private javax.swing.JLabel reportDescriptionLbl1;
    private javax.swing.JToggleButton reportsBtn;
    private javax.swing.ButtonGroup reportsBtnGroup;
    private javax.swing.JPanel reportsDataFieldsPnl;
    private javax.swing.JTextField reportsFld;
    private javax.swing.JInternalFrame reportsFrm;
    private javax.swing.JPanel reportsNotesPnl;
    private javax.swing.JPanel reportsTasksPnl;
    private javax.swing.JPanel resultDataFieldsPnl;
    private javax.swing.JLabel resultDescriptionLbl1;
    private javax.swing.JInternalFrame resultFrm;
    private javax.swing.JToggleButton resultsBtn;
    private javax.swing.JTextField resultsFld;
    private javax.swing.JMenu resultsMenu;
    private javax.swing.JPanel resultsPreviewPnl;
    private javax.swing.JPanel resultsTasksPnl;
    private javax.swing.JRadioButton rotRdBtn;
    private javax.swing.JMenuItem saveAsBtn;
    private javax.swing.JMenuItem saveBtn;
    private javax.swing.JButton saveToolbarBtn;
    private javax.swing.JRadioButton shearForceRdBtn;
    private javax.swing.JRadioButton soilMovementRdBtn;
    private javax.swing.JRadioButton soilPressureRdBtn;
    private javax.swing.JMenuItem tabularResultsBtn;
    private javax.swing.JRadioButton textReportRdBtn;
    private javax.swing.JMenuItem viewDataBtn;
    // End of variables declaration//GEN-END:variables

    private void showResultsWindow(ResultDrawer drawer) {
        JFrame graphsWindow = new JFrame("WinSIS - Calculation Results");
        graphsWindow.setDefaultCloseOperation(DISPOSE_ON_CLOSE);
        graphsWindow.setExtendedState(MAXIMIZED_BOTH);
        graphsWindow.add(drawer.Draw());
        graphsWindow.pack();
        graphsWindow.setVisible(true);
    }

    private void enableRadioButtons(boolean val) {
        soilMovementRdBtn.setEnabled(val);
        soilPressureRdBtn.setEnabled(val);
        absLimitRdBtn.setEnabled(val);
        dispRdBtn.setEnabled(val);
        rotRdBtn.setEnabled(val);
        bendmRdBtn.setEnabled(val);
        shearForceRdBtn.setEnabled(val);
    }

    private void generateTabularResult() {
        try {
            if (data == null || data.getNumOfElements() == 0) {
                throw new Exception("Data has not been entered/imported yet!\nGo to Input Data section to import data");
            }
            if (resultManager == null) {
                resultManager = new ResultManager(data);
            }
            else
                resultManager.setData(data);
            tableDrawer = resultManager.getTabularResultDrawer();
            showResultsWindow(tableDrawer);
            result = resultManager.getResult();

        } catch (Exception ex) {
            JOptionPane.showMessageDialog(this, "Unable to draw the results!\n" + ex.getMessage(), "WinSIS", JOptionPane.ERROR_MESSAGE);
        }
    }

    private void generateGraphicalResult() {
        try {
            if (data == null || data.getNumOfElements() == 0) {
                throw new Exception("Data has not been entered/imported yet!\nGo to Input Data section to import data");
            }
            if (resultManager == null) {
                resultManager = new ResultManager(data);
            }else
                resultManager.setData(data);
           
            graphDrawer = resultManager.getGraphDrawer();

            showResultsWindow(graphDrawer);
            enableRadioButtons(true);
            result = resultManager.getResult();
        } catch (Exception ex) {
            JOptionPane.showMessageDialog(this, "Unable to draw the results!\n" + ex.getMessage(), "WinSIS", JOptionPane.ERROR_MESSAGE);
        }
    }

    /**
     * Changes the title of main program window according to project's file path
     * and updates the project path
     * @param filePath project's file path
     */
    public void changeTilte(String filePath) {
        setTitle("WinSIS - " + filePath);
        projectPath = filePath;
    }

    private String showProjectSaveDialog() {
        FileNameExtensionFilter wssFilter = new FileNameExtensionFilter("WinSIS Project", "wss");
        JFileChooser saveProjectDialog = new JFileChooser("./");
        saveProjectDialog.addChoosableFileFilter(wssFilter);
        String newProjectPath = new String("null");
        int answer = saveProjectDialog.showSaveDialog(this);
        if (answer == JFileChooser.APPROVE_OPTION) {
            newProjectPath = saveProjectDialog.getSelectedFile().getAbsolutePath();
            if (!newProjectPath.endsWith(".wss")) {
                newProjectPath = newProjectPath.concat(".wss");
            }
        }
        return newProjectPath;
    }

    /**
     * Saves the changes to the project
     * @param saveToFile whether the changes need to be saved to file
     */
    public void saveProject(boolean saveToFile) {

        try {
            if (data == null || data.getNumOfElements() == 0) {
                throw new Exception("Data has not been entered/imported yet!\nGo to Input Data section to import data");
            }
            if (!projectPath.equalsIgnoreCase("null")) {
                if (resultManager == null)
                    resultManager = new ResultManager(data);
                else
                    resultManager.setData(data);
                if(saveToFile){
                    resultManager.saveToFile(projectPath);
                    projectIsSaved = true;
                    changeTilte(projectPath);
                    dataIsChanged = false;
                }

               
               
               
               
            }

        } catch (IOException ex) {
            JOptionPane.showMessageDialog(this, "An Input/Output Error occured while trying to save the file!" +
                    "\nDescription: " + ex.getMessage(), "WinSIS", JOptionPane.ERROR_MESSAGE);
        } catch (Exception ex) {
            JOptionPane.showMessageDialog(this, "An Error occured while trying to save the file!" +
                    "\nDescription: " + ex.getLocalizedMessage(), "WinSIS", JOptionPane.ERROR_MESSAGE);
        }



    }

    private void resetProgram() {
        data = new Data();
        result = new Result();
        //resultManager = new ResultManager(result);
        welcomeWizard = new SelectProjectDlg(this, true);
        dataInputWizard = new DataInputWizard(this, true);
        projectPath = new String("Untitled Project");
        changeTilte(projectPath);
        enableRadioButtons(false);
        projectIsSaved = false;
        dataIsChanged = false;
        //dataInputWizard.setData(data);
        data = null;
        dataPreviewTable.setModel(dataInputWizard.getPileNodesDataTable().getModel());
        dataPreviewTable.repaint();
        graphPreviewLbl.setIcon(null);
        result = new Result();
        welcomeWizard = new SelectProjectDlg(this, true);
        dataInputWizard = new DataInputWizard(this, true);
        projectPath = new String();
        projectIsSaved = false;
        dataIsChanged = false;

    }

    private void openStartupWizard() {
       
        int answer = -1;
        if (dataIsChanged) {
            answer = JOptionPane.showConfirmDialog(this, "Do you want to save the changes?", "WinSIS",
                    JOptionPane.YES_NO_CANCEL_OPTION, JOptionPane.QUESTION_MESSAGE);
            if (answer == JOptionPane.YES_OPTION) {
                if (!projectIsSaved) {
                    projectPath = showProjectSaveDialog();
                }
                saveProject(true);
                resetProgram();
                welcomeWizard.setVisible(true);
            }

            if (answer == JOptionPane.NO_OPTION) {
                resetProgram();
                welcomeWizard.setVisible(true);
            }

           
           
        }
        if(answer==-1){
            resetProgram();
            welcomeWizard.setVisible(true);
        }
       
    }
}
TOP

Related Classes of GUI.mainForm

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.