com.xue777hua.emails.frames.EmailCrawlerJFrame.java Source code

Java tutorial

Introduction

Here is the source code for com.xue777hua.emails.frames.EmailCrawlerJFrame.java

Source

/*
 * To change this license header, choose License Headers in Project Properties.
 * To change this template file, choose Tools | Templates
 * and open the template in the editor.
 */
package com.xue777hua.emails.frames;

import com.xue777hua.emails.ExecutingThread;
import com.xue777hua.emails.TaskExecuter;
import com.xue777hua.util.TextAreaLogAppender;
import com.xue777hua.util.Log;
import java.io.File;
import java.io.FileOutputStream;
import java.io.IOException;
import java.io.OutputStream;
import java.util.Arrays;
import java.util.Calendar;
import java.util.Date;
import java.util.List;
import java.util.Map;
import java.util.logging.Level;
import java.util.logging.Logger;
import java.util.regex.Matcher;
import java.util.regex.Pattern;
import javax.swing.DefaultComboBoxModel;
import javax.swing.JOptionPane;
import jxl.Workbook;
import jxl.WorkbookSettings;
import jxl.write.Label;
import jxl.write.WritableSheet;
import jxl.write.WritableWorkbook;
import jxl.write.WriteException;

import org.apache.commons.io.FileUtils;

/**
 *
 * @author morgan
 */
public class EmailCrawlerJFrame extends javax.swing.JFrame {

    private TaskExecuter taskExecuter;
    private TextAreaLogAppender textAreaLogThread;

    /**
     * Creates new form EmailCrawlerJFrame
     */
    public EmailCrawlerJFrame() {
        initComponents();
        DefaultComboBoxModel year1Model = new DefaultComboBoxModel();
        DefaultComboBoxModel year2Model = new DefaultComboBoxModel();
        int currentYear = Calendar.getInstance().get(Calendar.YEAR);
        for (int i = currentYear; i >= 1823; i--) {
            year1Model.addElement(String.valueOf(i));
        }
        year1Model.setSelectedItem(String.valueOf(currentYear - 10));
        year2Model.addElement("Present");
        for (int i = currentYear - 1; i >= 1823; i--) {
            year2Model.addElement(String.valueOf(i));
        }
        fromDate.setModel(year1Model);
        toDate.setModel(year2Model);
    }

    /**
     * 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.
     */
    @SuppressWarnings("unchecked")
    // <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents
    private void initComponents() {

        DateOpt = new javax.swing.ButtonGroup();
        jPanel1 = new javax.swing.JPanel();
        jLabel1 = new javax.swing.JLabel();
        jPanel2 = new javax.swing.JPanel();
        jLabel2 = new javax.swing.JLabel();
        SearchText = new javax.swing.JTextField();
        jLabel3 = new javax.swing.JLabel();
        keywordOpt = new javax.swing.JComboBox();
        addTerm = new javax.swing.JComboBox();
        addkeywordOpt = new javax.swing.JComboBox();
        jLabel4 = new javax.swing.JLabel();
        addSearchText = new javax.swing.JTextField();
        jLabel5 = new javax.swing.JLabel();
        srcJrl = new javax.swing.JCheckBox();
        srcBk = new javax.swing.JCheckBox();
        jScrollPane1 = new javax.swing.JScrollPane();
        srcSel = new javax.swing.JList();
        jLabel6 = new javax.swing.JLabel();
        allYear = new javax.swing.JRadioButton();
        fromToYear = new javax.swing.JRadioButton();
        fromDate = new javax.swing.JComboBox();
        jLable7 = new javax.swing.JLabel();
        toDate = new javax.swing.JComboBox();
        SearchButton = new javax.swing.JButton();
        jPanel3 = new javax.swing.JPanel();
        searchResultLabel = new javax.swing.JLabel();
        logScrollPane = new javax.swing.JScrollPane();
        logTextArea = new javax.swing.JTextArea();

        setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE);
        setTitle("Email Crawler 1.0");
        setBounds(new java.awt.Rectangle(100, 100, 0, 0));
        setCursor(new java.awt.Cursor(java.awt.Cursor.DEFAULT_CURSOR));
        setResizable(false);

