/*
 * CalibrationFactors.java
 * Created on May 24, 2004, 11:50 AM
 */

package usda.weru.weps.gui;

/**
 * This GUI helps the user in telling what the calibration factors are like and 
 * their details regarding their project name, current run, selected management file,
 * the planting date for various crops and their biomass adjustment fact, etc.
 * @author  manmohan
 */
public class CalFactorDialog_n extends javax.swing.JDialog {
    private static final long serialVersionUID = 1L;
    
    /** 
     * Default constructor that creates the new GUI form as CalibrationFactors 
     */
    public CalFactorDialog_n() {
            initComponents();
    }
    
    /** 
    * Two argument constructor that initialises the components that go in the GUI
    * container.
    * @param parent The address of a parent frame in which the Calibration Factors dialog sits.
    * @param modal True means no other object can be accessed when this is instantiated
    * while false means we can.
    */ 
    public CalFactorDialog_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() {

        JP_cropAttributes = new javax.swing.JPanel();
        JSP_cropAttributes = new javax.swing.JScrollPane();
        JTA_cropAttributes = new javax.swing.JTextArea();
        JL_plantingDate = new javax.swing.JLabel();
        JL_cropName = new javax.swing.JLabel();
        JL_BioMass = new javax.swing.JLabel();
        JL_AdjVal = new javax.swing.JLabel();
        jLabel1 = new javax.swing.JLabel();
        JP_cropNotes = new javax.swing.JPanel();
        jLabel2 = new javax.swing.JLabel();
        jScrollPane1 = new javax.swing.JScrollPane();
        JTA_cropNotes = new javax.swing.JTextArea();
        JP_calFacDetails = new javax.swing.JPanel();
        JL_projName = new javax.swing.JLabel();
        JL_runName = new javax.swing.JLabel();
        JL_manFile = new javax.swing.JLabel();
        JTF_projName = new javax.swing.JTextField();
        JTF_runName = new javax.swing.JTextField();
        JTF_manFile = new javax.swing.JTextField();
        JP_buttons = new javax.swing.JPanel();
        JB_apply = new javax.swing.JButton();
        JB_close = new javax.swing.JButton();
        JP_table = new javax.swing.JPanel();

        JP_cropAttributes.setLayout(null);

        JTA_cropAttributes.setEditable(false);
        JSP_cropAttributes.setViewportView(JTA_cropAttributes);

        JP_cropAttributes.add(JSP_cropAttributes);
        JSP_cropAttributes.setBounds(3, 40, 430, 120);

        JL_plantingDate.setFont(new java.awt.Font("Dialog", 1, 12)); // NOI18N
        JL_plantingDate.setHorizontalAlignment(javax.swing.SwingConstants.CENTER);
        JL_plantingDate.setText("Planting Date");
        JP_cropAttributes.add(JL_plantingDate);
        JL_plantingDate.setBounds(5, 0, 80, 19);
        JL_plantingDate.getAccessibleContext().setAccessibleName("");

        JL_cropName.setFont(new java.awt.Font("Dialog", 1, 12)); // NOI18N
        JL_cropName.setHorizontalAlignment(javax.swing.SwingConstants.CENTER);
        JL_cropName.setText("Crop Name");
        JP_cropAttributes.add(JL_cropName);
        JL_cropName.setBounds(95, 0, 230, 40);

        JL_BioMass.setFont(new java.awt.Font("Dialog", 1, 12)); // NOI18N
        JL_BioMass.setHorizontalAlignment(javax.swing.SwingConstants.CENTER);
        JL_BioMass.setText("Bio-Mass");
        JP_cropAttributes.add(JL_BioMass);
        JL_BioMass.setBounds(375, 0, 55, 19);

        JL_AdjVal.setFont(new java.awt.Font("Dialog", 1, 12)); // NOI18N
        JL_AdjVal.setHorizontalAlignment(javax.swing.SwingConstants.CENTER);
        JL_AdjVal.setText("Adj. Val");
        JP_cropAttributes.add(JL_AdjVal);
        JL_AdjVal.setBounds(375, 20, 55, 16);

        jLabel1.setFont(new java.awt.Font("Dialog", 1, 12)); // NOI18N
        jLabel1.setHorizontalAlignment(javax.swing.SwingConstants.CENTER);
        jLabel1.setText("DD/MM/YY");
        JP_cropAttributes.add(jLabel1);
        jLabel1.setBounds(5, 20, 80, 19);

        jLabel2.setText("Crop Notes:");

        JTA_cropNotes.setColumns(20);
        JTA_cropNotes.setRows(5);
        jScrollPane1.setViewportView(JTA_cropNotes);

        javax.swing.GroupLayout JP_cropNotesLayout = new javax.swing.GroupLayout(JP_cropNotes);
        JP_cropNotes.setLayout(JP_cropNotesLayout);
        JP_cropNotesLayout.setHorizontalGroup(
            JP_cropNotesLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(JP_cropNotesLayout.createSequentialGroup()
                .addContainerGap()
                .addGroup(JP_cropNotesLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addComponent(jScrollPane1, javax.swing.GroupLayout.Alignment.TRAILING, javax.swing.GroupLayout.DEFAULT_SIZE, 242, Short.MAX_VALUE)
                    .addGroup(JP_cropNotesLayout.createSequentialGroup()
                        .addComponent(jLabel2)
                        .addContainerGap(184, Short.MAX_VALUE))))
        );
        JP_cropNotesLayout.setVerticalGroup(
            JP_cropNotesLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(JP_cropNotesLayout.createSequentialGroup()
                .addComponent(jLabel2)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addComponent(jScrollPane1, javax.swing.GroupLayout.DEFAULT_SIZE, 236, Short.MAX_VALUE))
        );

        setDefaultCloseOperation(javax.swing.WindowConstants.DISPOSE_ON_CLOSE);
        setTitle("Calibration Factors");
        setAlwaysOnTop(true);

        JL_projName.setFont(new java.awt.Font("Dialog", 1, 12)); // NOI18N
        JL_projName.setHorizontalAlignment(javax.swing.SwingConstants.LEFT);
        JL_projName.setText("Run Location :");

        JL_runName.setFont(new java.awt.Font("Dialog", 1, 12)); // NOI18N
        JL_runName.setHorizontalAlignment(javax.swing.SwingConstants.LEFT);
        JL_runName.setText("Run Name :");

        JL_manFile.setFont(new java.awt.Font("Dialog", 1, 12)); // NOI18N
        JL_manFile.setHorizontalAlignment(javax.swing.SwingConstants.LEFT);
        JL_manFile.setText("Management :");

        JTF_projName.setBackground(new java.awt.Color(236, 233, 216));
        JTF_projName.setEditable(false);
        JTF_projName.setBorder(javax.swing.BorderFactory.createLineBorder(new java.awt.Color(102, 102, 102)));

        JTF_runName.setBackground(new java.awt.Color(236, 233, 216));
        JTF_runName.setEditable(false);
        JTF_runName.setBorder(javax.swing.BorderFactory.createLineBorder(new java.awt.Color(102, 102, 102)));

        JTF_manFile.setBackground(new java.awt.Color(236, 233, 216));
        JTF_manFile.setEditable(false);
        JTF_manFile.setText("  Not Selected yet");
        JTF_manFile.setBorder(javax.swing.BorderFactory.createLineBorder(new java.awt.Color(102, 102, 102)));

        JP_buttons.setAlignmentY(1.0F);
        JP_buttons.setLayout(new java.awt.FlowLayout(java.awt.FlowLayout.CENTER, 5, 10));

        JB_apply.setText("Use In Current Project");
        JB_apply.setEnabled(false);
        JB_apply.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                JB_applyActionPerformed(evt);
            }
        });
        JP_buttons.add(JB_apply);

        JB_close.setText("Close");
        JB_close.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                JBClose_ActionPerformed(evt);
            }
        });
        JP_buttons.add(JB_close);

        JP_table.setLayout(new java.awt.BorderLayout());

        javax.swing.GroupLayout JP_calFacDetailsLayout = new javax.swing.GroupLayout(JP_calFacDetails);
        JP_calFacDetails.setLayout(JP_calFacDetailsLayout);
        JP_calFacDetailsLayout.setHorizontalGroup(
            JP_calFacDetailsLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, JP_calFacDetailsLayout.createSequentialGroup()
                .addContainerGap()
                .addGroup(JP_calFacDetailsLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)
                    .addComponent(JP_table, javax.swing.GroupLayout.Alignment.LEADING, javax.swing.GroupLayout.DEFAULT_SIZE, 465, Short.MAX_VALUE)
                    .addComponent(JP_buttons, javax.swing.GroupLayout.Alignment.LEADING, javax.swing.GroupLayout.DEFAULT_SIZE, 465, Short.MAX_VALUE)
                    .addGroup(javax.swing.GroupLayout.Alignment.LEADING, JP_calFacDetailsLayout.createSequentialGroup()
                        .addComponent(JL_manFile, javax.swing.GroupLayout.PREFERRED_SIZE, 90, javax.swing.GroupLayout.PREFERRED_SIZE)
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                        .addComponent(JTF_manFile, javax.swing.GroupLayout.DEFAULT_SIZE, 371, Short.MAX_VALUE))
                    .addGroup(JP_calFacDetailsLayout.createSequentialGroup()
                        .addGroup(JP_calFacDetailsLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                            .addComponent(JL_projName, javax.swing.GroupLayout.PREFERRED_SIZE, 86, javax.swing.GroupLayout.PREFERRED_SIZE)
                            .addComponent(JL_runName, javax.swing.GroupLayout.PREFERRED_SIZE, 90, javax.swing.GroupLayout.PREFERRED_SIZE))
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                        .addGroup(JP_calFacDetailsLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                            .addComponent(JTF_projName, javax.swing.GroupLayout.DEFAULT_SIZE, 371, Short.MAX_VALUE)
                            .addComponent(JTF_runName, javax.swing.GroupLayout.DEFAULT_SIZE, 371, Short.MAX_VALUE))))
                .addContainerGap())
        );
        JP_calFacDetailsLayout.setVerticalGroup(
            JP_calFacDetailsLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(JP_calFacDetailsLayout.createSequentialGroup()
                .addContainerGap()
                .addGroup(JP_calFacDetailsLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(JL_projName, javax.swing.GroupLayout.PREFERRED_SIZE, 19, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(JTF_projName, javax.swing.GroupLayout.PREFERRED_SIZE, 19, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addGroup(JP_calFacDetailsLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(JL_runName, javax.swing.GroupLayout.PREFERRED_SIZE, 19, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(JTF_runName, javax.swing.GroupLayout.PREFERRED_SIZE, 19, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addGroup(JP_calFacDetailsLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(JL_manFile, javax.swing.GroupLayout.PREFERRED_SIZE, 19, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(JTF_manFile, javax.swing.GroupLayout.PREFERRED_SIZE, 19, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addComponent(JP_table, javax.swing.GroupLayout.DEFAULT_SIZE, 125, Short.MAX_VALUE)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addComponent(JP_buttons, javax.swing.GroupLayout.PREFERRED_SIZE, 40, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addContainerGap())
        );

        javax.swing.GroupLayout layout = new javax.swing.GroupLayout(getContentPane());
        getContentPane().setLayout(layout);
        layout.setHorizontalGroup(
            layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(layout.createSequentialGroup()
                .addContainerGap()
                .addComponent(JP_calFacDetails, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                .addContainerGap())
        );
        layout.setVerticalGroup(
            layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(layout.createSequentialGroup()
                .addContainerGap()
                .addComponent(JP_calFacDetails, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                .addContainerGap())
        );

        setSize(new java.awt.Dimension(503, 327));
        setLocationRelativeTo(null);
    }// </editor-fold>//GEN-END:initComponents

    private void JB_applyActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_JB_applyActionPerformed
        JB_apply_actionPerformed(evt);
    }//GEN-LAST:event_JB_applyActionPerformed

    protected void JB_apply_actionPerformed(java.awt.event.ActionEvent evt) {
        
    }
    
    private void JBClose_ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_JBClose_ActionPerformed
        JBClose_actionPerformed(evt);
    }//GEN-LAST:event_JBClose_ActionPerformed
    
    /**
     * This button is used to closed close the calibration factor dialog once the
     * user is done accessing the information needed.
     * @param evt The action event that is generated when this "Close" button is hit.
     */
    public void JBClose_actionPerformed(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 CalFactorDialog_n(new javax.swing.JFrame(), false).setVisible(true);
    }
    
    // Variables declaration - do not modify//GEN-BEGIN:variables
    protected javax.swing.JButton JB_apply;
    private javax.swing.JButton JB_close;
    public javax.swing.JLabel JL_AdjVal;
    public javax.swing.JLabel JL_BioMass;
    public javax.swing.JLabel JL_cropName;
    public javax.swing.JLabel JL_manFile;
    public javax.swing.JLabel JL_plantingDate;
    public javax.swing.JLabel JL_projName;
    public javax.swing.JLabel JL_runName;
    public javax.swing.JPanel JP_buttons;
    public javax.swing.JPanel JP_calFacDetails;
    public javax.swing.JPanel JP_cropAttributes;
    protected javax.swing.JPanel JP_cropNotes;
    protected javax.swing.JPanel JP_table;
    public javax.swing.JScrollPane JSP_cropAttributes;
    public javax.swing.JTextArea JTA_cropAttributes;
    protected javax.swing.JTextArea JTA_cropNotes;
    public javax.swing.JTextField JTF_manFile;
    public javax.swing.JTextField JTF_projName;
    public javax.swing.JTextField JTF_runName;
    private javax.swing.JLabel jLabel1;
    private javax.swing.JLabel jLabel2;
    private javax.swing.JScrollPane jScrollPane1;
    // End of variables declaration//GEN-END:variables
    
}
