/*
 * AirDensityEstimateDialog_n.java
 *
 * Created on February 9, 2007, 12:18 PM
 */

package usda.weru.erosion.gui;

/**
 *
 * @author  Joseph Levin
 */
public class AirDensityEstimateDialog_n extends javax.swing.JDialog {
    private static final long serialVersionUID = 1L;
    
    /**
     * Creates new form AirDensityEstimateDialog_n
	 * @param parent
	 * @param modal
     */
    public AirDensityEstimateDialog_n(java.awt.Frame parent, boolean modal) {
        super(parent, modal);
        initComponents();
    }
    
    /** 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() {
        g_elevationField = new javax.swing.JTextField();
        g_temperatureField = new javax.swing.JTextField();
        jLabel1 = new javax.swing.JLabel();
        jLabel2 = new javax.swing.JLabel();
        jLabel3 = new javax.swing.JLabel();
        jLabel4 = new javax.swing.JLabel();
        jPanel1 = new javax.swing.JPanel();
        g_okayButton = new javax.swing.JButton();
        g_cancelButton = new javax.swing.JButton();

        setDefaultCloseOperation(javax.swing.WindowConstants.DISPOSE_ON_CLOSE);
        setTitle("EstimateAir Density (kg/m^3) ");
        setModal(true);
        setResizable(false);
        g_elevationField.setHorizontalAlignment(javax.swing.JTextField.RIGHT);
        g_elevationField.setText("0.0");
        g_elevationField.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                g_elevationFieldActionPerformed(evt);
            }
        });
        g_elevationField.addFocusListener(new java.awt.event.FocusAdapter() {
            public void focusLost(java.awt.event.FocusEvent evt) {
                g_elevationFieldFocusLost(evt);
            }
        });

        g_temperatureField.setHorizontalAlignment(javax.swing.JTextField.RIGHT);
        g_temperatureField.setText("0");
        g_temperatureField.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                g_temperatureFieldActionPerformed(evt);
            }
        });
        g_temperatureField.addFocusListener(new java.awt.event.FocusAdapter() {
            public void focusLost(java.awt.event.FocusEvent evt) {
                g_temperatureFieldFocusLost(evt);
            }
        });

        jLabel1.setText("(m)");

        jLabel2.setText("(deg C)");

        jLabel3.setText("Elevation");

        jLabel4.setText("Daily avg temperature");

        jPanel1.setMinimumSize(new java.awt.Dimension(50, 33));
        g_okayButton.setText("Ok");
        g_okayButton.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                g_okayButtonActionPerformed(evt);
            }
        });

        jPanel1.add(g_okayButton);

        g_cancelButton.setText("Cancel");
        g_cancelButton.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                g_cancelButtonActionPerformed(evt);
            }
        });

        jPanel1.add(g_cancelButton);

        javax.swing.GroupLayout layout = new javax.swing.GroupLayout(getContentPane());
        getContentPane().setLayout(layout);
        layout.setHorizontalGroup(
            layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, layout.createSequentialGroup()
                .addContainerGap()
                .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addGroup(layout.createSequentialGroup()
                        .addComponent(jPanel1, javax.swing.GroupLayout.DEFAULT_SIZE, 257, Short.MAX_VALUE)
                        .addContainerGap())
                    .addGroup(layout.createSequentialGroup()
                        .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                            .addComponent(jLabel4)
                            .addComponent(jLabel3))
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                        .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING, false)
                            .addComponent(g_elevationField)
                            .addComponent(g_temperatureField, javax.swing.GroupLayout.DEFAULT_SIZE, 58, Short.MAX_VALUE))
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                        .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                            .addComponent(jLabel1)
                            .addComponent(jLabel2))
                        .addGap(17, 17, 17))))
        );
        layout.setVerticalGroup(
            layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(layout.createSequentialGroup()
                .addContainerGap()
                .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(jLabel1)
                    .addComponent(g_elevationField, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(jLabel3))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(g_temperatureField, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(jLabel2)
                    .addComponent(jLabel4))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                .addComponent(jPanel1, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addContainerGap())
        );
        java.awt.Dimension screenSize = java.awt.Toolkit.getDefaultToolkit().getScreenSize();
        setBounds((screenSize.width-285)/2, (screenSize.height-134)/2, 285, 134);
    }// </editor-fold>//GEN-END:initComponents

    private void g_temperatureFieldFocusLost(java.awt.event.FocusEvent evt) {//GEN-FIRST:event_g_temperatureFieldFocusLost
        temperatureFieldFocusLost(evt);
    }//GEN-LAST:event_g_temperatureFieldFocusLost

    private void g_temperatureFieldActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_g_temperatureFieldActionPerformed
        temperatureFieldActionPerformed(evt);
    }//GEN-LAST:event_g_temperatureFieldActionPerformed

    private void g_elevationFieldFocusLost(java.awt.event.FocusEvent evt) {//GEN-FIRST:event_g_elevationFieldFocusLost
        elevationFieldFocusLost(evt);
    }//GEN-LAST:event_g_elevationFieldFocusLost

    private void g_elevationFieldActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_g_elevationFieldActionPerformed
        elevationFieldActionPerformed(evt);
    }//GEN-LAST:event_g_elevationFieldActionPerformed

    protected void temperatureFieldFocusLost(java.awt.event.FocusEvent evt) {

    }

    protected void temperatureFieldActionPerformed(java.awt.event.ActionEvent evt) {

    }

    protected void elevationFieldFocusLost(java.awt.event.FocusEvent evt) {

    }

    protected void elevationFieldActionPerformed(java.awt.event.ActionEvent evt) {

    }

    
    private void g_cancelButtonActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_g_cancelButtonActionPerformed
        cancelButtonActionPerformed(evt);
    }//GEN-LAST:event_g_cancelButtonActionPerformed

    private void g_okayButtonActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_g_okayButtonActionPerformed
        okayButtonActionPerformed(evt);
    }//GEN-LAST:event_g_okayButtonActionPerformed
    
    protected void cancelButtonActionPerformed(java.awt.event.ActionEvent evt) {

    }

    protected void okayButtonActionPerformed(java.awt.event.ActionEvent evt) {

    }
    /**
     * @param args the command line arguments
     */
    public static void main(String args[]) {
        java.awt.EventQueue.invokeLater(new Runnable() {
            @Override
            public void run() {
                new AirDensityEstimateDialog_n(new javax.swing.JFrame(), true).setVisible(true);
            }
        });
    }
    
    // Variables declaration - do not modify//GEN-BEGIN:variables
    protected javax.swing.JButton g_cancelButton;
    protected javax.swing.JTextField g_elevationField;
    protected javax.swing.JButton g_okayButton;
    protected javax.swing.JTextField g_temperatureField;
    protected javax.swing.JLabel jLabel1;
    protected javax.swing.JLabel jLabel2;
    protected javax.swing.JLabel jLabel3;
    protected javax.swing.JLabel jLabel4;
    protected javax.swing.JPanel jPanel1;
    // End of variables declaration//GEN-END:variables
    
}