        jLabel1.setFont(new java.awt.Font("Tahoma", 0, 14)); // NOI18N
        jLabel1.setHorizontalAlignment(javax.swing.SwingConstants.CENTER);
        jLabel1.setText("Email Crawler");
        jLabel1.setAlignmentY(0.0F);

        javax.swing.GroupLayout jPanel1Layout = new javax.swing.GroupLayout(jPanel1);
        jPanel1.setLayout(jPanel1Layout);
        jPanel1Layout.setHorizontalGroup(jPanel1Layout
                .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                .addGroup(jPanel1Layout.createSequentialGroup().addContainerGap().addComponent(jLabel1,
                        javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                        .addContainerGap()));
        jPanel1Layout.setVerticalGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                .addGroup(jPanel1Layout.createSequentialGroup().addContainerGap()
                        .addComponent(jLabel1, javax.swing.GroupLayout.PREFERRED_SIZE, 29,
                                javax.swing.GroupLayout.PREFERRED_SIZE)
                        .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)));

        jLabel2.setText("Search For");

        SearchText.setName(""); // NOI18N

        jLabel3.setText("in");

        keywordOpt.setModel(new javax.swing.DefaultComboBoxModel(new String[] { "All Fields",
                "Abstract, Title, Keywords", "Authors", "Specific Author", "Source Title", "Title", "Keywords",
                "Abstract", "References", "ISSN", "ISBN", "Affiliation", "Full Text" }));

        addTerm.setModel(new javax.swing.DefaultComboBoxModel(new String[] { "AND", "OR", "AND NOT" }));

        addkeywordOpt.setModel(new javax.swing.DefaultComboBoxModel(new String[] { "All Fields",
                "Abstract, Title, Keywords", "Authors", "Specific Author", "Source Title", "Title", "Keywords",
                "Abstract", "References", "ISSN", "ISBN", "Affiliation", "Full Text" }));

        jLabel4.setText("in");

        addSearchText.setAlignmentX(0.0F);
        addSearchText.setAlignmentY(0.0F);
        addSearchText.setName(""); // NOI18N

        jLabel5.setText("Refine Your Search");

        srcJrl.setSelected(true);
        srcJrl.setText("Journals");

        srcBk.setSelected(true);
        srcBk.setText("Books");

        srcSel.setModel(new javax.swing.AbstractListModel() {
            String[] strings = { "- All Sciences -", "Agricultural and Biological Sciences", "Arts and Humanities",
                    "Biochemistry, Genetics and Molecular Biology", "Business, Management and Accounting",
                    "Chemical Engineering", "Chemistry", "Computer Science", "Decision Sciences",
                    "Earth and Planetary Sciences", "Economics, Econometrics and Finance", "Energy", "Engineering",
                    "Environmental Science", "Immunology and Microbiology", "Materials Science", "Mathematics",
                    "Medicine and Dentistry", "Neuroscience", "Nursing and Health Professions",
                    "Pharmacology, Toxicology and Pharmaceutical Science", "Physics and Astronomy", "Psychology",
                    "Social Sciences", "Veterinary Science and Veterinary Medicine" };

            public int getSize() {
                return strings.length;
            }

            public Object getElementAt(int i) {
                return strings[i];
            }
        });
        srcSel.setSelectedIndex(0);
        jScrollPane1.setViewportView(srcSel);

        jLabel6.setText("Hold down the Ctrl key to select multiple entries.");

        DateOpt.add(allYear);
        allYear.setSelected(true);
        allYear.setText("All Years");

        DateOpt.add(fromToYear);

        jLable7.setText("to");

        SearchButton.setText("Search && Export");
        SearchButton.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                SearchButtonActionPerformed(evt);
            }
        });

        searchResultLabel.setText("?");

        logTextArea.setEditable(false);
        logTextArea.setColumns(20);
        logTextArea.setRows(5);
        logTextArea.setText("?...\n");
        logScrollPane.setViewportView(logTextArea);

        javax.swing.GroupLayout jPanel3Layout = new javax.swing.GroupLayout(jPanel3);
        jPanel3.setLayout(jPanel3Layout);
        jPanel3Layout.setHorizontalGroup(jPanel3Layout
                .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                .addGroup(jPanel3Layout.createSequentialGroup().addGap(33, 33, 33).addComponent(searchResultLabel)
                        .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
                .addComponent(logScrollPane, javax.swing.GroupLayout.Alignment.TRAILING));
        jPanel3Layout.setVerticalGroup(jPanel3Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                .addGroup(jPanel3Layout.createSequentialGroup().addContainerGap().addComponent(searchResultLabel)
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                        .addComponent(logScrollPane, javax.swing.GroupLayout.DEFAULT_SIZE, 90, Short.MAX_VALUE)));

        javax.swing.GroupLayout jPanel2Layout = new javax.swing.GroupLayout(jPanel2);
        jPanel2.setLayout(jPanel2Layout);
        jPanel2Layout
                .setHorizontalGroup(jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                        .addGroup(jPanel2Layout.createSequentialGroup().addGap(35, 35, 35).addGroup(jPanel2Layout
                                .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING).addComponent(srcBk)
                                .addComponent(srcJrl).addComponent(jLabel5).addGroup(jPanel2Layout
                                        .createSequentialGroup().addGroup(jPanel2Layout
                                                .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                                                .addComponent(jLabel2).addComponent(
                                                        SearchText, javax.swing.GroupLayout.PREFERRED_SIZE, 311,
                                                        javax.swing.GroupLayout.PREFERRED_SIZE))
                                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                                        .addComponent(jLabel3).addPreferredGap(
                                                javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                                        .addComponent(
                                                keywordOpt, javax.swing.GroupLayout.PREFERRED_SIZE, 170,
                                                javax.swing.GroupLayout.PREFERRED_SIZE))
                                .addComponent(addTerm, javax.swing.GroupLayout.PREFERRED_SIZE,
                                        javax.swing.GroupLayout.DEFAULT_SIZE,
                                        javax.swing.GroupLayout.PREFERRED_SIZE)
                                .addGroup(jPanel2Layout.createSequentialGroup().addGroup(jPanel2Layout
                                        .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                                        .addGroup(
                                                jPanel2Layout.createParallelGroup(
                                                        javax.swing.GroupLayout.Alignment.LEADING, false)
                                                        .addComponent(addSearchText).addComponent(jScrollPane1,
                                                                javax.swing.GroupLayout.DEFAULT_SIZE, 311,
                                                                Short.MAX_VALUE))
                                        .addGroup(jPanel2Layout.createSequentialGroup().addGroup(jPanel2Layout
                                                .createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING,
                                                        false)
                                                .addComponent(SearchButton,
                                                        javax.swing.GroupLayout.Alignment.LEADING,
                                                        javax.swing.GroupLayout.DEFAULT_SIZE,
                                                        javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                                                .addGroup(javax.swing.GroupLayout.Alignment.LEADING, jPanel2Layout
                                                        .createSequentialGroup().addComponent(allYear)
                                                        .addPreferredGap(
                                                                javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                                                        .addComponent(fromToYear).addPreferredGap(
                                                                javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                                                        .addComponent(fromDate,
                                                                javax.swing.GroupLayout.PREFERRED_SIZE,
                                                                javax.swing.GroupLayout.DEFAULT_SIZE,
                                                                javax.swing.GroupLayout.PREFERRED_SIZE)))
                                                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                                                .addComponent(jLable7).addPreferredGap(
                                                        javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                                                .addComponent(
                                                        toDate, javax.swing.GroupLayout.PREFERRED_SIZE,
                                                        javax.swing.GroupLayout.DEFAULT_SIZE,
                                                        javax.swing.GroupLayout.PREFERRED_SIZE)))
                                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, 10,
                                                Short.MAX_VALUE)
                                        .addGroup(jPanel2Layout
                                                .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                                                .addGroup(jPanel2Layout.createSequentialGroup()
                                                        .addComponent(jLabel4)
                                                        .addPreferredGap(
                                                                javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                                                        .addComponent(addkeywordOpt,
                                                                javax.swing.GroupLayout.PREFERRED_SIZE, 170,
                                                                javax.swing.GroupLayout.PREFERRED_SIZE))
                                                .addComponent(jLabel6))))
                                .addGap(35, 35, 35))
                        .addComponent(jPanel3, javax.swing.GroupLayout.Alignment.TRAILING,
                                javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE,
                                Short.MAX_VALUE));
        jPanel2Layout.setVerticalGroup(jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                .addGroup(jPanel2Layout.createSequentialGroup().addContainerGap().addComponent(jLabel2)
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                        .addGroup(jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                                .addComponent(SearchText, javax.swing.GroupLayout.PREFERRED_SIZE,
                                        javax.swing.GroupLayout.DEFAULT_SIZE,
                                        javax.swing.GroupLayout.PREFERRED_SIZE)
                                .addComponent(jLabel3).addComponent(keywordOpt,
                                        javax.swing.GroupLayout.PREFERRED_SIZE,
                                        javax.swing.GroupLayout.DEFAULT_SIZE,
                                        javax.swing.GroupLayout.PREFERRED_SIZE))
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                        .addComponent(addTerm, javax.swing.GroupLayout.PREFERRED_SIZE,
                                javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                        .addGroup(jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                                .addComponent(addSearchText, javax.swing.GroupLayout.PREFERRED_SIZE,
                                        javax.swing.GroupLayout.DEFAULT_SIZE,
                                        javax.swing.GroupLayout.PREFERRED_SIZE)
                                .addComponent(jLabel4).addComponent(addkeywordOpt,
                                        javax.swing.GroupLayout.PREFERRED_SIZE,
                                        javax.swing.GroupLayout.DEFAULT_SIZE,
                                        javax.swing.GroupLayout.PREFERRED_SIZE))
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED).addComponent(jLabel5)
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED).addComponent(srcJrl)
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED).addComponent(srcBk)
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                        .addGroup(jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                                .addGroup(jPanel2Layout.createSequentialGroup()
                                        .addComponent(jScrollPane1, javax.swing.GroupLayout.PREFERRED_SIZE, 100,
                                                javax.swing.GroupLayout.PREFERRED_SIZE)
                                        .addGap(18, 18, 18)
                                        .addGroup(jPanel2Layout
                                                .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                                                .addGroup(jPanel2Layout
                                                        .createParallelGroup(
                                                                javax.swing.GroupLayout.Alignment.CENTER)
                                                        .addComponent(toDate,
                                                                javax.swing.GroupLayout.PREFERRED_SIZE,
                                                                javax.swing.GroupLayout.DEFAULT_SIZE,
                                                                javax.swing.GroupLayout.PREFERRED_SIZE)
                                                        .addComponent(fromToYear)
                                                        .addComponent(fromDate,
                                                                javax.swing.GroupLayout.PREFERRED_SIZE,
                                                                javax.swing.GroupLayout.DEFAULT_SIZE,
                                                                javax.swing.GroupLayout.PREFERRED_SIZE)
                                                        .addComponent(jLable7))
                                                .addComponent(allYear, javax.swing.GroupLayout.Alignment.TRAILING,
                                                        javax.swing.GroupLayout.PREFERRED_SIZE, 23,
                                                        javax.swing.GroupLayout.PREFERRED_SIZE)))
                                .addComponent(jLabel6))
                        .addGap(18, 18, 18).addComponent(SearchButton)
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                        .addComponent(jPanel3, javax.swing.GroupLayout.PREFERRED_SIZE,
                                javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                        .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)));

        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(jPanel2, javax.swing.GroupLayout.DEFAULT_SIZE,
                                javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                        .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
                .addGroup(layout.createSequentialGroup().addComponent(jPanel1, 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()
                        .addComponent(jPanel1, javax.swing.GroupLayout.PREFERRED_SIZE,
                                javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                        .addComponent(jPanel2, javax.swing.GroupLayout.PREFERRED_SIZE,
                                javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                        .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)));

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

    private void SearchButtonActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_SearchButtonActionPerformed
        if (SearchText.getText().trim().equals("")) {
            JOptionPane.showMessageDialog(this, "??!", "", JOptionPane.WARNING_MESSAGE);
            return;
        }
        // ?
        System.gc();
        SearchButton.setEnabled(false);
        try {
            //?textAreaLog
            if (getTextAreaLogThread() == null || !getTextAreaLogThread().isAlive()) {
                setTextAreaLogThread(new TextAreaLogAppender(this.getLogTextArea(), this.getLogScrollPane()));
                getTextAreaLogThread().start();
            }
        } catch (IOException ex) {
            //Logger.getLogger(EmailCrawlerJFrame.class.getName()).log(Level.SEVERE, null, ex);
            Log.logDebug(ex);
        }

        //?
        if (getTaskExecuter() == null || !getTaskExecuter().isAlive()) {
            taskExecuter = new TaskExecuter(this);
            getTaskExecuter().start();
        }
        ExecutingThread.currentTaskHintString = "?";
    }//GEN-LAST:event_SearchButtonActionPerformed

    /**
     * @param args the command line arguments
     */
    public static void main(String args[]) throws IOException {
        /* Set the Nimbus look and feel */
        //<editor-fold defaultstate="collapsed" desc=" Look and feel setting code (optional) ">
        /* If Nimbus (introduced in Java SE 6) is not available, stay with the default look and feel.
         * For details see http://download.oracle.com/javase/tutorial/uiswing/lookandfeel/plaf.html 
         */
        try {
            for (javax.swing.UIManager.LookAndFeelInfo info : javax.swing.UIManager.getInstalledLookAndFeels()) {
                if ("Nimbus".equals(info.getName())) {
                    javax.swing.UIManager.setLookAndFeel(info.getClassName());
                    break;
                }
            }
        } catch (ClassNotFoundException e1) {
            //java.util.logging.Logger.getLogger(EmailCrawlerJFrame.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);
            Log.logDebug(e1);
        } catch (InstantiationException e2) {
            Log.logDebug(e2);
        } catch (IllegalAccessException e3) {
            Log.logDebug(e3);
        } catch (javax.swing.UnsupportedLookAndFeelException e4) {
            Log.logDebug(e4);
        }
        //</editor-fold>

        /* Create and display the form */
        java.awt.EventQueue.invokeLater(new Runnable() {
            public void run() {
                EmailCrawlerJFrame frame = null;
                frame = new EmailCrawlerJFrame();
                frame.setVisible(true);
                ExecutingThread.generateRunningHintThread(frame, "?").start();
            }
        });
    }

    // Variables declaration - do not modify//GEN-BEGIN:variables
    private javax.swing.ButtonGroup DateOpt;
    private javax.swing.JButton SearchButton;
    private javax.swing.JTextField SearchText;
    private javax.swing.JTextField addSearchText;
    private javax.swing.JComboBox addTerm;
    private javax.swing.JComboBox addkeywordOpt;
    private javax.swing.JRadioButton allYear;
    private javax.swing.JComboBox fromDate;
    private javax.swing.JRadioButton fromToYear;
    private javax.swing.JLabel jLabel1;
    private javax.swing.JLabel jLabel2;
    private javax.swing.JLabel jLabel3;
    private javax.swing.JLabel jLabel4;
    private javax.swing.JLabel jLabel5;
    private javax.swing.JLabel jLabel6;
    private javax.swing.JLabel jLable7;
    private javax.swing.JPanel jPanel1;
    private javax.swing.JPanel jPanel2;
    private javax.swing.JPanel jPanel3;
    private javax.swing.JScrollPane jScrollPane1;
    private javax.swing.JComboBox keywordOpt;
    private javax.swing.JScrollPane logScrollPane;
    private javax.swing.JTextArea logTextArea;
    private javax.swing.JLabel searchResultLabel;
    private javax.swing.JCheckBox srcBk;
    private javax.swing.JCheckBox srcJrl;
    private javax.swing.JList srcSel;
    private javax.swing.JComboBox toDate;
    // End of variables declaration//GEN-END:variables

    // Variables declaration
    // End of variables declaration        
    /**
     * @return the DateOpt
     */
    public javax.swing.ButtonGroup getDateOpt() {
        return DateOpt;
    }

    /**
     * @param DateOpt the DateOpt to set
     */
    public void setDateOpt(javax.swing.ButtonGroup DateOpt) {
        this.DateOpt = DateOpt;
    }

    /**
     * @return the SearchButton
     */
    public javax.swing.JButton getSearchButton() {
        return SearchButton;
    }

    /**
     * @param SearchButton the SearchButton to set
     */
    public void setSearchButton(javax.swing.JButton SearchButton) {
        this.SearchButton = SearchButton;
    }

    /**
     * @return the SearchText
     */
    public javax.swing.JTextField getSearchText() {
        return SearchText;
    }

    /**
     * @param SearchText the SearchText to set
     */
    public void setSearchText(javax.swing.JTextField SearchText) {
        this.SearchText = SearchText;
    }

    /**
     * @return the addSearchText
     */
    public javax.swing.JTextField getAddSearchText() {
        return addSearchText;
    }

    /**
     * @param addSearchText the addSearchText to set
     */
    public void setAddSearchText(javax.swing.JTextField addSearchText) {
        this.addSearchText = addSearchText;
    }

    /**
     * @return the addTerm
     */
    public javax.swing.JComboBox getAddTerm() {
        return addTerm;
    }

    /**
     * @param addTerm the addTerm to set
     */
    public void setAddTerm(javax.swing.JComboBox addTerm) {
        this.addTerm = addTerm;
    }

    /**
     * @return the addkeywordOpt
     */
    public javax.swing.JComboBox getAddkeywordOpt() {
        return addkeywordOpt;
    }

    /**
     * @param addkeywordOpt the addkeywordOpt to set
     */
    public void setAddkeywordOpt(javax.swing.JComboBox addkeywordOpt) {
        this.addkeywordOpt = addkeywordOpt;
    }

    /**
     * @return the fromDate
     */
    public javax.swing.JComboBox getFromDate() {
        return fromDate;
    }

    /**
     * @param fromDate the fromDate to set
     */
    public void setFromDate(javax.swing.JComboBox fromDate) {
        this.fromDate = fromDate;
    }

    /**
     * @return the jLabel1
     */
    public javax.swing.JLabel getjLabel1() {
        return jLabel1;
    }

    /**
     * @param jLabel1 the jLabel1 to set
     */
    public void setjLabel1(javax.swing.JLabel jLabel1) {
        this.jLabel1 = jLabel1;
    }

    /**
     * @return the jLabel2
     */
    public javax.swing.JLabel getjLabel2() {
        return jLabel2;
    }

    /**
     * @param jLabel2 the jLabel2 to set
     */
    public void setjLabel2(javax.swing.JLabel jLabel2) {
        this.jLabel2 = jLabel2;
    }

    /**
     * @return the jLabel3
     */
    public javax.swing.JLabel getjLabel3() {
        return jLabel3;
    }

    /**
     * @param jLabel3 the jLabel3 to set
     */
    public void setjLabel3(javax.swing.JLabel jLabel3) {
        this.jLabel3 = jLabel3;
    }

    /**
     * @return the jLabel4
     */
    public javax.swing.JLabel getjLabel4() {
        return jLabel4;
    }

    /**
     * @param jLabel4 the jLabel4 to set
     */
    public void setjLabel4(javax.swing.JLabel jLabel4) {
        this.jLabel4 = jLabel4;
    }

    /**
     * @return the jLabel5
     */
    public javax.swing.JLabel getjLabel5() {
        return jLabel5;
    }

    /**
     * @param jLabel5 the jLabel5 to set
     */
    public void setjLabel5(javax.swing.JLabel jLabel5) {
        this.jLabel5 = jLabel5;
    }

    /**
     * @return the jLabel6
     */
    public javax.swing.JLabel getjLabel6() {
        return jLabel6;
    }

    /**
     * @param jLabel6 the jLabel6 to set
     */
    public void setjLabel6(javax.swing.JLabel jLabel6) {
        this.jLabel6 = jLabel6;
    }

    /**
     * @return the jLable7
     */
    public javax.swing.JLabel getjLable7() {
        return jLable7;
    }

    /**
     * @param jLable7 the jLable7 to set
     */
    public void setjLable7(javax.swing.JLabel jLable7) {
        this.jLable7 = jLable7;
    }

    /**
     * @return the jPanel1
     */
    public javax.swing.JPanel getjPanel1() {
        return jPanel1;
    }

    /**
     * @param jPanel1 the jPanel1 to set
     */
    public void setjPanel1(javax.swing.JPanel jPanel1) {
        this.jPanel1 = jPanel1;
    }

    /**
     * @return the jPanel2
     */
    public javax.swing.JPanel getjPanel2() {
        return jPanel2;
    }

    /**
     * @param jPanel2 the jPanel2 to set
     */
    public void setjPanel2(javax.swing.JPanel jPanel2) {
        this.jPanel2 = jPanel2;
    }

    /**
     * @return the jPanel3
     */
    public javax.swing.JPanel getjPanel3() {
        return jPanel3;
    }

    /**
     * @param jPanel3 the jPanel3 to set
     */
    public void setjPanel3(javax.swing.JPanel jPanel3) {
        this.jPanel3 = jPanel3;
    }

    /**
     * @return the jRadioButton1
     */
    public javax.swing.JRadioButton getjRadioButton1() {
        return getAllYear();
    }

    /**
     * @param jRadioButton1 the jRadioButton1 to set
     */
    public void setjRadioButton1(javax.swing.JRadioButton jRadioButton1) {
        this.setAllYear(jRadioButton1);
    }

    /**
     * @return the jRadioButton2
     */
    public javax.swing.JRadioButton getjRadioButton2() {
        return fromToYear;
    }

    /**
     * @param jRadioButton2 the jRadioButton2 to set
     */
    public void setjRadioButton2(javax.swing.JRadioButton jRadioButton2) {
        this.fromToYear = jRadioButton2;
    }

    /**
     * @return the jScrollPane1
     */
    public javax.swing.JScrollPane getjScrollPane1() {
        return jScrollPane1;
    }

    /**
     * @param jScrollPane1 the jScrollPane1 to set
     */
    public void setjScrollPane1(javax.swing.JScrollPane jScrollPane1) {
        this.jScrollPane1 = jScrollPane1;
    }

    /**
     * @return the keywordOpt
     */
    public javax.swing.JComboBox getKeywordOpt() {
        return keywordOpt;
    }

    /**
     * @param keywordOpt the keywordOpt to set
     */
    public void setKeywordOpt(javax.swing.JComboBox keywordOpt) {
        this.keywordOpt = keywordOpt;
    }

    /**
     * @return the searchResultLabel
     */
    public javax.swing.JLabel getSearchResultLabel() {
        return searchResultLabel;
    }

    /**
     * @param searchResultLabel the searchResultLabel to set
     */
    public void setSearchResultLabel(javax.swing.JLabel searchResultLabel) {
        this.searchResultLabel = searchResultLabel;
    }

    /**
     * @return the srcBk
     */
    public javax.swing.JCheckBox getSrcBk() {
        return srcBk;
    }

    /**
     * @param srcBk the srcBk to set
     */
    public void setSrcBk(javax.swing.JCheckBox srcBk) {
        this.srcBk = srcBk;
    }

    /**
     * @return the srcJrl
     */
    public javax.swing.JCheckBox getSrcJrl() {
        return srcJrl;
    }

    /**
     * @param srcJrl the srcJrl to set
     */
    public void setSrcJrl(javax.swing.JCheckBox srcJrl) {
        this.srcJrl = srcJrl;
    }

    /**
     * @return the srcSel
     */
    public javax.swing.JList getSrcSel() {
        return srcSel;
    }

    /**
     * @param srcSel the srcSel to set
     */
    public void setSrcSel(javax.swing.JList srcSel) {
        this.srcSel = srcSel;
    }

    /**
     * @return the toDate
     */
    public javax.swing.JComboBox getToDate() {
        return toDate;
    }

    /**
     * @param toDate the toDate to set
     */
    public void setToDate(javax.swing.JComboBox toDate) {
        this.toDate = toDate;
    }

    /**
     * @return the taskExecuter
     */
    public TaskExecuter getTaskExecuter() {
        return taskExecuter;
    }

    public void setTaskExecuter(TaskExecuter t) {
        this.taskExecuter = t;
    }

    /**
     * @return the textAreaLogThread
     */
    public TextAreaLogAppender getTextAreaLogThread() {
        return textAreaLogThread;
    }

    /**
     * @return the logScrollPane
     */
    public javax.swing.JScrollPane getLogScrollPane() {
        return logScrollPane;
    }

    /**
     * @return the logTextArea
     */
    public javax.swing.JTextArea getLogTextArea() {
        return logTextArea;
    }

    /**
     * @param textAreaLogThread the textAreaLogThread to set
     */
    public void setTextAreaLogThread(TextAreaLogAppender textAreaLogThread) {
        this.textAreaLogThread = textAreaLogThread;
    }

    /**
     * @return the allYear
     */
    public javax.swing.JRadioButton getAllYear() {
        return allYear;
    }

    /**
     * @param allYear the allYear to set
     */
    public void setAllYear(javax.swing.JRadioButton allYear) {
        this.allYear = allYear;
    }
}