/*
 * RunNameChooser_n.java
 *
 * Created on March 17, 2006, 1:15 PM
 */
package usda.weru.weps.gui;

import usda.weru.weps.SubmodelOutput;

/**
 * This class provides the gui components for the RunNameChooser dialog.
 * @author Joseph Levin
 */
public class RunNameChooser_n extends javax.swing.JPanel {

    private static final long serialVersionUID = 1L;

    /**
     * Creates new form RunNameChooser_n, the graphical class for RunNameChooser.
     */
    public RunNameChooser_n() {
        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() {

        jCheckBox8 = new javax.swing.JCheckBox();
        JTF_runname = new javax.swing.JTextField();
        JTF_runlocation = new javax.swing.JTextField();
        JB_browse = new javax.swing.JButton();
        JTF_runfile = new javax.swing.JTextField();
        JL_error = new javax.swing.JLabel();
        jLabel1 = new javax.swing.JLabel();
        jLabel2 = new javax.swing.JLabel();
        jLabel3 = new javax.swing.JLabel();
        JCB_batchMode = new javax.swing.JCheckBox();
        NrmvConfigurationPanel = new javax.swing.JPanel();
        JTF_hydrology = new javax.swing.JTextField();
        JTF_soil = new javax.swing.JTextField();
        JTF_management = new javax.swing.JTextField();
        JTF_crop = new javax.swing.JTextField();
        JTF_decomposition = new javax.swing.JTextField();
        JTF_erosion = new javax.swing.JTextField();
        jLabel4 = new javax.swing.JLabel();
        jLabel5 = new javax.swing.JLabel();
        jLabel6 = new javax.swing.JLabel();
        jLabel7 = new javax.swing.JLabel();
        jLabel8 = new javax.swing.JLabel();
        jLabel9 = new javax.swing.JLabel();
        jPanel1 = new javax.swing.JPanel();

        jCheckBox8.setText("jCheckBox8");

        JB_browse.setIcon(new javax.swing.ImageIcon(getClass().getResource("/usda/weru/resources/folder.gif"))); // NOI18N
        JB_browse.setToolTipText("Browse to run location.");
        JB_browse.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                JB_browseActionPerformed(evt);
            }
        });

        JTF_runfile.setEditable(false);

        JL_error.setFont(new java.awt.Font("Tahoma", 1, 12)); // NOI18N
        JL_error.setForeground(java.awt.Color.red);
        JL_error.setText(" ");

        jLabel1.setText("Run Name:");

        jLabel2.setText("Run Location:");

        jLabel3.setText("Run File:");

        JCB_batchMode.setText("Create Run Batch File");
        JCB_batchMode.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                JCB_batchModeActionPerformed(evt);
            }
        });

        JTF_hydrology.setText("0");
        JTF_hydrology.addMouseListener(new java.awt.event.MouseAdapter() {
            public void mouseClicked(java.awt.event.MouseEvent evt) {
                JTF_hydrologyMouseClicked(evt);
            }
        });
        JTF_hydrology.addFocusListener(new java.awt.event.FocusAdapter() {
            public void focusLost(java.awt.event.FocusEvent evt) {
                JTF_hydrologyFocusLost(evt);
            }
        });

        JTF_soil.setText("0");
        JTF_soil.addMouseListener(new java.awt.event.MouseAdapter() {
            public void mouseClicked(java.awt.event.MouseEvent evt) {
                JTF_soilMouseClicked(evt);
            }
        });
        JTF_soil.addFocusListener(new java.awt.event.FocusAdapter() {
            public void focusLost(java.awt.event.FocusEvent evt) {
                JTF_soilFocusLost(evt);
            }
        });

        JTF_management.setText("0");
        JTF_management.addMouseListener(new java.awt.event.MouseAdapter() {
            public void mouseClicked(java.awt.event.MouseEvent evt) {
                JTF_managementMouseClicked(evt);
            }
        });
        JTF_management.addFocusListener(new java.awt.event.FocusAdapter() {
            public void focusLost(java.awt.event.FocusEvent evt) {
                JTF_managementFocusLost(evt);
            }
        });

        JTF_crop.setText("0");
        JTF_crop.addMouseListener(new java.awt.event.MouseAdapter() {
            public void mouseClicked(java.awt.event.MouseEvent evt) {
                JTF_cropMouseClicked(evt);
            }
        });
        JTF_crop.addFocusListener(new java.awt.event.FocusAdapter() {
            public void focusLost(java.awt.event.FocusEvent evt) {
                JTF_cropFocusLost(evt);
            }
        });

        JTF_decomposition.setText("0");
        JTF_decomposition.addMouseListener(new java.awt.event.MouseAdapter() {
            public void mouseClicked(java.awt.event.MouseEvent evt) {
                JTF_decompositionMouseClicked(evt);
            }
        });
        JTF_decomposition.addFocusListener(new java.awt.event.FocusAdapter() {
            public void focusLost(java.awt.event.FocusEvent evt) {
                JTF_decompositionFocusLost(evt);
            }
        });

        JTF_erosion.setText("0");
        JTF_erosion.addMouseListener(new java.awt.event.MouseAdapter() {
            public void mouseClicked(java.awt.event.MouseEvent evt) {
                JTF_erosionMouseClicked(evt);
            }
        });
        JTF_erosion.addFocusListener(new java.awt.event.FocusAdapter() {
            public void focusLost(java.awt.event.FocusEvent evt) {
                JTF_erosionFocusLost(evt);
            }
        });

        jLabel4.setText("hydrology");

        jLabel5.setText("soil");

        jLabel6.setText("management");

        jLabel7.setText("crop");

        jLabel8.setText("decomposition");

        jLabel9.setText("erosion");

        javax.swing.GroupLayout NrmvConfigurationPanelLayout = new javax.swing.GroupLayout(NrmvConfigurationPanel);
        NrmvConfigurationPanel.setLayout(NrmvConfigurationPanelLayout);
        NrmvConfigurationPanelLayout.setHorizontalGroup(
            NrmvConfigurationPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(NrmvConfigurationPanelLayout.createSequentialGroup()
                .addContainerGap(70, Short.MAX_VALUE)
                .addGroup(NrmvConfigurationPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addComponent(jLabel4)
                    .addComponent(jLabel5)
                    .addComponent(jLabel6)
                    .addComponent(jLabel7)
                    .addComponent(jLabel8)
                    .addComponent(jLabel9))
                .addGap(25, 25, 25)
                .addGroup(NrmvConfigurationPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING, false)
                    .addComponent(JTF_soil, javax.swing.GroupLayout.Alignment.LEADING)
                    .addComponent(JTF_management, javax.swing.GroupLayout.Alignment.LEADING)
                    .addComponent(JTF_crop, javax.swing.GroupLayout.Alignment.LEADING)
                    .addComponent(JTF_decomposition, javax.swing.GroupLayout.Alignment.LEADING)
                    .addComponent(JTF_erosion, javax.swing.GroupLayout.Alignment.LEADING)
                    .addComponent(JTF_hydrology, javax.swing.GroupLayout.PREFERRED_SIZE, 25, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addGap(98, 98, 98))
        );
        NrmvConfigurationPanelLayout.setVerticalGroup(
            NrmvConfigurationPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(NrmvConfigurationPanelLayout.createSequentialGroup()
                .addGroup(NrmvConfigurationPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(JTF_hydrology, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(jLabel4))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addGroup(NrmvConfigurationPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(JTF_soil, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(jLabel5))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addGroup(NrmvConfigurationPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(JTF_management, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(jLabel6))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addGroup(NrmvConfigurationPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(JTF_crop, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(jLabel7))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addGroup(NrmvConfigurationPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(JTF_decomposition, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(jLabel8))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addGroup(NrmvConfigurationPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(JTF_erosion, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(jLabel9))
                .addGap(0, 11, Short.MAX_VALUE))
        );

        javax.swing.GroupLayout jPanel1Layout = new javax.swing.GroupLayout(jPanel1);
        jPanel1.setLayout(jPanel1Layout);
        jPanel1Layout.setHorizontalGroup(
            jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGap(0, 217, Short.MAX_VALUE)
        );
        jPanel1Layout.setVerticalGroup(
            jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGap(0, 161, Short.MAX_VALUE)
        );

        javax.swing.GroupLayout layout = new javax.swing.GroupLayout(this);
        this.setLayout(layout);
        layout.setHorizontalGroup(
            layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(layout.createSequentialGroup()
                .addContainerGap()
                .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addGroup(layout.createSequentialGroup()
                        .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                            .addComponent(jLabel1)
                            .addComponent(jLabel2)
                            .addComponent(jLabel3))
                        .addGap(28, 28, 28)
                        .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                            .addComponent(JL_error, javax.swing.GroupLayout.DEFAULT_SIZE, 443, Short.MAX_VALUE)
                            .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, layout.createSequentialGroup()
                                .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)
                                    .addComponent(JCB_batchMode, javax.swing.GroupLayout.Alignment.LEADING, javax.swing.GroupLayout.DEFAULT_SIZE, 402, Short.MAX_VALUE)
                                    .addComponent(JTF_runfile, javax.swing.GroupLayout.Alignment.LEADING, javax.swing.GroupLayout.DEFAULT_SIZE, 402, Short.MAX_VALUE)
                                    .addComponent(JTF_runlocation, javax.swing.GroupLayout.DEFAULT_SIZE, 402, Short.MAX_VALUE)
                                    .addComponent(JTF_runname, javax.swing.GroupLayout.DEFAULT_SIZE, 402, Short.MAX_VALUE))
                                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                                .addComponent(JB_browse, javax.swing.GroupLayout.PREFERRED_SIZE, 27, javax.swing.GroupLayout.PREFERRED_SIZE)
                                .addGap(8, 8, 8))))
                    .addGroup(layout.createSequentialGroup()
                        .addGap(0, 0, Short.MAX_VALUE)
                        .addComponent(jPanel1, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                        .addGap(18, 18, 18)
                        .addComponent(NrmvConfigurationPanel, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)))
                .addContainerGap())
        );
        layout.setVerticalGroup(
            layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(layout.createSequentialGroup()
                .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addGroup(layout.createSequentialGroup()
                        .addContainerGap()
                        .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                            .addComponent(jLabel1)
                            .addComponent(JTF_runname, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                        .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                            .addComponent(jLabel2)
                            .addComponent(JTF_runlocation, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                        .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                            .addComponent(jLabel3)
                            .addComponent(JTF_runfile, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                        .addComponent(JCB_batchMode))
                    .addGroup(layout.createSequentialGroup()
                        .addGap(35, 35, 35)
                        .addComponent(JB_browse)))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addComponent(NrmvConfigurationPanel, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(jPanel1, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                .addComponent(JL_error, javax.swing.GroupLayout.PREFERRED_SIZE, 28, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addContainerGap())
        );
    }// </editor-fold>//GEN-END:initComponents

    /**
     * Event handler for the browse button.
     * @param evt ActionEvent from the browse button.
     */
    private void JB_browseActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_JB_browseActionPerformed
        JB_browse_actionPerformed(evt);
    }//GEN-LAST:event_JB_browseActionPerformed

private void JCB_batchModeActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_JCB_batchModeActionPerformed
}//GEN-LAST:event_JCB_batchModeActionPerformed

    private void JTF_hydrologyFocusLost(java.awt.event.FocusEvent evt) {//GEN-FIRST:event_JTF_hydrologyFocusLost
        setOutput(SubmodelOutput.submodel.Hydrology);
    }//GEN-LAST:event_JTF_hydrologyFocusLost

    private void JTF_hydrologyMouseClicked(java.awt.event.MouseEvent evt) {//GEN-FIRST:event_JTF_hydrologyMouseClicked
        JTF_hydrology.selectAll();
    }//GEN-LAST:event_JTF_hydrologyMouseClicked

    private void JTF_soilMouseClicked(java.awt.event.MouseEvent evt) {//GEN-FIRST:event_JTF_soilMouseClicked
        JTF_soil.selectAll();
    }//GEN-LAST:event_JTF_soilMouseClicked

    private void JTF_managementMouseClicked(java.awt.event.MouseEvent evt) {//GEN-FIRST:event_JTF_managementMouseClicked
        JTF_management.selectAll();
    }//GEN-LAST:event_JTF_managementMouseClicked

    private void JTF_cropMouseClicked(java.awt.event.MouseEvent evt) {//GEN-FIRST:event_JTF_cropMouseClicked
        JTF_crop.selectAll();
    }//GEN-LAST:event_JTF_cropMouseClicked

    private void JTF_decompositionMouseClicked(java.awt.event.MouseEvent evt) {//GEN-FIRST:event_JTF_decompositionMouseClicked
        JTF_decomposition.selectAll();
    }//GEN-LAST:event_JTF_decompositionMouseClicked

    private void JTF_erosionMouseClicked(java.awt.event.MouseEvent evt) {//GEN-FIRST:event_JTF_erosionMouseClicked
        JTF_erosion.selectAll();
    }//GEN-LAST:event_JTF_erosionMouseClicked

    private void JTF_soilFocusLost(java.awt.event.FocusEvent evt) {//GEN-FIRST:event_JTF_soilFocusLost
        setOutput(SubmodelOutput.submodel.Soil);
    }//GEN-LAST:event_JTF_soilFocusLost

    private void JTF_managementFocusLost(java.awt.event.FocusEvent evt) {//GEN-FIRST:event_JTF_managementFocusLost
        setOutput(SubmodelOutput.submodel.Management);
    }//GEN-LAST:event_JTF_managementFocusLost

    private void JTF_cropFocusLost(java.awt.event.FocusEvent evt) {//GEN-FIRST:event_JTF_cropFocusLost
        setOutput(SubmodelOutput.submodel.Crop);
    }//GEN-LAST:event_JTF_cropFocusLost

    private void JTF_decompositionFocusLost(java.awt.event.FocusEvent evt) {//GEN-FIRST:event_JTF_decompositionFocusLost
        setOutput(SubmodelOutput.submodel.Decomposition);
    }//GEN-LAST:event_JTF_decompositionFocusLost

    private void JTF_erosionFocusLost(java.awt.event.FocusEvent evt) {//GEN-FIRST:event_JTF_erosionFocusLost
        setOutput(SubmodelOutput.submodel.Erosion);
    }//GEN-LAST:event_JTF_erosionFocusLost

    protected void setOutput(SubmodelOutput.submodel s) {
        
    }
    
    protected void checkboxEvent(SubmodelOutput.outFile f, boolean value) {
        
    }

    /**
     * Event handler for the browse button.  This method is protected so it may be
     * overridden by extending classes.
     * @param evt ActionEvent from the browse button.
     */
    protected void JB_browse_actionPerformed(java.awt.event.ActionEvent evt) {

    }

    // Variables declaration - do not modify//GEN-BEGIN:variables
    protected javax.swing.JButton JB_browse;
    protected javax.swing.JCheckBox JCB_batchMode;
    protected javax.swing.JLabel JL_error;
    protected javax.swing.JTextField JTF_crop;
    protected javax.swing.JTextField JTF_decomposition;
    protected javax.swing.JTextField JTF_erosion;
    protected javax.swing.JTextField JTF_hydrology;
    protected javax.swing.JTextField JTF_management;
    protected javax.swing.JTextField JTF_runfile;
    protected javax.swing.JTextField JTF_runlocation;
    protected javax.swing.JTextField JTF_runname;
    protected javax.swing.JTextField JTF_soil;
    protected javax.swing.JPanel NrmvConfigurationPanel;
    protected javax.swing.JCheckBox jCheckBox8;
    protected javax.swing.JLabel jLabel1;
    protected javax.swing.JLabel jLabel2;
    protected javax.swing.JLabel jLabel3;
    protected javax.swing.JLabel jLabel4;
    protected javax.swing.JLabel jLabel5;
    protected javax.swing.JLabel jLabel6;
    protected javax.swing.JLabel jLabel7;
    protected javax.swing.JLabel jLabel8;
    protected javax.swing.JLabel jLabel9;
    protected javax.swing.JPanel jPanel1;
    // End of variables declaration//GEN-END:variables

}
