/*
 * RunDialog_n.java
 *
 * Created on November 22, 2003, 4:09 PM
 */

package usda.weru.weps.gui;

/**
 * This "RUN dialog" GUI shows the progress of the run's execution process.The wind 
 * generation, climate file generation and the overall WEPS model itself is being 
 * monitored here.
 * @author  manmohan
 */
public class RunDialog_n extends javax.swing.JFrame {
    
   /**
    * Default constructor for the Run Dialog GUI object that helps the user in
    * getting to know how long will the run take to be executed before all the 
    * reports are generated. 
    * It also initializes the components that go in the GUI with default settings.
    */
    public RunDialog_n() {
        super();
        initComponents();
    }

    
   /**
    * Single argument constructor for the Run Dialog GUI object that helps the user in
    * getting to know how long will the run take to be executed before all the 
    * reports are generated.
    * It also initializes the components that go in the GUI with default settings.
    * @param title The title string for the parent frame of the GUI.
    */
    public RunDialog_n(java.lang.String title) {
        this();
        initComponents();
        setTitle(title);
    }
    
    
    /** 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.
     */
    // <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents
    private void initComponents() {

        JLabel4 = new javax.swing.JLabel();
        JLabel2 = new javax.swing.JLabel();
        JLabel3 = new javax.swing.JLabel();
        JTF_win = new javax.swing.JTextField();
        JTF_cli = new javax.swing.JTextField();
        JTF_weps = new javax.swing.JTextField();
        JTF_status = new javax.swing.JTextField();
        JPB_weps = new javax.swing.JProgressBar();
        jPanel1 = new javax.swing.JPanel();
        JB_can = new javax.swing.JButton();
        JL_runName = new javax.swing.JLabel();

        setDefaultCloseOperation(javax.swing.WindowConstants.DO_NOTHING_ON_CLOSE);
        setTitle("Run Dialog");
        setMinimumSize(new java.awt.Dimension(220, 240));
        addWindowListener(new java.awt.event.WindowAdapter() {
            public void windowClosing(java.awt.event.WindowEvent evt) {
                RunDialog_n_WindowClosing(evt);
            }
        });

        JLabel4.setHorizontalAlignment(javax.swing.SwingConstants.LEFT);
        JLabel4.setText("Wind Generation :");

        JLabel2.setHorizontalAlignment(javax.swing.SwingConstants.LEFT);
        JLabel2.setText("Climate Generation :");

        JLabel3.setHorizontalAlignment(javax.swing.SwingConstants.LEFT);
        JLabel3.setText("WEPS Model :");

        JTF_win.setEditable(false);
        JTF_win.setHorizontalAlignment(javax.swing.JTextField.LEFT);

        JTF_cli.setEditable(false);
        JTF_cli.setHorizontalAlignment(javax.swing.JTextField.LEFT);

        JTF_weps.setEditable(false);
        JTF_weps.setHorizontalAlignment(javax.swing.JTextField.LEFT);

        JTF_status.setEditable(false);
        JTF_status.setHorizontalAlignment(javax.swing.JTextField.LEFT);

        JB_can.setText("Cancel");
        JB_can.setToolTipText("RunDialog : Cancel");
        JB_can.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                JBCan_ActionPerformed(evt);
            }
        });
        jPanel1.add(JB_can);

        JL_runName.setText("run name klajsdf l;kajs dflkj asl;dfkj alsdkjf lkajsdf lkajsd flasd");

        org.jdesktop.layout.GroupLayout layout = new org.jdesktop.layout.GroupLayout(getContentPane());
        getContentPane().setLayout(layout);
        layout.setHorizontalGroup(
            layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)
            .add(layout.createSequentialGroup()
                .addContainerGap()
                .add(layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)
                    .add(JL_runName, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, 238, Short.MAX_VALUE)
                    .add(layout.createSequentialGroup()
                        .add(JLabel4, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, 120, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)
                        .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED)
                        .add(JTF_win, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, 114, Short.MAX_VALUE))
                    .add(layout.createSequentialGroup()
                        .add(JLabel2, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, 120, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)
                        .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED)
                        .add(JTF_cli, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, 114, Short.MAX_VALUE))
                    .add(JTF_status, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, 238, Short.MAX_VALUE)
                    .add(layout.createSequentialGroup()
                        .add(JLabel3, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, 120, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)
                        .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED)
                        .add(JTF_weps, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, 114, Short.MAX_VALUE))
                    .add(JPB_weps, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, 238, Short.MAX_VALUE)
                    .add(jPanel1, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, 238, Short.MAX_VALUE))
                .addContainerGap())
        );
        layout.setVerticalGroup(
            layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)
            .add(layout.createSequentialGroup()
                .addContainerGap()
                .add(JL_runName)
                .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED)
                .add(layout.createParallelGroup(org.jdesktop.layout.GroupLayout.TRAILING)
                    .add(JLabel4, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, 19, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)
                    .add(JTF_win, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, 19, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE))
                .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED)
                .add(layout.createParallelGroup(org.jdesktop.layout.GroupLayout.BASELINE)
                    .add(JLabel2, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, 19, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)
                    .add(JTF_cli, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, 19, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE))
                .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED)
                .add(layout.createParallelGroup(org.jdesktop.layout.GroupLayout.BASELINE)
                    .add(JLabel3, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, 19, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)
                    .add(JTF_weps, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, 19, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE))
                .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED)
                .add(JTF_status, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, 19, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)
                .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED)
                .add(JPB_weps, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, 25, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)
                .addPreferredGap(org.jdesktop.layout.LayoutStyle.UNRELATED)
                .add(jPanel1, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)
                .addContainerGap(org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
        );
    }// </editor-fold>//GEN-END:initComponents

    private void JBCan_ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_JBCan_ActionPerformed
        // Add your handling code here:
        JBCan_actionPerformed(evt);
    }//GEN-LAST:event_JBCan_ActionPerformed

    private void RunDialog_n_WindowClosing(java.awt.event.WindowEvent evt) {//GEN-FIRST:event_RunDialog_n_WindowClosing
        // Add your handling code here:
        this.dispose();
    }//GEN-LAST:event_RunDialog_n_WindowClosing
    
  /**
   * This method is used if this dialog is rum as an independent application. If executed,
   * makes the GUI visible.
   * @param evt The cancel button event is generated if the "Run dialog" is to be 
   * closed and the run itself "cancelled".
   */
    public void JBCan_actionPerformed(java.awt.event.ActionEvent evt) {
        
    }
    
  /**
   * This method is used if this dialog is rum as an independent application. If executed,
   * makes the GUI visible.
   * @param args These are the command line arguments passed to the main method.
   */
    public static void main(String args[]) {
        new RunDialog_n().setVisible(true);
    }
    
    /**
     * This method notifies when the window or frame is resized and the components 
     * need to be re-arranged so they are evenly spaced relative to each other.
     */
    public void addNotify() {
        super.addNotify();
    }    
    
    // Variables declaration - do not modify//GEN-BEGIN:variables
    public javax.swing.JButton JB_can;
    protected javax.swing.JLabel JL_runName;
    public javax.swing.JLabel JLabel2;
    public javax.swing.JLabel JLabel3;
    public javax.swing.JLabel JLabel4;
    public javax.swing.JProgressBar JPB_weps;
    public javax.swing.JTextField JTF_cli;
    public javax.swing.JTextField JTF_status;
    public javax.swing.JTextField JTF_weps;
    public javax.swing.JTextField JTF_win;
    private javax.swing.JPanel jPanel1;
    // End of variables declaration//GEN-END:variables
    
}
