/*
 * BarPanel_n.java
 *
 * Created on November 12, 2003, 5:45 PM
 */

package usda.weru.weps.gui;

/**
 * This GUI allows the user to select the different types of barries that could be
 * put along the different directions like north, east, etc.
 * @author  manmohan
 */
public class BarPanel_n extends javax.swing.JFrame {
    
    /** 
     * Default constructor that creates the new form BarPanel_n 
     */
    public BarPanel_n() {
        initComponents();
    }
    
   /**
    * Single argument constructor for the barrier panel
    * @param title This is the title string of the GUI frame.
    */
    public BarPanel_n(java.lang.String title) {
        this();
        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() {

        RBG_BarPanel = new javax.swing.ButtonGroup();
        JP_main = new javax.swing.JPanel();
        JRB_N = new javax.swing.JRadioButton();
        JCB_N = new javax.swing.JComboBox();
        JCB_S = new javax.swing.JComboBox();
        JRB_S = new javax.swing.JRadioButton();
        JRB_E = new javax.swing.JRadioButton();
        JRB_W = new javax.swing.JRadioButton();
        JRB_None = new javax.swing.JRadioButton();
        JCB_E = new javax.swing.JComboBox();
        JCB_W = new javax.swing.JComboBox();
        JB_detail = new javax.swing.JButton();

        addWindowListener(new java.awt.event.WindowAdapter() {
            public void windowClosing(java.awt.event.WindowEvent evt) {
                exitForm(evt);
            }
        });

        JP_main.setToolTipText("BarPanel:main");

        RBG_BarPanel.add(JRB_N);
        JRB_N.setText("N");
        JRB_N.setToolTipText("BarPanel:nButton");
        JRB_N.addMouseListener(new java.awt.event.MouseAdapter() {
            public void mouseClicked(java.awt.event.MouseEvent evt) {
                JRBN_MouseClicked(evt);
            }
        });

        JCB_N.setToolTipText("BarPanel:nBox");
        JCB_N.addItemListener(new java.awt.event.ItemListener() {
            public void itemStateChanged(java.awt.event.ItemEvent evt) {
                JCBN_ItemStateChanged(evt);
            }
        });

        JCB_S.setToolTipText("BarPanel:sBox");
        JCB_S.addItemListener(new java.awt.event.ItemListener() {
            public void itemStateChanged(java.awt.event.ItemEvent evt) {
                JCBS_ItemStateChanged(evt);
            }
        });

        RBG_BarPanel.add(JRB_S);
        JRB_S.setText("S");
        JRB_S.setToolTipText("BarPanel:sButton");
        JRB_S.addMouseListener(new java.awt.event.MouseAdapter() {
            public void mouseClicked(java.awt.event.MouseEvent evt) {
                JRBS_MouseClicked(evt);
            }
        });

        RBG_BarPanel.add(JRB_E);
        JRB_E.setText("E");
        JRB_E.setToolTipText("BarPanel:eButton");
        JRB_E.addMouseListener(new java.awt.event.MouseAdapter() {
            public void mouseClicked(java.awt.event.MouseEvent evt) {
                JRBE_MouseClicked(evt);
            }
        });

        RBG_BarPanel.add(JRB_W);
        JRB_W.setText("W");
        JRB_W.setToolTipText("BarPanel:wButton");
        JRB_W.addMouseListener(new java.awt.event.MouseAdapter() {
            public void mouseClicked(java.awt.event.MouseEvent evt) {
                JRBW_MouseClicked(evt);
            }
        });

        RBG_BarPanel.add(JRB_None);
        JRB_None.setText("None");
        JRB_None.addMouseListener(new java.awt.event.MouseAdapter() {
            public void mouseClicked(java.awt.event.MouseEvent evt) {
                JRBNone_MouseClicked(evt);
            }
        });

        JCB_E.setToolTipText("BarPanel:eBox");
        JCB_E.addItemListener(new java.awt.event.ItemListener() {
            public void itemStateChanged(java.awt.event.ItemEvent evt) {
                JCBE_ItemStateChanged(evt);
            }
        });

        JCB_W.setToolTipText("BarPanel:wBox");
        JCB_W.addItemListener(new java.awt.event.ItemListener() {
            public void itemStateChanged(java.awt.event.ItemEvent evt) {
                JCBW_ItemStateChanged(evt);
            }
        });

        JB_detail.setText("Edit Selected Barrier");
        JB_detail.setToolTipText("BarPanel:detail");
        JB_detail.setEnabled(false);
        JB_detail.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                JB_detail_ActionPerformed(evt);
            }
        });

        org.jdesktop.layout.GroupLayout JP_mainLayout = new org.jdesktop.layout.GroupLayout(JP_main);
        JP_main.setLayout(JP_mainLayout);
        JP_mainLayout.setHorizontalGroup(
            JP_mainLayout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)
            .add(JP_mainLayout.createSequentialGroup()
                .addContainerGap()
                .add(JP_mainLayout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)
                    .add(JB_detail, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, 184, Short.MAX_VALUE)
                    .add(org.jdesktop.layout.GroupLayout.TRAILING, JP_mainLayout.createSequentialGroup()
                        .add(JP_mainLayout.createParallelGroup(org.jdesktop.layout.GroupLayout.TRAILING)
                            .add(JRB_S, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, 40, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)
                            .add(JRB_N, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, 40, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE))
                        .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED)
                        .add(JP_mainLayout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)
                            .add(JCB_S, 0, 142, Short.MAX_VALUE)
                            .add(JCB_N, 0, 142, Short.MAX_VALUE)))
                    .add(JP_mainLayout.createSequentialGroup()
                        .add(JRB_E, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, 40, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)
                        .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED)
                        .add(JCB_E, 0, 142, Short.MAX_VALUE))
                    .add(JP_mainLayout.createSequentialGroup()
                        .add(JRB_W, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, 40, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)
                        .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED)
                        .add(JCB_W, 0, 142, Short.MAX_VALUE))
                    .add(JRB_None, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, 50, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE))
                .addContainerGap())
        );
        JP_mainLayout.setVerticalGroup(
            JP_mainLayout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)
            .add(JP_mainLayout.createSequentialGroup()
                .add(JP_mainLayout.createParallelGroup(org.jdesktop.layout.GroupLayout.BASELINE)
                    .add(JRB_N, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, 20, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)
                    .add(JCB_N, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, 20, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE))
                .add(0, 0, 0)
                .add(JP_mainLayout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)
                    .add(JCB_S, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, 20, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)
                    .add(JRB_S, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, 20, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE))
                .add(0, 0, 0)
                .add(JP_mainLayout.createParallelGroup(org.jdesktop.layout.GroupLayout.BASELINE)
                    .add(JRB_E, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, 20, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)
                    .add(JCB_E, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, 20, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE))
                .add(0, 0, 0)
                .add(JP_mainLayout.createParallelGroup(org.jdesktop.layout.GroupLayout.TRAILING)
                    .add(JRB_W, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, 20, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)
                    .add(JCB_W, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, 20, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE))
                .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED)
                .add(JRB_None, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, 20, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)
                .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED)
                .add(JB_detail, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, 20, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)
                .addContainerGap(org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
        );

        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()
                .add(JP_main, 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))
        );
        layout.setVerticalGroup(
            layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)
            .add(JP_main, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)
        );

        java.awt.Dimension screenSize = java.awt.Toolkit.getDefaultToolkit().getScreenSize();
        setBounds((screenSize.width-212)/2, (screenSize.height-162)/2, 212, 162);
    }// </editor-fold>//GEN-END:initComponents

    private void JRBNone_MouseClicked(java.awt.event.MouseEvent evt) {//GEN-FIRST:event_JRBNone_MouseClicked
        JRBNone_mouseClicked(evt);
    }//GEN-LAST:event_JRBNone_MouseClicked

    private void JRBN_MouseClicked(java.awt.event.MouseEvent evt) {//GEN-FIRST:event_JRBN_MouseClicked
        JRBN_mouseClicked(evt);
    }//GEN-LAST:event_JRBN_MouseClicked

    private void JRBW_MouseClicked(java.awt.event.MouseEvent evt) {//GEN-FIRST:event_JRBW_MouseClicked
        JRBW_mouseClicked(evt);
    }//GEN-LAST:event_JRBW_MouseClicked

    private void JRBE_MouseClicked(java.awt.event.MouseEvent evt) {//GEN-FIRST:event_JRBE_MouseClicked
        JRBE_mouseClicked(evt);
    }//GEN-LAST:event_JRBE_MouseClicked

    private void JRBS_MouseClicked(java.awt.event.MouseEvent evt) {//GEN-FIRST:event_JRBS_MouseClicked
        JRBS_mouseClicked(evt);
    }//GEN-LAST:event_JRBS_MouseClicked

    private void JB_detail_ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_JB_detail_ActionPerformed
        JB_detail_actionPerformed(evt);
    }//GEN-LAST:event_JB_detail_ActionPerformed

    private void JCBN_ItemStateChanged(java.awt.event.ItemEvent evt) {//GEN-FIRST:event_JCBN_ItemStateChanged
        JCBN_itemStateChanged(evt);
    }//GEN-LAST:event_JCBN_ItemStateChanged

    private void JCBS_ItemStateChanged(java.awt.event.ItemEvent evt) {//GEN-FIRST:event_JCBS_ItemStateChanged
        JCBS_itemStateChanged(evt);
    }//GEN-LAST:event_JCBS_ItemStateChanged

    private void JCBE_ItemStateChanged(java.awt.event.ItemEvent evt) {//GEN-FIRST:event_JCBE_ItemStateChanged
        JCBE_itemStateChanged(evt);
    }//GEN-LAST:event_JCBE_ItemStateChanged

    private void JCBW_ItemStateChanged(java.awt.event.ItemEvent evt) {//GEN-FIRST:event_JCBW_ItemStateChanged
        JCBW_itemStateChanged(evt);
    }//GEN-LAST:event_JCBW_ItemStateChanged
  
   /** 
    * This method is called when the "NORTH radio button" gets clicked for selecting
    * or de-selecting NORTH side barrier.  
    * @param evt This mouse event is generated when the NORTH barrier is to be chosen
    * to set up some type of preset barriers populated in the combo-box.
    */
    public void JRBN_mouseClicked(java.awt.event.MouseEvent evt) {
    }    
    
   /** 
    * This method is called when the "SOUTH radio button" gets clicked for selecting
    * or de-selecting SOUTH side barrier.  
    * @param evt This mouse event is generated when the SOUTH barrier is to be chosen
    * to set up some type of preset barriers populated in the combo-box.
    */
    public void JRBS_mouseClicked(java.awt.event.MouseEvent evt) {
    }
    
   /** 
    * This method is called when the "EAST radio button" gets clicked for selecting
    * or de-selecting EAST side barrier..  
    * @param evt This mouse event is generated when the EAST barrier is to be chosen
    * to set up some type of preset barriers populated in the combo-box.
    */
    public void JRBE_mouseClicked(java.awt.event.MouseEvent evt) {
    }
    
   /** 
    * This method is called when the "WEST radio button" gets clicked for selecting
    * or de-selecting the WEST side barrier.  
    * @param evt This mouse event is generated when the WEST barrier is to be chosen
    * to set up some type of preset barriers populated in the combo-box.
    */
    public void JRBW_mouseClicked(java.awt.event.MouseEvent evt) {
    }
    
   /** 
    * This method is called when the "NONE radio button" gets clicked for selecting
    * or de-selecting the barriers .. here no barrier should be selected or all deselected
    * @param evt This mouse event is generated when the NONE barrier is to be chosen
    * to set up some type of preset barriers populated in the combo-box.
    */
    public void JRBNone_mouseClicked(java.awt.event.MouseEvent evt) {
    }
    
  /*  void JRBN_itemStateChanged(java.awt.event.ItemEvent evt) {
        // Add your handling code here:
    }
    public void JRBS_itemStateChanged(java.awt.event.ItemEvent evt) {
        // Add your handling code here:
    }
    public void JRBE_itemStateChanged(java.awt.event.ItemEvent evt) {
        // Add your handling code here:
    }
    public void JRBW_itemStateChanged(java.awt.event.ItemEvent evt) {
        // Add your handling code here:
    }*/
  
   /** 
    * This method is called when the "NORTH Combo Box" is clicked for selecting
    * or de-selecting the side barriers either changing the current selection or
    * or making the selection for the first time.  
    * @param evt This mouse event is generated when the NORTH Combo Box is clicked
    * to set up some type of preset barriers populated in the combo-box list.
    */
    public void JCBN_itemStateChanged(java.awt.event.ItemEvent evt) {
    }
    
   /** 
    * This method is called when the "SOUTH Combo Box" is clicked for selecting
    * or de-selecting the side barriers either changing the current selection or
    * or making the selection for the first time.  
    * @param evt This mouse event is generated when the SOUTH Combo Box is clicked
    * to set up some type of preset barriers populated in the combo-box list.
    */
    public void JCBS_itemStateChanged(java.awt.event.ItemEvent evt) {
    }
    
   /** 
    * This method is called when the "EAST Combo Box" is clicked for selecting
    * or de-selecting the side barriers either changing the current selection or
    * or making the selection for the first time.  
    * @param evt This mouse event is generated when the EAST Combo Box is clicked
    * to set up some type of preset barriers populated in the combo-box list.
    */
    public void JCBE_itemStateChanged(java.awt.event.ItemEvent evt) {
    }
    
   /** 
    * This method is called when the "WEST Combo Box" is clicked for selecting
    * or de-selecting the side barriers either changing the current selection or
    * or making the selection for the first time.  
    * @param evt This mouse event is generated when the WEST Combo Box is clicked
    * to set up some type of preset barriers populated in the combo-box list.
    */
    public void JCBW_itemStateChanged(java.awt.event.ItemEvent evt) {
    }
    
    /** 
    * This method is called when the dimensions like width, height, porosity, etc.
    * of a particular barrier that is currrently selected needs to be changed. 
    * @param evt This action event is generated when the Edit Selected Barrier button
    * is clicked for modifying current barrier dimensions.
    */
    public void JB_detail_actionPerformed(java.awt.event.ActionEvent evt) {
    }
    
   /** 
    * 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
    
    /**
     * 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 BarPanel_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() {
    }    
    
    // Variables declaration - do not modify//GEN-BEGIN:variables
    public javax.swing.JButton JB_detail;
    public javax.swing.JComboBox JCB_E;
    public javax.swing.JComboBox JCB_N;
    public javax.swing.JComboBox JCB_S;
    public javax.swing.JComboBox JCB_W;
    public javax.swing.JPanel JP_main;
    public javax.swing.JRadioButton JRB_E;
    public javax.swing.JRadioButton JRB_N;
    public javax.swing.JRadioButton JRB_None;
    public javax.swing.JRadioButton JRB_S;
    public javax.swing.JRadioButton JRB_W;
    public javax.swing.ButtonGroup RBG_BarPanel;
    // End of variables declaration//GEN-END:variables
    
}
