/*
 * OutputViewer_n.java
 *
 * Created on November 4, 2003, 9:46 PM
 */
package usda.weru.weps.reports.gui;

/**
 *
 * @author  manmohan
 */
public class OutputViewer_n extends javax.swing.JFrame {

    private static final long serialVersionUID = 1L;

    /** Creates new form OutputViewer_n */
    public OutputViewer_n() {
        initComponents();
    }

    // Add code manually by the programmer
    public OutputViewer_n(java.lang.String sTitle) {
        this();
        setTitle(sTitle);
    }

    /** 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();
        JSP_text = new javax.swing.JScrollPane();
        JTA_text = new javax.swing.JTextArea();
        JTA_text.setCaretPosition(0);
        JLabel1 = new javax.swing.JLabel();
        JCB_fileNames = new javax.swing.JComboBox<String>();
        JP_toolbar = new javax.swing.JPanel();
        JTB_main = new javax.swing.JToolBar();
        JB_OK = new javax.swing.JButton();
        JB_print = new javax.swing.JButton();
        JB_help = new javax.swing.JButton();
        JB_CSH = new javax.swing.JButton();

        setDefaultCloseOperation(javax.swing.WindowConstants.DO_NOTHING_ON_CLOSE);
        setTitle("Output Viewer ");
        addComponentListener(new java.awt.event.ComponentAdapter() {
            public void componentResized(java.awt.event.ComponentEvent evt) {
                OutputViewerN_ComponentResized(evt);
            }
        });
        addWindowListener(new java.awt.event.WindowAdapter() {
            public void windowClosing(java.awt.event.WindowEvent evt) {
                exitform(evt);
            }
        });
        getContentPane().setLayout(null);

        JP_main.setLayout(null);

        JSP_text.setHorizontalScrollBarPolicy(javax.swing.ScrollPaneConstants.HORIZONTAL_SCROLLBAR_ALWAYS);
        JSP_text.setVerticalScrollBarPolicy(javax.swing.ScrollPaneConstants.VERTICAL_SCROLLBAR_ALWAYS);
        JSP_text.setViewportBorder(javax.swing.BorderFactory.createLineBorder(new java.awt.Color(0, 0, 0)));
        JSP_text.setPreferredSize(new java.awt.Dimension(560, 400));
        JSP_text.setAutoscrolls(true);

        JTA_text.setFont(new java.awt.Font("Monospaced", 0, 10)); // NOI18N
        JTA_text.setToolTipText("OutputViewer:Text");
        JTA_text.setDragEnabled(true);
        JTA_text.setFocusCycleRoot(true);
        JTA_text.setAutoscrolls(false);
        JTA_text.setCaretPosition(0);
        JSP_text.setViewportView(JTA_text);

        JP_main.add(JSP_text);
        JSP_text.setBounds(0, 70, 560, 400);

        JLabel1.setHorizontalAlignment(javax.swing.SwingConstants.RIGHT);
        JLabel1.setText("Select file to display :");
        JLabel1.setToolTipText("OutputViewer:selectFile");
        JP_main.add(JLabel1);
        JLabel1.setBounds(0, 20, 120, 19);

        JCB_fileNames.setMaximumRowCount(15);
        JCB_fileNames.setToolTipText("OutputViewer:FileNames");
        JCB_fileNames.addItemListener(new java.awt.event.ItemListener() {
            public void itemStateChanged(java.awt.event.ItemEvent evt) {
                JCBFileNames_ItemStateChanged(evt);
            }
        });
        JP_main.add(JCB_fileNames);
        JCB_fileNames.setBounds(130, 20, 425, 20);

        getContentPane().add(JP_main);
        JP_main.setBounds(10, 50, 564, 470);

        JP_toolbar.setBorder(javax.swing.BorderFactory.createLineBorder(new java.awt.Color(0, 0, 0)));
        JP_toolbar.setToolTipText("Toolbar:main");
        JP_toolbar.setLayout(new java.awt.FlowLayout(java.awt.FlowLayout.LEFT));

        JTB_main.setToolTipText("Toolbar:main");
        JTB_main.setAlignmentY(0.47619F);

        JB_OK.setMnemonic('O');
        JB_OK.setText("Close");
        JB_OK.setToolTipText("Toolbar:close");
        JB_OK.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                JBOK_ActionPerformed(evt);
            }
        });
        JTB_main.add(JB_OK);

        JB_print.setIcon(new javax.swing.ImageIcon(getClass().getResource("/usda/weru/resources/print.gif"))); // NOI18N
        JB_print.setMnemonic('P');
        JB_print.setToolTipText("Toolbar:print");
        JB_print.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                JBPrint_ActionPerformed(evt);
            }
        });
        JTB_main.add(JB_print);

        JB_help.setIcon(new javax.swing.ImageIcon(getClass().getResource("/usda/weru/resources/question.gif"))); // NOI18N
        JB_help.setMnemonic('B');
        JB_help.setToolTipText("Toolbar:about");
        JB_help.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                JBHelp_ActionPerformed(evt);
            }
        });
        JTB_main.add(JB_help);

        JB_CSH.setIcon(new javax.swing.ImageIcon(getClass().getResource("/usda/weru/resources/help.gif"))); // NOI18N
        JB_CSH.setMnemonic('H');
        JB_CSH.setToolTipText("Toolbar:help");
        JB_CSH.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                JBCSH_ActionPerformed(evt);
            }
        });
        JTB_main.add(JB_CSH);

        JP_toolbar.add(JTB_main);

        getContentPane().add(JP_toolbar);
        JP_toolbar.setBounds(10, 3, 565, 45);

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

    private void JBCSH_ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_JBCSH_ActionPerformed
        JBCSH_actionPerformed(evt);
    }//GEN-LAST:event_JBCSH_ActionPerformed

    private void OutputViewerN_ComponentResized(java.awt.event.ComponentEvent evt) {//GEN-FIRST:event_OutputViewerN_ComponentResized
        OutputViewerN_componentResized(evt);
    }//GEN-LAST:event_OutputViewerN_ComponentResized

    protected void OutputViewerN_componentResized(java.awt.event.ComponentEvent evt) {
    }

    private void exitform(java.awt.event.WindowEvent evt) {//GEN-FIRST:event_exitform
        this.dispose();
    }//GEN-LAST:event_exitform

    private void JCBFileNames_ItemStateChanged(java.awt.event.ItemEvent evt) {//GEN-FIRST:event_JCBFileNames_ItemStateChanged
        JCBFileNames_itemStateChanged(evt); // Add code manually by the programmer
    }//GEN-LAST:event_JCBFileNames_ItemStateChanged

    private void JBOK_ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_JBOK_ActionPerformed
        JBOK_actionPerformed(evt);  // Add code manually by the programmer
    }//GEN-LAST:event_JBOK_ActionPerformed

    private void JBPrint_ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_JBPrint_ActionPerformed
        JBPrint_actionPerformed(evt);   // Add code manually by the programmer
    }//GEN-LAST:event_JBPrint_ActionPerformed

    private void JBHelp_ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_JBHelp_ActionPerformed
        JBHelp_actionPerformed(evt);    // Add code manually by the programmer
    }//GEN-LAST:event_JBHelp_ActionPerformed

    // Add code manually by the programmer
    protected void JCBFileNames_itemStateChanged(java.awt.event.ItemEvent evt) {
    }

    protected void JBOK_actionPerformed(java.awt.event.ActionEvent evt) {
    }

    protected void JBPrint_actionPerformed(java.awt.event.ActionEvent evt) {
    }

    protected void JBCSH_actionPerformed(java.awt.event.ActionEvent evt) {
    }

    protected void JBHelp_actionPerformed(java.awt.event.ActionEvent evt) {
    }

    /** Exit the Application */
    /**
     * @param args the command line arguments
     */
    public static void main(String args[]) {
        new OutputViewer_n().setVisible(true);
    }

    @Override
    public void addNotify() {
        super.addNotify();
    }

    // Variables declaration - do not modify//GEN-BEGIN:variables
    public javax.swing.JButton JB_CSH;
    public javax.swing.JButton JB_OK;
    public javax.swing.JButton JB_help;
    public javax.swing.JButton JB_print;
    public javax.swing.JComboBox<String> JCB_fileNames;
    public javax.swing.JLabel JLabel1;
    public javax.swing.JPanel JP_main;
    public javax.swing.JPanel JP_toolbar;
    public javax.swing.JScrollPane JSP_text;
    public javax.swing.JTextArea JTA_text;
    public javax.swing.JToolBar JTB_main;
    // End of variables declaration//GEN-END:variables

}
