/*
 * AuxPanel_n.java
 *
 * Created on November 12, 2003, 3:48 PM
 */
package usda.weru.weps.gui;

/**
 * This GUI class allows a user to select the management files and Soil files
 * from the project or template directories and then launch the respective applications
 * based on the button click events i:e either MCREW or SOIL viewer application.
 * @author  manmohan
 */
public class AuxPanel_n extends javax.swing.JFrame {

    private static final long serialVersionUID = 1L;

    /** 
     * Default constructor that initialises the components that go in the GUI container
     */
    public AuxPanel_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() {

        JP_main = new javax.swing.JPanel();
        JB_projMan = new javax.swing.JButton();
        JB_tempMan = new javax.swing.JButton();
        JB_projSoil = new javax.swing.JButton();
        JB_tempSoil = new javax.swing.JButton();
        JL_mcrew = new javax.swing.JButton();
        JL_soil = new javax.swing.JButton();
        g_manTreeCombo = new usda.weru.util.WepsTreeComboBox();
        g_soilTreeCombo = new usda.weru.util.WepsTreeComboBox();

        setDefaultCloseOperation(javax.swing.WindowConstants.DO_NOTHING_ON_CLOSE);
        setTitle("AuxPanel");
        addWindowListener(new java.awt.event.WindowAdapter() {
            public void windowClosing(java.awt.event.WindowEvent evt) {
                exitForm(evt);
            }
        });

        JP_main.setToolTipText("AuxPanel:main");

        JB_projMan.setIcon(new javax.swing.ImageIcon(getClass().getResource("/usda/weru/resources/folderp.gif"))); // NOI18N
        JB_projMan.setToolTipText("AuxPanel:projMan");
        JB_projMan.setMaximumSize(new java.awt.Dimension(12, 12));
        JB_projMan.setMinimumSize(new java.awt.Dimension(12, 12));
        JB_projMan.setPreferredSize(new java.awt.Dimension(12, 12));
        JB_projMan.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                JBProjMan_ActionPerformed(evt);
            }
        });

        JB_tempMan.setIcon(new javax.swing.ImageIcon(getClass().getResource("/usda/weru/resources/foldert.gif"))); // NOI18N
        JB_tempMan.setToolTipText("AuxPanel:tempMan");
        JB_tempMan.setPreferredSize(new java.awt.Dimension(12, 12));
        JB_tempMan.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                JBTempMan_ActionPerformed(evt);
            }
        });

        JB_projSoil.setIcon(new javax.swing.ImageIcon(getClass().getResource("/usda/weru/resources/folderp.gif"))); // NOI18N
        JB_projSoil.setToolTipText("AuxPanel:projSoil");
        JB_projSoil.setMaximumSize(new java.awt.Dimension(12, 12));
        JB_projSoil.setMinimumSize(new java.awt.Dimension(12, 12));
        JB_projSoil.setPreferredSize(new java.awt.Dimension(12, 12));
        JB_projSoil.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                JBProjSoil_ActionPerformed(evt);
            }
        });

        JB_tempSoil.setIcon(new javax.swing.ImageIcon(getClass().getResource("/usda/weru/resources/foldert.gif"))); // NOI18N
        JB_tempSoil.setToolTipText("AuxPanel:tempSoil");
        JB_tempSoil.setMaximumSize(new java.awt.Dimension(12, 12));
        JB_tempSoil.setMinimumSize(new java.awt.Dimension(12, 12));
        JB_tempSoil.setPreferredSize(new java.awt.Dimension(12, 12));
        JB_tempSoil.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                JBTempSoil_ActionPerformed(evt);
            }
        });

        JL_mcrew.setText("Man");
        JL_mcrew.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                JL_mcrewActionPerformed(evt);
            }
        });

        JL_soil.setText("Soil");
        JL_soil.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                JL_soilActionPerformed(evt);
            }
        });

        g_manTreeCombo.setRootVisible(false);

        g_soilTreeCombo.setRootVisible(false);

        javax.swing.GroupLayout JP_mainLayout = new javax.swing.GroupLayout(JP_main);
        JP_main.setLayout(JP_mainLayout);
        JP_mainLayout.setHorizontalGroup(
            JP_mainLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(JP_mainLayout.createSequentialGroup()
                .addContainerGap()
                .addGroup(JP_mainLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addComponent(JL_soil)
                    .addComponent(JL_mcrew))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addGroup(JP_mainLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addComponent(JB_projSoil, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(JB_projMan, javax.swing.GroupLayout.PREFERRED_SIZE, 24, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addGroup(JP_mainLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addGroup(JP_mainLayout.createSequentialGroup()
                        .addComponent(JB_tempMan, javax.swing.GroupLayout.PREFERRED_SIZE, 24, javax.swing.GroupLayout.PREFERRED_SIZE)
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                        .addComponent(g_manTreeCombo, javax.swing.GroupLayout.DEFAULT_SIZE, 674, Short.MAX_VALUE))
                    .addGroup(JP_mainLayout.createSequentialGroup()
                        .addComponent(JB_tempSoil, javax.swing.GroupLayout.PREFERRED_SIZE, 24, javax.swing.GroupLayout.PREFERRED_SIZE)
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                        .addComponent(g_soilTreeCombo, javax.swing.GroupLayout.DEFAULT_SIZE, 674, Short.MAX_VALUE)))
                .addContainerGap(5,5))
        );

        JP_mainLayout.linkSize(javax.swing.SwingConstants.HORIZONTAL, new java.awt.Component[] {JB_projMan, JB_projSoil, JB_tempMan, JB_tempSoil});

        JP_mainLayout.linkSize(javax.swing.SwingConstants.HORIZONTAL, new java.awt.Component[] {JL_mcrew, JL_soil});

        JP_mainLayout.setVerticalGroup(
            JP_mainLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(JP_mainLayout.createSequentialGroup()
                .addContainerGap()
                .addGroup(JP_mainLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)
                    .addComponent(g_manTreeCombo, javax.swing.GroupLayout.Alignment.LEADING, javax.swing.GroupLayout.DEFAULT_SIZE, 25, Short.MAX_VALUE)
                    .addComponent(JB_tempMan, javax.swing.GroupLayout.Alignment.LEADING, javax.swing.GroupLayout.PREFERRED_SIZE, 24, Short.MAX_VALUE)
                    .addComponent(JB_projMan, javax.swing.GroupLayout.Alignment.LEADING, javax.swing.GroupLayout.DEFAULT_SIZE, 24, Short.MAX_VALUE)
                    .addComponent(JL_mcrew, javax.swing.GroupLayout.Alignment.LEADING))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addGroup(JP_mainLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addComponent(JL_soil)
                    .addComponent(JB_projSoil, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(JB_tempSoil, javax.swing.GroupLayout.PREFERRED_SIZE, 24, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(g_soilTreeCombo, javax.swing.GroupLayout.DEFAULT_SIZE, 25, Short.MAX_VALUE))
                .addContainerGap())
        );

        JP_mainLayout.linkSize(javax.swing.SwingConstants.VERTICAL, new java.awt.Component[] {JB_projMan, JB_projSoil, JB_tempMan, JB_tempSoil, JL_mcrew, JL_soil, g_manTreeCombo, g_soilTreeCombo});

        getContentPane().add(JP_main, java.awt.BorderLayout.CENTER);

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

    private void JBProjMan_ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_JBProjMan_ActionPerformed
        JBProjMan_actionPerformed(evt);
    }//GEN-LAST:event_JBProjMan_ActionPerformed

    private void JBTempMan_ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_JBTempMan_ActionPerformed
        JBTempMan_actionPerformed(evt);
    }//GEN-LAST:event_JBTempMan_ActionPerformed

    private void JBProjSoil_ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_JBProjSoil_ActionPerformed
        JBProjSoil_actionPerformed(evt);
    }//GEN-LAST:event_JBProjSoil_ActionPerformed

    private void JBTempSoil_ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_JBTempSoil_ActionPerformed
        JBTempSoil_actionPerformed(evt);
    }//GEN-LAST:event_JBTempSoil_ActionPerformed

    /** 
     * This method allows the user to select management files from project directory. 
     * @param event 
     */
    public void JBProjMan_actionPerformed(java.awt.event.ActionEvent event) {

    }

    /** 
     * This method allows the user to select management files from MCREW template directory. 
     * @param event
     */
    public void JBTempMan_actionPerformed(java.awt.event.ActionEvent event) {

    }

    /** 
     * This method allows the user to select Soil files from soil project directory. 
     * @param event
     */
    public void JBProjSoil_actionPerformed(java.awt.event.ActionEvent event) {

    }

    /** 
     * This method allows the user to select Soil files from soil template directory. 
     * @param event
     */
    public void JBTempSoil_actionPerformed(java.awt.event.ActionEvent event) {

    }

    /** 
     * This method allows the user to start the MCREW application from the Auxillary panel
     * of the WEPS GUI.
     * @param event
     */
    public void JLSoil_mouseClicked(java.awt.event.MouseEvent event) {

    }

    /** 
     * This method allows the user to start the SOIL UI application from the Auxillary 
     * panel of the WEPS GUI.
     * @param event
     */
    public void JLMcrew_mouseClicked(java.awt.event.MouseEvent event) {

    }

    /** 
     * This method is called when the about dialog is to be closed by hitting the 
     * "Red X" button of the window.
     * @param evt The window event generated when the " Red X " button on the window is hit. 
     */
    private void exitForm(java.awt.event.WindowEvent evt) {//GEN-FIRST:event_exitForm
        System.exit(0);
    }//GEN-LAST:event_exitForm

