/*
 * NotesMan_n.java
 *
 * Created on January 20, 2005, 11:09 AM
 */

package usda.weru.mcrew.gui;

/**
 * This is a class that builds the text area where the management file level notes
 * will be entered and also pulled when needed.
 * @author manmohan
 */
public class NotesMan_n extends javax.swing.JDialog {
    private static final long serialVersionUID = 1L;
        
   /** 
    * Default constructor for the Notes management dialog GUI object.
    */
    public NotesMan_n() {
        initComponents();
    }
    
   /** 
    * Single argument constructor for the Notes management dialog GUI object.
    * @param parent The address of the parent frame that hosts the components in it.
    * @param modal If true, cannot access other object when this is instantiated else can.
    */
    public NotesMan_n(java.awt.Frame parent, boolean modal) {
        super(parent, modal);
        initComponents();
    }
    
   /** 
    * Single argument constructor for the Notes management dialog GUI object.
    * @param parent The address of the parent JDialog that hosts the components in it.
    * @param modal If true, cannot access other object when this is instantiated else can.
    */
    public NotesMan_n(java.awt.Dialog 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() {

        JSP_Notes = new javax.swing.JScrollPane();
        JTA_Notes = new javax.swing.JTextArea();
        JP_Buttons = new javax.swing.JPanel();
        JB_Save = new javax.swing.JButton();
        JB_Cancel = new javax.swing.JButton();

        setDefaultCloseOperation(javax.swing.WindowConstants.DISPOSE_ON_CLOSE);
        setTitle("Management Notes");
        setName("NotesMan"); // NOI18N
        addWindowListener(new java.awt.event.WindowAdapter() {
            public void windowClosing(java.awt.event.WindowEvent evt) {
                exitForm(evt);
            }
        });

        JSP_Notes.setHorizontalScrollBarPolicy(javax.swing.ScrollPaneConstants.HORIZONTAL_SCROLLBAR_NEVER);
        JSP_Notes.setMinimumSize(null);

        JTA_Notes.setFont(new java.awt.Font("Monospaced", 0, 12)); // NOI18N
        JTA_Notes.setLineWrap(true);
        JTA_Notes.setWrapStyleWord(true);
        JSP_Notes.setViewportView(JTA_Notes);

        JB_Save.setText("Save");
        JB_Save.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                JBSave_ActionPerformed(evt);
            }
        });
        JP_Buttons.add(JB_Save);

        JB_Cancel.setText("Cancel");
        JB_Cancel.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                JBCancel_ActionPerformed(evt);
            }
        });
        JP_Buttons.add(JB_Cancel);

        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()
                .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addComponent(JP_Buttons, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                    .addComponent(JSP_Notes, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
                .addContainerGap())
        );
        layout.setVerticalGroup(
            layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, layout.createSequentialGroup()
                .addContainerGap()
                .addComponent(JSP_Notes, javax.swing.GroupLayout.DEFAULT_SIZE, 270, Short.MAX_VALUE)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addComponent(JP_Buttons, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
        );

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

    private void JBSave_ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_JBSave_ActionPerformed
        JBSave_actionPerformed(evt);
    }//GEN-LAST:event_JBSave_ActionPerformed

    private void JBCancel_ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_JBCancel_ActionPerformed
        JBCancel_actionPerformed(evt);
    }//GEN-LAST:event_JBCancel_ActionPerformed
    
    /** Exit the Application */
    private void exitForm(java.awt.event.WindowEvent evt) {//GEN-FIRST:event_exitForm
        this.dispose();
    }//GEN-LAST:event_exitForm
    
   /**  
    * This method is called when a Save button on the Operation dialog is pressed
    * so that any modifications to the data on screen could be saved in a file.
    * @param evt The event generated when the Save button is pressed.
    */
    public void JBSave_actionPerformed(java.awt.event.ActionEvent evt) {
    }

   /**  
    * This method is called when a cancel button in the NotesMan dialog is pressed
    * and any modifications to the data on the screen need not be saved.
    * @param evt The event generated when the cancel button is pressed.
    */
    public void JBCancel_actionPerformed(java.awt.event.ActionEvent evt) {
    }
    
   /**  
    * This method is called when the screen is resized and the components sitting 
    * in the container are to be re-arranged so they are sitting correctly adjecent
    * to each other and evenly spaced.
    * @param evt The event generated when the frame is resized.
    */
    public void NotesMan_ComponentResized(java.awt.event.ComponentEvent 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 NotesMan_n().setVisible(true);
    }
    
    // Variables declaration - do not modify//GEN-BEGIN:variables
    public javax.swing.JButton JB_Cancel;
    public javax.swing.JButton JB_Save;
    public javax.swing.JPanel JP_Buttons;
    public javax.swing.JScrollPane JSP_Notes;
    public javax.swing.JTextArea JTA_Notes;
    // End of variables declaration//GEN-END:variables
    
}
