--- /dev/null
+<?xml version="1.1" encoding="UTF-8" ?>
+
+<Form version="1.3" maxVersion="1.7" type="org.netbeans.modules.form.forminfo.JDialogFormInfo">
+ <NonVisualComponents>
+ <Component class="javax.swing.JCheckBox" name="jCheckBox1">
+ <Properties>
+ <Property name="text" type="java.lang.String" value="jCheckBox1"/>
+ </Properties>
+ </Component>
+ </NonVisualComponents>
+ <Properties>
+ <Property name="defaultCloseOperation" type="int" value="2"/>
+ <Property name="title" type="java.lang.String" value="Output CSV Log"/>
+ </Properties>
+ <SyntheticProperties>
+ <SyntheticProperty name="formSizePolicy" type="int" value="1"/>
+ </SyntheticProperties>
+ <AuxValues>
+ <AuxValue name="FormSettings_autoResourcing" type="java.lang.Integer" value="0"/>
+ <AuxValue name="FormSettings_autoSetComponentName" type="java.lang.Boolean" value="false"/>
+ <AuxValue name="FormSettings_generateFQN" type="java.lang.Boolean" value="true"/>
+ <AuxValue name="FormSettings_generateMnemonicsCode" type="java.lang.Boolean" value="false"/>
+ <AuxValue name="FormSettings_i18nAutoMode" type="java.lang.Boolean" value="false"/>
+ <AuxValue name="FormSettings_layoutCodeTarget" type="java.lang.Integer" value="1"/>
+ <AuxValue name="FormSettings_listenerGenerationStyle" type="java.lang.Integer" value="0"/>
+ <AuxValue name="FormSettings_variablesLocal" type="java.lang.Boolean" value="false"/>
+ <AuxValue name="FormSettings_variablesModifier" type="java.lang.Integer" value="2"/>
+ </AuxValues>
+
+ <Layout>
+ <DimensionLayout dim="0">
+ <Group type="103" groupAlignment="0" attributes="0">
+ <Component id="jPanel1" alignment="0" max="32767" attributes="0"/>
+ </Group>
+ </DimensionLayout>
+ <DimensionLayout dim="1">
+ <Group type="103" groupAlignment="0" attributes="0">
+ <Component id="jPanel1" alignment="0" max="32767" attributes="0"/>
+ </Group>
+ </DimensionLayout>
+ </Layout>
+ <SubComponents>
+ <Container class="javax.swing.JPanel" name="jPanel1">
+
+ <Layout>
+ <DimensionLayout dim="0">
+ <Group type="103" groupAlignment="0" attributes="0">
+ <Group type="102" attributes="0">
+ <EmptySpace min="-2" max="-2" attributes="0"/>
+ <Group type="103" groupAlignment="0" attributes="0">
+ <Group type="102" attributes="0">
+ <Group type="103" groupAlignment="0" attributes="0">
+ <Component id="jLabel2" alignment="0" min="-2" max="-2" attributes="0"/>
+ <Group type="102" alignment="0" attributes="0">
+ <Group type="103" groupAlignment="1" attributes="0">
+ <Component id="jLabel3" alignment="0" min="-2" max="-2" attributes="0"/>
+ <Component id="jLabel1" alignment="0" pref="327" max="32767" attributes="1"/>
+ <Component id="jTextField2" alignment="0" pref="327" max="32767" attributes="1"/>
+ <Component id="jTextField1" alignment="0" pref="327" max="32767" attributes="1"/>
+ <Component id="jButton3" alignment="1" min="-2" pref="125" max="-2" attributes="0"/>
+ </Group>
+ <EmptySpace min="-2" max="-2" attributes="0"/>
+ <Group type="103" groupAlignment="1" attributes="0">
+ <Component id="jButton4" alignment="1" pref="129" max="32767" attributes="0"/>
+ <Component id="jButton1" alignment="0" pref="129" max="32767" attributes="1"/>
+ <Component id="jButton2" alignment="0" pref="129" max="32767" attributes="1"/>
+ </Group>
+ </Group>
+ </Group>
+ <EmptySpace min="-2" max="-2" attributes="0"/>
+ </Group>
+ <Group type="102" alignment="0" attributes="0">
+ <Group type="103" groupAlignment="0" attributes="0">
+ <Group type="102" alignment="0" attributes="0">
+ <Component id="jLabel4" min="-2" max="-2" attributes="0"/>
+ <EmptySpace pref="228" max="-2" attributes="0"/>
+ </Group>
+ <Group type="102" alignment="0" attributes="0">
+ <Group type="103" groupAlignment="0" attributes="0">
+ <Component id="jCheckBox2" alignment="0" pref="142" max="32767" attributes="0"/>
+ <Component id="jCheckBox3" alignment="0" pref="142" max="32767" attributes="0"/>
+ <Component id="jCheckBox4" alignment="0" pref="142" max="32767" attributes="0"/>
+ <Component id="jCheckBox5" alignment="0" pref="142" max="32767" attributes="0"/>
+ <Component id="jCheckBox6" alignment="0" pref="142" max="32767" attributes="0"/>
+ <Component id="jCheckBox7" alignment="0" max="32767" attributes="0"/>
+ </Group>
+ <EmptySpace type="separate" max="-2" attributes="0"/>
+ <Group type="103" groupAlignment="0" attributes="0">
+ <Component id="jCheckBox8" alignment="0" pref="164" max="32767" attributes="0"/>
+ <Component id="jCheckBox9" alignment="0" pref="164" max="32767" attributes="0"/>
+ <Component id="jCheckBox10" alignment="0" pref="164" max="32767" attributes="0"/>
+ <Component id="jCheckBox11" alignment="0" max="32767" attributes="0"/>
+ <Component id="jCheckBox12" alignment="0" pref="164" max="32767" attributes="0"/>
+ </Group>
+ </Group>
+ </Group>
+ <EmptySpace min="-2" pref="156" max="-2" attributes="0"/>
+ </Group>
+ </Group>
+ </Group>
+ </Group>
+ </DimensionLayout>
+ <DimensionLayout dim="1">
+ <Group type="103" groupAlignment="0" attributes="0">
+ <Group type="102" alignment="0" attributes="0">
+ <EmptySpace max="-2" attributes="0"/>
+ <Component id="jLabel1" min="-2" max="-2" attributes="0"/>
+ <EmptySpace min="-2" pref="12" max="-2" attributes="0"/>
+ <Component id="jLabel2" min="-2" max="-2" attributes="0"/>
+ <EmptySpace max="-2" attributes="0"/>
+ <Group type="103" groupAlignment="0" attributes="0">
+ <Group type="102" alignment="0" attributes="0">
+ <Component id="jTextField1" min="-2" max="-2" attributes="0"/>
+ <EmptySpace max="-2" attributes="0"/>
+ <Component id="jLabel3" min="-2" max="-2" attributes="0"/>
+ <EmptySpace max="-2" attributes="0"/>
+ <Component id="jTextField2" min="-2" max="-2" attributes="0"/>
+ <EmptySpace min="-2" pref="16" max="-2" attributes="0"/>
+ <Component id="jLabel4" min="-2" max="-2" attributes="0"/>
+ <EmptySpace max="-2" attributes="0"/>
+ <Group type="103" groupAlignment="0" attributes="0">
+ <Group type="102" alignment="0" attributes="0">
+ <Component id="jCheckBox2" min="-2" max="-2" attributes="0"/>
+ <EmptySpace max="-2" attributes="0"/>
+ <Component id="jCheckBox3" min="-2" max="-2" attributes="0"/>
+ <EmptySpace max="-2" attributes="0"/>
+ <Component id="jCheckBox4" min="-2" max="-2" attributes="0"/>
+ <EmptySpace max="-2" attributes="0"/>
+ <Component id="jCheckBox5" min="-2" max="-2" attributes="0"/>
+ <EmptySpace max="-2" attributes="0"/>
+ <Component id="jCheckBox6" min="-2" max="-2" attributes="0"/>
+ <EmptySpace max="-2" attributes="0"/>
+ <Component id="jCheckBox7" min="-2" max="-2" attributes="0"/>
+ </Group>
+ <Group type="102" alignment="0" attributes="0">
+ <Component id="jCheckBox8" min="-2" max="-2" attributes="0"/>
+ <EmptySpace max="-2" attributes="0"/>
+ <Component id="jCheckBox9" min="-2" max="-2" attributes="0"/>
+ <EmptySpace max="-2" attributes="0"/>
+ <Component id="jCheckBox10" min="-2" max="-2" attributes="0"/>
+ <EmptySpace max="-2" attributes="0"/>
+ <Component id="jCheckBox11" min="-2" max="-2" attributes="0"/>
+ <EmptySpace max="-2" attributes="0"/>
+ <Component id="jCheckBox12" min="-2" max="-2" attributes="0"/>
+ </Group>
+ </Group>
+ </Group>
+ <Group type="102" alignment="0" attributes="0">
+ <Component id="jButton1" min="-2" max="-2" attributes="0"/>
+ <EmptySpace min="-2" pref="27" max="-2" attributes="0"/>
+ <Component id="jButton2" min="-2" max="-2" attributes="0"/>
+ </Group>
+ </Group>
+ <EmptySpace pref="9" max="32767" attributes="0"/>
+ <Group type="103" groupAlignment="3" attributes="0">
+ <Component id="jButton3" alignment="3" min="-2" max="-2" attributes="0"/>
+ <Component id="jButton4" alignment="3" min="-2" max="-2" attributes="0"/>
+ </Group>
+ <EmptySpace max="-2" attributes="0"/>
+ </Group>
+ </Group>
+ </DimensionLayout>
+ </Layout>
+ <SubComponents>
+ <Component class="javax.swing.JLabel" name="jLabel1">
+ <Properties>
+ <Property name="text" type="java.lang.String" value="保存されたログデータをCSVファイルに変換します"/>
+ </Properties>
+ </Component>
+ <Component class="javax.swing.JLabel" name="jLabel2">
+ <Properties>
+ <Property name="text" type="java.lang.String" value="ログファイルパス(元データ)"/>
+ </Properties>
+ </Component>
+ <Component class="javax.swing.JLabel" name="jLabel3">
+ <Properties>
+ <Property name="text" type="java.lang.String" value="出力CSVファイルパス"/>
+ </Properties>
+ </Component>
+ <Component class="javax.swing.JTextField" name="jTextField1">
+ </Component>
+ <Component class="javax.swing.JTextField" name="jTextField2">
+ <Properties>
+ <Property name="text" type="java.lang.String" value="./output.csv"/>
+ </Properties>
+ <Events>
+ <EventHandler event="actionPerformed" listener="java.awt.event.ActionListener" parameters="java.awt.event.ActionEvent" handler="jTextField2ActionPerformed"/>
+ </Events>
+ </Component>
+ <Component class="javax.swing.JButton" name="jButton1">
+ <Properties>
+ <Property name="text" type="java.lang.String" value="選択"/>
+ </Properties>
+ <Events>
+ <EventHandler event="actionPerformed" listener="java.awt.event.ActionListener" parameters="java.awt.event.ActionEvent" handler="jButton1ActionPerformed"/>
+ </Events>
+ </Component>
+ <Component class="javax.swing.JButton" name="jButton2">
+ <Properties>
+ <Property name="text" type="java.lang.String" value="選択"/>
+ </Properties>
+ <Events>
+ <EventHandler event="actionPerformed" listener="java.awt.event.ActionListener" parameters="java.awt.event.ActionEvent" handler="jButton2ActionPerformed"/>
+ </Events>
+ </Component>
+ <Component class="javax.swing.JLabel" name="jLabel4">
+ <Properties>
+ <Property name="text" type="java.lang.String" value="保存するデータ"/>
+ </Properties>
+ </Component>
+ <Component class="javax.swing.JCheckBox" name="jCheckBox2">
+ <Properties>
+ <Property name="selected" type="boolean" value="true"/>
+ <Property name="text" type="java.lang.String" value="ユーザ名"/>
+ </Properties>
+ <Events>
+ <EventHandler event="actionPerformed" listener="java.awt.event.ActionListener" parameters="java.awt.event.ActionEvent" handler="jCheckBox2ActionPerformed"/>
+ </Events>
+ </Component>
+ <Component class="javax.swing.JCheckBox" name="jCheckBox3">
+ <Properties>
+ <Property name="selected" type="boolean" value="true"/>
+ <Property name="text" type="java.lang.String" value="スクリーン名"/>
+ </Properties>
+ </Component>
+ <Component class="javax.swing.JCheckBox" name="jCheckBox4">
+ <Properties>
+ <Property name="selected" type="boolean" value="true"/>
+ <Property name="text" type="java.lang.String" value="更新日時"/>
+ </Properties>
+ </Component>
+ <Component class="javax.swing.JCheckBox" name="jCheckBox5">
+ <Properties>
+ <Property name="selected" type="boolean" value="true"/>
+ <Property name="text" type="java.lang.String" value="更新元"/>
+ </Properties>
+ </Component>
+ <Component class="javax.swing.JCheckBox" name="jCheckBox6">
+ <Properties>
+ <Property name="selected" type="boolean" value="true"/>
+ <Property name="text" type="java.lang.String" value="ユーザ紹介文"/>
+ </Properties>
+ <Events>
+ <EventHandler event="actionPerformed" listener="java.awt.event.ActionListener" parameters="java.awt.event.ActionEvent" handler="jCheckBox6ActionPerformed"/>
+ </Events>
+ </Component>
+ <Component class="javax.swing.JCheckBox" name="jCheckBox7">
+ <Properties>
+ <Property name="selected" type="boolean" value="true"/>
+ <Property name="text" type="java.lang.String" value="フォローしている数"/>
+ </Properties>
+ <Events>
+ <EventHandler event="actionPerformed" listener="java.awt.event.ActionListener" parameters="java.awt.event.ActionEvent" handler="jCheckBox7ActionPerformed"/>
+ </Events>
+ </Component>
+ <Component class="javax.swing.JCheckBox" name="jCheckBox8">
+ <Properties>
+ <Property name="selected" type="boolean" value="true"/>
+ <Property name="text" type="java.lang.String" value="フォローされている数"/>
+ </Properties>
+ </Component>
+ <Component class="javax.swing.JCheckBox" name="jCheckBox9">
+ <Properties>
+ <Property name="selected" type="boolean" value="true"/>
+ <Property name="text" type="java.lang.String" value="更新数"/>
+ </Properties>
+ </Component>
+ <Component class="javax.swing.JCheckBox" name="jCheckBox10">
+ <Properties>
+ <Property name="selected" type="boolean" value="true"/>
+ <Property name="text" type="java.lang.String" value="ユーザのURL"/>
+ </Properties>
+ </Component>
+ <Component class="javax.swing.JCheckBox" name="jCheckBox11">
+ <Properties>
+ <Property name="selected" type="boolean" value="true"/>
+ <Property name="text" type="java.lang.String" value="ユーザイメージのURL"/>
+ </Properties>
+ </Component>
+ <Component class="javax.swing.JCheckBox" name="jCheckBox12">
+ <Properties>
+ <Property name="selected" type="boolean" value="true"/>
+ <Property name="text" type="java.lang.String" value="ツイート"/>
+ </Properties>
+ </Component>
+ <Component class="javax.swing.JButton" name="jButton3">
+ <Properties>
+ <Property name="text" type="java.lang.String" value="出力"/>
+ </Properties>
+ <Events>
+ <EventHandler event="actionPerformed" listener="java.awt.event.ActionListener" parameters="java.awt.event.ActionEvent" handler="jButton3ActionPerformed"/>
+ </Events>
+ </Component>
+ <Component class="javax.swing.JButton" name="jButton4">
+ <Properties>
+ <Property name="text" type="java.lang.String" value="キャンセル"/>
+ </Properties>
+ <Events>
+ <EventHandler event="actionPerformed" listener="java.awt.event.ActionListener" parameters="java.awt.event.ActionEvent" handler="jButton4ActionPerformed"/>
+ </Events>
+ </Component>
+ </SubComponents>
+ </Container>
+ </SubComponents>
+</Form>
--- /dev/null
+/*
+ * To change this template, choose Tools | Templates
+ * and open the template in the editor.
+ */
+
+/*
+ * OutputCSVLogDialog.java
+ *
+ * Created on 2011/05/07, 19:19:29
+ */
+
+package twitter.gui.form;
+
+import java.io.File;
+import java.io.IOException;
+import java.util.logging.Level;
+import java.util.logging.Logger;
+import javax.swing.JFileChooser;
+import javax.swing.JOptionPane;
+import javax.swing.filechooser.FileFilter;
+import org.xml.sax.SAXParseException;
+import twitter.gui.action.TweetMainAction;
+
+/**
+ *
+ * @author nishio
+ */
+public class OutputCSVLogDialog extends javax.swing.JDialog {
+
+ /** Creates new form OutputCSVLogDialog */
+ public OutputCSVLogDialog(java.awt.Frame parent, boolean modal, TweetMainAction mainAction) {
+ super(parent, modal);
+ initComponents();
+ this.mainAction = mainAction;
+ }
+
+ /** 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() {
+
+ jCheckBox1 = new javax.swing.JCheckBox();
+ jPanel1 = new javax.swing.JPanel();
+ jLabel1 = new javax.swing.JLabel();
+ jLabel2 = new javax.swing.JLabel();
+ jLabel3 = new javax.swing.JLabel();
+ jTextField1 = new javax.swing.JTextField();
+ jTextField2 = new javax.swing.JTextField();
+ jButton1 = new javax.swing.JButton();
+ jButton2 = new javax.swing.JButton();
+ jLabel4 = new javax.swing.JLabel();
+ jCheckBox2 = new javax.swing.JCheckBox();
+ jCheckBox3 = new javax.swing.JCheckBox();
+ jCheckBox4 = new javax.swing.JCheckBox();
+ jCheckBox5 = new javax.swing.JCheckBox();
+ jCheckBox6 = new javax.swing.JCheckBox();
+ jCheckBox7 = new javax.swing.JCheckBox();
+ jCheckBox8 = new javax.swing.JCheckBox();
+ jCheckBox9 = new javax.swing.JCheckBox();
+ jCheckBox10 = new javax.swing.JCheckBox();
+ jCheckBox11 = new javax.swing.JCheckBox();
+ jCheckBox12 = new javax.swing.JCheckBox();
+ jButton3 = new javax.swing.JButton();
+ jButton4 = new javax.swing.JButton();
+
+ jCheckBox1.setText("jCheckBox1");
+
+ setDefaultCloseOperation(javax.swing.WindowConstants.DISPOSE_ON_CLOSE);
+ setTitle("Output CSV Log");
+
+ jLabel1.setText("保存されたログデータをCSVファイルに変換します");
+
+ jLabel2.setText("ログファイルパス(元データ)");
+
+ jLabel3.setText("出力CSVファイルパス");
+
+ jTextField2.setText("./output.csv");
+ jTextField2.addActionListener(new java.awt.event.ActionListener() {
+ public void actionPerformed(java.awt.event.ActionEvent evt) {
+ jTextField2ActionPerformed(evt);
+ }
+ });
+
+ jButton1.setText("選択");
+ jButton1.addActionListener(new java.awt.event.ActionListener() {
+ public void actionPerformed(java.awt.event.ActionEvent evt) {
+ jButton1ActionPerformed(evt);
+ }
+ });
+
+ jButton2.setText("選択");
+ jButton2.addActionListener(new java.awt.event.ActionListener() {
+ public void actionPerformed(java.awt.event.ActionEvent evt) {
+ jButton2ActionPerformed(evt);
+ }
+ });
+
+ jLabel4.setText("保存するデータ");
+
+ jCheckBox2.setSelected(true);
+ jCheckBox2.setText("ユーザ名");
+ jCheckBox2.addActionListener(new java.awt.event.ActionListener() {
+ public void actionPerformed(java.awt.event.ActionEvent evt) {
+ jCheckBox2ActionPerformed(evt);
+ }
+ });
+
+ jCheckBox3.setSelected(true);
+ jCheckBox3.setText("スクリーン名");
+
+ jCheckBox4.setSelected(true);
+ jCheckBox4.setText("更新日時");
+
+ jCheckBox5.setSelected(true);
+ jCheckBox5.setText("更新元");
+
+ jCheckBox6.setSelected(true);
+ jCheckBox6.setText("ユーザ紹介文");
+ jCheckBox6.addActionListener(new java.awt.event.ActionListener() {
+ public void actionPerformed(java.awt.event.ActionEvent evt) {
+ jCheckBox6ActionPerformed(evt);
+ }
+ });
+
+ jCheckBox7.setSelected(true);
+ jCheckBox7.setText("フォローしている数");
+ jCheckBox7.addActionListener(new java.awt.event.ActionListener() {
+ public void actionPerformed(java.awt.event.ActionEvent evt) {
+ jCheckBox7ActionPerformed(evt);
+ }
+ });
+
+ jCheckBox8.setSelected(true);
+ jCheckBox8.setText("フォローされている数");
+
+ jCheckBox9.setSelected(true);
+ jCheckBox9.setText("更新数");
+
+ jCheckBox10.setSelected(true);
+ jCheckBox10.setText("ユーザのURL");
+
+ jCheckBox11.setSelected(true);
+ jCheckBox11.setText("ユーザイメージのURL");
+
+ jCheckBox12.setSelected(true);
+ jCheckBox12.setText("ツイート");
+
+ jButton3.setText("出力");
+ jButton3.addActionListener(new java.awt.event.ActionListener() {
+ public void actionPerformed(java.awt.event.ActionEvent evt) {
+ jButton3ActionPerformed(evt);
+ }
+ });
+
+ jButton4.setText("キャンセル");
+ jButton4.addActionListener(new java.awt.event.ActionListener() {
+ public void actionPerformed(java.awt.event.ActionEvent evt) {
+ jButton4ActionPerformed(evt);
+ }
+ });
+
+ 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()
+ .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
+ .addGroup(jPanel1Layout.createSequentialGroup()
+ .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
+ .addComponent(jLabel2)
+ .addGroup(jPanel1Layout.createSequentialGroup()
+ .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)
+ .addComponent(jLabel3, javax.swing.GroupLayout.Alignment.LEADING)
+ .addComponent(jLabel1, javax.swing.GroupLayout.Alignment.LEADING, javax.swing.GroupLayout.DEFAULT_SIZE, 327, Short.MAX_VALUE)
+ .addComponent(jTextField2, javax.swing.GroupLayout.Alignment.LEADING, javax.swing.GroupLayout.DEFAULT_SIZE, 327, Short.MAX_VALUE)
+ .addComponent(jTextField1, javax.swing.GroupLayout.Alignment.LEADING, javax.swing.GroupLayout.DEFAULT_SIZE, 327, Short.MAX_VALUE)
+ .addComponent(jButton3, javax.swing.GroupLayout.PREFERRED_SIZE, 125, javax.swing.GroupLayout.PREFERRED_SIZE))
+ .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
+ .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)
+ .addComponent(jButton4, javax.swing.GroupLayout.DEFAULT_SIZE, 129, Short.MAX_VALUE)
+ .addComponent(jButton1, javax.swing.GroupLayout.Alignment.LEADING, javax.swing.GroupLayout.DEFAULT_SIZE, 129, Short.MAX_VALUE)
+ .addComponent(jButton2, javax.swing.GroupLayout.Alignment.LEADING, javax.swing.GroupLayout.DEFAULT_SIZE, 129, Short.MAX_VALUE))))
+ .addContainerGap())
+ .addGroup(jPanel1Layout.createSequentialGroup()
+ .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
+ .addGroup(jPanel1Layout.createSequentialGroup()
+ .addComponent(jLabel4)
+ .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, 228, javax.swing.GroupLayout.PREFERRED_SIZE))
+ .addGroup(jPanel1Layout.createSequentialGroup()
+ .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
+ .addComponent(jCheckBox2, javax.swing.GroupLayout.DEFAULT_SIZE, 142, Short.MAX_VALUE)
+ .addComponent(jCheckBox3, javax.swing.GroupLayout.DEFAULT_SIZE, 142, Short.MAX_VALUE)
+ .addComponent(jCheckBox4, javax.swing.GroupLayout.DEFAULT_SIZE, 142, Short.MAX_VALUE)
+ .addComponent(jCheckBox5, javax.swing.GroupLayout.DEFAULT_SIZE, 142, Short.MAX_VALUE)
+ .addComponent(jCheckBox6, javax.swing.GroupLayout.DEFAULT_SIZE, 142, Short.MAX_VALUE)
+ .addComponent(jCheckBox7, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
+ .addGap(18, 18, 18)
+ .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
+ .addComponent(jCheckBox8, javax.swing.GroupLayout.DEFAULT_SIZE, 164, Short.MAX_VALUE)
+ .addComponent(jCheckBox9, javax.swing.GroupLayout.DEFAULT_SIZE, 164, Short.MAX_VALUE)
+ .addComponent(jCheckBox10, javax.swing.GroupLayout.DEFAULT_SIZE, 164, Short.MAX_VALUE)
+ .addComponent(jCheckBox11, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
+ .addComponent(jCheckBox12, javax.swing.GroupLayout.DEFAULT_SIZE, 164, Short.MAX_VALUE))))
+ .addGap(156, 156, 156))))
+ );
+ jPanel1Layout.setVerticalGroup(
+ jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
+ .addGroup(jPanel1Layout.createSequentialGroup()
+ .addContainerGap()
+ .addComponent(jLabel1)
+ .addGap(12, 12, 12)
+ .addComponent(jLabel2)
+ .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
+ .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
+ .addGroup(jPanel1Layout.createSequentialGroup()
+ .addComponent(jTextField1, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
+ .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
+ .addComponent(jLabel3)
+ .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
+ .addComponent(jTextField2, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
+ .addGap(16, 16, 16)
+ .addComponent(jLabel4)
+ .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
+ .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
+ .addGroup(jPanel1Layout.createSequentialGroup()
+ .addComponent(jCheckBox2)
+ .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
+ .addComponent(jCheckBox3)
+ .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
+ .addComponent(jCheckBox4)
+ .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
+ .addComponent(jCheckBox5)
+ .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
+ .addComponent(jCheckBox6)
+ .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
+ .addComponent(jCheckBox7))
+ .addGroup(jPanel1Layout.createSequentialGroup()
+ .addComponent(jCheckBox8)
+ .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
+ .addComponent(jCheckBox9)
+ .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
+ .addComponent(jCheckBox10)
+ .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
+ .addComponent(jCheckBox11)
+ .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
+ .addComponent(jCheckBox12))))
+ .addGroup(jPanel1Layout.createSequentialGroup()
+ .addComponent(jButton1)
+ .addGap(27, 27, 27)
+ .addComponent(jButton2)))
+ .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, 9, Short.MAX_VALUE)
+ .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
+ .addComponent(jButton3)
+ .addComponent(jButton4))
+ .addContainerGap())
+ );
+
+ javax.swing.GroupLayout layout = new javax.swing.GroupLayout(getContentPane());
+ getContentPane().setLayout(layout);
+ layout.setHorizontalGroup(
+ layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
+ .addComponent(jPanel1, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
+ );
+ layout.setVerticalGroup(
+ layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
+ .addComponent(jPanel1, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
+ );
+
+ pack();
+ }// </editor-fold>//GEN-END:initComponents
+
+ private void jTextField2ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jTextField2ActionPerformed
+
+ }//GEN-LAST:event_jTextField2ActionPerformed
+
+ private void jButton2ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jButton2ActionPerformed
+ JFileChooser chooser = new JFileChooser(".");
+ //.logファイルだけ読み取れるようにする)
+ FileFilter filter1 = new ExtensionFileFilter("CSV File(.csv)", new String[] { "csv" });
+ chooser.setFileFilter(filter1);
+
+ int selected = chooser.showSaveDialog(this);
+ if( selected == JFileChooser.APPROVE_OPTION ) {
+ File selectedFile = chooser.getSelectedFile();
+ String path = selectedFile.getAbsolutePath();
+ if(!path.endsWith(".csv") ) {
+ path = path + ".csv";
+ }
+ //絶対パスをセット
+ jTextField2.setText( path );
+ }
+ }//GEN-LAST:event_jButton2ActionPerformed
+
+ private void jCheckBox2ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jCheckBox2ActionPerformed
+ // TODO add your handling code here:
+ }//GEN-LAST:event_jCheckBox2ActionPerformed
+
+ private void jCheckBox6ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jCheckBox6ActionPerformed
+ // TODO add your handling code here:
+ }//GEN-LAST:event_jCheckBox6ActionPerformed
+
+ private void jCheckBox7ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jCheckBox7ActionPerformed
+ // TODO add your handling code here:
+ }//GEN-LAST:event_jCheckBox7ActionPerformed
+
+ private void jButton1ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jButton1ActionPerformed
+ JFileChooser chooser = new JFileChooser(".");
+ //.logファイルだけ読み取れるようにする)
+ FileFilter filter1 = new ExtensionFileFilter("Nishio Tweet Manager Log(.log)", new String[] { "log" });
+ chooser.setFileFilter(filter1);
+
+ int selected = chooser.showOpenDialog(this);
+ if( selected == JFileChooser.APPROVE_OPTION ) {
+ File selectedFile = chooser.getSelectedFile();
+ String path = selectedFile.getAbsolutePath();
+ //絶対パスをセット
+ jTextField1.setText( path );
+ }
+ }//GEN-LAST:event_jButton1ActionPerformed
+
+ private void jButton4ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jButton4ActionPerformed
+ this.setVisible(false);
+ }//GEN-LAST:event_jButton4ActionPerformed
+
+ private void jButton3ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jButton3ActionPerformed
+ String sourcePath = jTextField1.getText();
+ String destPath = jTextField2.getText();
+ boolean showUsername = jCheckBox2.isSelected();
+ boolean showScreenName = jCheckBox3.isSelected();
+ boolean showText = jCheckBox12.isSelected();
+ boolean showUpdateTime = jCheckBox4.isSelected();
+ boolean showClient = jCheckBox5.isSelected();
+ boolean showUserDescription = jCheckBox6.isSelected();
+ boolean showFollowing = jCheckBox7.isSelected();
+ boolean showFollower = jCheckBox8.isSelected();
+ boolean showUpdateCount = jCheckBox9.isSelected();
+ boolean showUserURL = jCheckBox10.isSelected();
+ boolean showProfileImageURL = jCheckBox11.isSelected();
+ try {
+ //CSV出力
+ this.mainAction.outputLogToCSV(sourcePath, destPath, showUsername, showScreenName,
+ showText, showUpdateTime, showClient, showUserDescription,
+ showFollowing, showFollower, showUpdateCount, showUserURL, showProfileImageURL);
+ //ダイアログを消す
+ this.setVisible(false);
+ } catch (SAXParseException ex) {
+ Logger.getLogger(OutputCSVLogDialog.class.getName()).log(Level.SEVERE, null, ex);
+ JOptionPane.showMessageDialog(null, "ログファイルの解析に失敗しました。正しいデータかどうか確認してください。",
+ "Parse error", JOptionPane.ERROR_MESSAGE);
+ } catch (IOException ex) {
+ Logger.getLogger(OutputCSVLogDialog.class.getName()).log(Level.SEVERE, null, ex);
+ JOptionPane.showMessageDialog(null, "ログファイルの読み込み、及び出力に失敗しました。",
+ "output error", JOptionPane.ERROR_MESSAGE);
+ }
+ }//GEN-LAST:event_jButton3ActionPerformed
+
+
+ // Variables declaration - do not modify//GEN-BEGIN:variables
+ private javax.swing.JButton jButton1;
+ private javax.swing.JButton jButton2;
+ private javax.swing.JButton jButton3;
+ private javax.swing.JButton jButton4;
+ private javax.swing.JCheckBox jCheckBox1;
+ private javax.swing.JCheckBox jCheckBox10;
+ private javax.swing.JCheckBox jCheckBox11;
+ private javax.swing.JCheckBox jCheckBox12;
+ private javax.swing.JCheckBox jCheckBox2;
+ private javax.swing.JCheckBox jCheckBox3;
+ private javax.swing.JCheckBox jCheckBox4;
+ private javax.swing.JCheckBox jCheckBox5;
+ private javax.swing.JCheckBox jCheckBox6;
+ private javax.swing.JCheckBox jCheckBox7;
+ private javax.swing.JCheckBox jCheckBox8;
+ private javax.swing.JCheckBox jCheckBox9;
+ private javax.swing.JLabel jLabel1;
+ private javax.swing.JLabel jLabel2;
+ private javax.swing.JLabel jLabel3;
+ private javax.swing.JLabel jLabel4;
+ private javax.swing.JPanel jPanel1;
+ private javax.swing.JTextField jTextField1;
+ private javax.swing.JTextField jTextField2;
+ // End of variables declaration//GEN-END:variables
+
+ private TweetMainAction mainAction = null;
+}
+
+/**
+ * File Filter
+ * @author nishio
+ */
+class ExtensionFileFilter extends FileFilter {
+ String description;
+
+ String extensions[];
+
+ public ExtensionFileFilter(String description, String extension) {
+ this(description, new String[] { extension });
+ }
+
+ public ExtensionFileFilter(String description, String extensions[]) {
+ if (description == null) {
+ this.description = extensions[0];
+ } else {
+ this.description = description;
+ }
+ this.extensions = (String[]) extensions.clone();
+ toLower(this.extensions);
+ }
+
+ private void toLower(String array[]) {
+ for (int i = 0, n = array.length; i < n; i++) {
+ array[i] = array[i].toLowerCase();
+ }
+ }
+
+ public String getDescription() {
+ return description;
+ }
+
+ public boolean accept(File file) {
+ if (file.isDirectory()) {
+ return true;
+ } else {
+ String path = file.getAbsolutePath().toLowerCase();
+ for (int i = 0, n = extensions.length; i < n; i++) {
+ String extension = extensions[i];
+ if ((path.endsWith(extension) && (path.charAt(path.length() - extension.length() - 1)) == '.')) {
+ return true;
+ }
+ }
+ }
+ return false;
+ }
+}
+
+