private void JL_mcrewActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_JL_mcrewActionPerformed
    mcrewActionPerformed(evt);
}//GEN-LAST:event_JL_mcrewActionPerformed

private void JL_soilActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_JL_soilActionPerformed
    soilActionPerformed(evt);
}//GEN-LAST:event_JL_soilActionPerformed

    /**
     *
     * @param evt
     */
    public void mcrewActionPerformed(java.awt.event.ActionEvent evt) {
    }

    /**
     *
     * @param evt
     */
    public void soilActionPerformed(java.awt.event.ActionEvent evt) {

    }

    /**
     * This method is used if this dialog is rum as an independent application.
     * @param args These are the command line arguments passed to the main method.
     */
    public static void main(String args[]) {
        new AuxPanel_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.
     */
    @Override
    public void addNotify() {
    }

    // Variables declaration - do not modify//GEN-BEGIN:variables
    public javax.swing.JButton JB_projMan;
    public javax.swing.JButton JB_projSoil;
    public javax.swing.JButton JB_tempMan;
    public javax.swing.JButton JB_tempSoil;
    protected javax.swing.JButton JL_mcrew;
    protected javax.swing.JButton JL_soil;
    public javax.swing.JPanel JP_main;
    protected usda.weru.util.WepsTreeComboBox g_manTreeCombo;
    protected usda.weru.util.WepsTreeComboBox g_soilTreeCombo;
    // End of variables declaration//GEN-END:variables

}
