OSDN Git Service

置換文字設定を削除
[coroid/inqubus.git] / frontend / src / yukihane / inqubus / gui / ConfigDialog.java
index 088c928..87f8d2b 100644 (file)
@@ -12,9 +12,10 @@ import java.awt.event.ActionEvent;
 import java.awt.event.ActionListener;
 import java.io.File;
 import java.util.List;
-import java.util.logging.Level;
-import java.util.logging.Logger;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
 import javax.swing.BorderFactory;
+import javax.swing.ButtonGroup;
 import javax.swing.ComboBoxModel;
 import javax.swing.DefaultComboBoxModel;
 import javax.swing.GroupLayout;
@@ -27,14 +28,17 @@ import javax.swing.JFileChooser;
 import javax.swing.JFrame;
 import javax.swing.JLabel;
 import javax.swing.JPanel;
+import javax.swing.JPasswordField;
+import javax.swing.JRadioButton;
+import javax.swing.JSpinner;
 import javax.swing.JTabbedPane;
 import javax.swing.JTextField;
 import javax.swing.LayoutStyle.ComponentPlacement;
-import javax.swing.UIManager;
-import javax.swing.UnsupportedLookAndFeelException;
+import javax.swing.SpinnerNumberModel;
 import javax.swing.WindowConstants;
 import org.apache.commons.configuration.ConfigurationException;
-import yukihane.inqubus.Config;
+import yukihane.inqubus.config.Config;
+import yukihane.inqubus.config.Config.CookieBrowser;
 
 /**
  *
@@ -42,7 +46,8 @@ import yukihane.inqubus.Config;
  */
 public class ConfigDialog extends JDialog {
     private static final long serialVersionUID = 1L;
-    private static final Logger logger = Logger.getLogger(ConfigDialog.class.getName());
+    private static final Logger logger = LoggerFactory.getLogger(ConfigDialog.class);
+    private static final String NEED_REBOOT = "設定を有効にするにはいんきゅばすの再起動が必要です";
 
     /** Creates new form Properties */
     public ConfigDialog() {
@@ -55,16 +60,12 @@ public class ConfigDialog extends JDialog {
         final JTabbedPane tabbedPane = new JTabbedPane();
         final JPanel pnlNetwork = new JPanel();
         final JPanel pnlAccount = new JPanel();
-        final JLabel lblMail = new JLabel();
         fldMail = new JTextField();
-        final JLabel lblPassword = new JLabel();
-        fldPassword = new JTextField();
+        fldPassword.setEchoChar('*');
         final JPanel pnlProxy = new JPanel();
         cbProxyUse = new JCheckBox();
         final JLabel lblProxyHost = new JLabel();
         final JLabel lblProxyPort = new JLabel();
-        fldProxyHost = new JTextField();
-        fldProxyPort = new JTextField();
         final JPanel pnlFile = new JPanel();
         final JPanel pnlFileOutput = new JPanel();
         final JLabel lblOutputDir = new JLabel();
@@ -77,17 +78,11 @@ public class ConfigDialog extends JDialog {
         final JPanel pnlComment = new JPanel();
         final JPanel pnlCommentStandard = new JPanel();
         final JLabel lblCommentSize = new JLabel();
-        cbCommentSizeAuto = new JCheckBox();
         final JLabel lblCommentSizeManual = new JLabel();
-        fldCommentSizeManual = new JTextField();
         final JLabel lblCommentMinSize = new JLabel();
-        cbCommentMinSizeAuto = new JCheckBox();
-        fldCommentMinSizeManual = new JTextField();
         final JLabel lblCommentMinSizeManual = new JLabel();
         final JLabel lblCommentDisplayMax = new JLabel();
-        cbCommentDisplaySizeDefault = new JCheckBox();
         final JLabel lblCommentDisplayMaxManual = new JLabel();
-        fldCommentDisplaySizeManual = new JTextField();
         final JPanel pnlCommentAdvanced = new JPanel();
         final JLabel lblFontPath = new JLabel();
         cbFontSizeArrangeDisable = new JCheckBox();
@@ -97,11 +92,10 @@ public class ConfigDialog extends JDialog {
         final JLabel lblFontShadow = new JLabel();
         fldFontIndex = new JTextField();
         final JPanel pnlFfmpeg = new JPanel();
-        final JPanel jPanel10 = new JPanel();
-        final JLabel lblFfmpegPath = new JLabel();
-        final JLabel lblFfmpegDllPath = new JLabel();
-        fldFfmpegPath = new JTextField();
-        fldFfmpegDllPath = new JTextField();
+        final JPanel pnlFfmpegBinPath = new JPanel();
+        final JLabel lblFfmpegPath = new JLabel("ffmpeg");
+        final JLabel lblFfmpegDllPath = new JLabel("拡張ライブラリ");
+        final JLabel lblMediaInfoPath = new JLabel("MediaInfo");
         final JPanel pnlNgSetting = new JPanel();
         final JPanel pnlSearch = new JPanel();
 
@@ -111,29 +105,34 @@ public class ConfigDialog extends JDialog {
 
         pnlAccount.setBorder(BorderFactory.createTitledBorder("アカウント"));
 
-        lblMail.setText("ID(メールアドレス)");
-
-        lblPassword.setText("パスワード");
+        final JLabel lblMail = new JLabel("ID(メールアドレス)");
+        final JLabel lblPassword = new JLabel("パスワード");
 
         GroupLayout gl_pnlAccount = new GroupLayout(pnlAccount);
         pnlAccount.setLayout(gl_pnlAccount);
-        gl_pnlAccount.setHorizontalGroup(
-            gl_pnlAccount.createParallelGroup(GroupLayout.Alignment.LEADING)
+        gl_pnlAccount.setHorizontalGroup(gl_pnlAccount.createParallelGroup(GroupLayout.Alignment.LEADING)
+            .addComponent(btnAccount)
             .addGroup(gl_pnlAccount.createSequentialGroup()
                 .addContainerGap()
+                .addGap(10)
                 .addGroup(gl_pnlAccount.createParallelGroup(GroupLayout.Alignment.LEADING)
                     .addComponent(lblMail)
-                    .addComponent(lblPassword))
+                    .addComponent(lblPassword)
+                )
                 .addPreferredGap(ComponentPlacement.RELATED)
                 .addGroup(gl_pnlAccount.createParallelGroup(GroupLayout.Alignment.LEADING)
                     .addComponent(fldPassword, GroupLayout.DEFAULT_SIZE, 306, Short.MAX_VALUE)
-                    .addComponent(fldMail, GroupLayout.DEFAULT_SIZE, 306, Short.MAX_VALUE))
-                .addContainerGap())
+                    .addComponent(fldMail, GroupLayout.DEFAULT_SIZE, 306, Short.MAX_VALUE)
+                )
+                .addContainerGap()
+            )
         );
         gl_pnlAccount.setVerticalGroup(
             gl_pnlAccount.createParallelGroup(GroupLayout.Alignment.LEADING)
             .addGroup(gl_pnlAccount.createSequentialGroup()
                 .addContainerGap()
+                .addComponent(btnAccount)
+                .addPreferredGap(ComponentPlacement.RELATED)
                 .addGroup(gl_pnlAccount.createParallelGroup(GroupLayout.Alignment.BASELINE)
                     .addComponent(lblMail)
                     .addComponent(fldMail, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE, GroupLayout.PREFERRED_SIZE))
@@ -144,6 +143,63 @@ public class ConfigDialog extends JDialog {
                 .addContainerGap(GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
         );
 
+
+        final JButton btnCookie = new JButton("...");
+        btnCookie.addActionListener(new FileChooseActionListener(this, JFileChooser.FILES_AND_DIRECTORIES, fldCookie));
+
+        final ButtonGroup grpLoginType = new ButtonGroup();
+        grpLoginType.add(btnAccount);
+        grpLoginType.add(btnLoginCookie);
+
+        final ButtonGroup grpCookie = new ButtonGroup();
+        grpCookie.add(btnCookieIe);
+        grpCookie.add(btnCookieFirefox);
+        grpCookie.add(btnCookieChrome);
+        grpCookie.add(btnCookieChromium);
+        grpCookie.add(btnCookieOpera);
+        grpCookie.add(btnCookieOther);
+
+        final JPanel pnlCookie = new JPanel();
+        pnlCookie.setBorder(BorderFactory.createTitledBorder("cookie"));
+        final GroupLayout glCookie = new GroupLayout(pnlCookie);
+        pnlCookie.setLayout(glCookie);
+        glCookie.setAutoCreateContainerGaps(true);
+        glCookie.setAutoCreateGaps(true);
+
+        glCookie.setHorizontalGroup(glCookie.createParallelGroup()
+            .addComponent(btnLoginCookie)
+            .addGroup(glCookie.createSequentialGroup()
+                .addGap(10)
+                .addGroup(glCookie.createParallelGroup()
+                    .addComponent(btnCookieIe)
+                    .addComponent(btnCookieFirefox)
+                    .addComponent(btnCookieChrome)
+                    .addComponent(btnCookieChromium)
+                    .addComponent(btnCookieOpera)
+                    .addComponent(btnCookieOther)
+                    .addGroup(glCookie.createSequentialGroup()
+                        .addComponent(fldCookie)
+                        .addComponent(btnCookie)
+                    )
+                )
+            )
+        );
+
+        glCookie.setVerticalGroup(glCookie.createSequentialGroup()
+            .addComponent(btnLoginCookie)
+            .addComponent(btnCookieIe)
+            .addComponent(btnCookieFirefox)
+            .addComponent(btnCookieChrome)
+            .addComponent(btnCookieChromium)
+            .addComponent(btnCookieOpera)
+            .addComponent(btnCookieOther)
+            .addGroup(glCookie.createParallelGroup(Alignment.BASELINE)
+                .addComponent(fldCookie)
+                .addComponent(btnCookie)
+            )
+        );
+
+
         pnlProxy.setBorder(BorderFactory.createTitledBorder("プロキシ"));
 
         cbProxyUse.setText("プロキシを使用する");
@@ -183,9 +239,10 @@ public class ConfigDialog extends JDialog {
                 .addGroup(gl_pnlProxy.createParallelGroup(GroupLayout.Alignment.BASELINE)
                     .addComponent(lblProxyPort)
                     .addComponent(fldProxyPort, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE, GroupLayout.PREFERRED_SIZE))
-                .addContainerGap(39, Short.MAX_VALUE))
+                .addContainerGap())
         );
 
+
         GroupLayout gl_pnlNetwork = new GroupLayout(pnlNetwork);
         pnlNetwork.setLayout(gl_pnlNetwork);
         gl_pnlNetwork.setHorizontalGroup(
@@ -193,8 +250,10 @@ public class ConfigDialog extends JDialog {
             .addGroup(GroupLayout.Alignment.TRAILING, gl_pnlNetwork.createSequentialGroup()
                 .addContainerGap()
                 .addGroup(gl_pnlNetwork.createParallelGroup(GroupLayout.Alignment.TRAILING)
+                    .addComponent(pnlAccount, GroupLayout.Alignment.LEADING, GroupLayout.DEFAULT_SIZE, GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
+                    .addComponent(pnlCookie, GroupLayout.Alignment.LEADING, GroupLayout.DEFAULT_SIZE, GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                     .addComponent(pnlProxy, GroupLayout.Alignment.LEADING, GroupLayout.DEFAULT_SIZE, GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
-                    .addComponent(pnlAccount, GroupLayout.Alignment.LEADING, GroupLayout.DEFAULT_SIZE, GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
+                )
                 .addContainerGap())
         );
         gl_pnlNetwork.setVerticalGroup(
@@ -203,8 +262,11 @@ public class ConfigDialog extends JDialog {
                 .addContainerGap()
                 .addComponent(pnlAccount, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE, GroupLayout.PREFERRED_SIZE)
                 .addPreferredGap(ComponentPlacement.RELATED)
+                .addComponent(pnlCookie, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE, GroupLayout.PREFERRED_SIZE)
+                .addPreferredGap(ComponentPlacement.RELATED)
                 .addComponent(pnlProxy, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE, GroupLayout.PREFERRED_SIZE)
-                .addContainerGap(178, Short.MAX_VALUE))
+                .addContainerGap()
+            )
         );
 
         tabbedPane.addTab("ネットワーク", pnlNetwork);
@@ -220,7 +282,7 @@ public class ConfigDialog extends JDialog {
         lblOutputFileNamePattern.setText("ファイル名規則");
 
         btnOutputDir.addActionListener(
-                new FileChooseAction(ConfigDialog.this, JFileChooser.DIRECTORIES_ONLY, fldOutputDir));
+                new FileChooseActionListener(ConfigDialog.this, JFileChooser.DIRECTORIES_ONLY, fldOutputDir));
 
         cbOutputEnable.setText("変換");
 
@@ -272,38 +334,6 @@ public class ConfigDialog extends JDialog {
                 .addContainerGap(GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
         );
 
-        final JPanel pnlFileProhibit = new JPanel();
-        pnlFileProhibit.setBorder(BorderFactory.createTitledBorder("禁則文字"));
-        final JLabel lblReplaceFrom = new JLabel("置換対象文字");
-        final JLabel lblReplaceTo = new JLabel("置換後文字");
-
-        final GroupLayout glProhibit = new GroupLayout(pnlFileProhibit);
-        glProhibit.setAutoCreateContainerGaps(true);
-        glProhibit.setAutoCreateGaps(true);
-        pnlFileProhibit.setLayout(glProhibit);
-
-        glProhibit.setHorizontalGroup(glProhibit.createSequentialGroup()
-            .addGroup(glProhibit.createParallelGroup()
-                .addComponent(lblReplaceFrom)
-                .addComponent(lblReplaceTo)
-            )
-            .addGroup(glProhibit.createParallelGroup()
-                .addComponent(fldReplaceFrom)
-                .addComponent(fldReplaceTo)
-            )
-        );
-
-        glProhibit.setVerticalGroup(glProhibit.createSequentialGroup()
-            .addGroup(glProhibit.createParallelGroup(Alignment.BASELINE)
-                .addComponent(lblReplaceFrom)
-                .addComponent(fldReplaceFrom)
-            )
-            .addGroup(glProhibit.createParallelGroup(Alignment.BASELINE)
-                .addComponent(lblReplaceTo)
-                .addComponent(fldReplaceTo)
-            )
-        );
-
         GroupLayout gl_pnlFile = new GroupLayout(pnlFile);
         pnlFile.setLayout(gl_pnlFile);
         gl_pnlFile.setHorizontalGroup(
@@ -314,7 +344,6 @@ public class ConfigDialog extends JDialog {
                     .addComponent(pnlFileOutput, GroupLayout.Alignment.LEADING, GroupLayout.DEFAULT_SIZE, GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                     .addComponent(pnlFileVideo, GroupLayout.DEFAULT_SIZE, GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                     .addComponent(pnlFileComment, GroupLayout.Alignment.LEADING, GroupLayout.DEFAULT_SIZE, GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
-                    .addComponent(pnlFileProhibit, GroupLayout.Alignment.LEADING, GroupLayout.DEFAULT_SIZE, GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                 )
                 .addContainerGap())
         );
@@ -328,7 +357,6 @@ public class ConfigDialog extends JDialog {
                 .addPreferredGap(ComponentPlacement.RELATED)
                 .addComponent(pnlFileOutput, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE, GroupLayout.PREFERRED_SIZE)
                 .addPreferredGap(ComponentPlacement.RELATED)
-                .addComponent(pnlFileProhibit, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE, GroupLayout.PREFERRED_SIZE)
                 .addContainerGap())
         );
 
@@ -338,20 +366,14 @@ public class ConfigDialog extends JDialog {
 
         lblCommentSize.setText("再生時間に応じたコメントの取得数");
 
-        cbCommentSizeAuto.setText("自動調整");
-
         lblCommentSizeManual.setText("手動取得");
 
         lblCommentMinSize.setText("1分当たりのコメント取得数");
 
-        cbCommentMinSizeAuto.setText("自動調整");
-
         lblCommentMinSizeManual.setText("手動取得");
 
         lblCommentDisplayMax.setText("1画面に表示する最大コメント数");
 
-        cbCommentDisplaySizeDefault.setText("標準(30)");
-
         lblCommentDisplayMaxManual.setText("手動設定");
 
         GroupLayout gl_pnlCommentStandard = new GroupLayout(pnlCommentStandard);
@@ -366,6 +388,7 @@ public class ConfigDialog extends JDialog {
                     .addComponent(lblCommentDisplayMax))
                 .addGroup(gl_pnlCommentStandard.createParallelGroup(GroupLayout.Alignment.LEADING)
                     .addComponent(cbCommentSizeAuto)
+                    .addComponent(cbCommentMinDisable)
                     .addComponent(cbCommentMinSizeAuto)
                     .addComponent(cbCommentDisplaySizeDefault))
                 .addGroup(gl_pnlCommentStandard.createParallelGroup(GroupLayout.Alignment.LEADING)
@@ -386,6 +409,9 @@ public class ConfigDialog extends JDialog {
                     .addComponent(fldCommentSizeManual))
                 .addGroup(gl_pnlCommentStandard.createParallelGroup(GroupLayout.Alignment.BASELINE)
                     .addComponent(lblCommentMinSize)
+                    .addComponent(cbCommentMinDisable)
+                )
+                .addGroup(gl_pnlCommentStandard.createParallelGroup(GroupLayout.Alignment.BASELINE)
                     .addComponent(cbCommentMinSizeAuto)
                     .addComponent(lblCommentMinSizeManual)
                     .addComponent(fldCommentMinSizeManual))
@@ -406,7 +432,7 @@ public class ConfigDialog extends JDialog {
 
         final JButton btnFontPath = new JButton("...");
         btnFontPath.addActionListener(
-                new FileChooseAction(ConfigDialog.this, JFileChooser.FILES_ONLY, fldFontPath));
+                new FileChooseActionListener(ConfigDialog.this, JFileChooser.FILES_ONLY, fldFontPath));
 
         lblFontIndex.setText("フォント番号");
 
@@ -484,38 +510,43 @@ public class ConfigDialog extends JDialog {
 
         tabbedPane.addTab("コメント", pnlComment);
 
-        jPanel10.setBorder(BorderFactory.createTitledBorder("ファイルパス"));
-
-        lblFfmpegPath.setText("ffmpeg");
-
-        lblFfmpegDllPath.setText("拡張ライブラリ");
+        pnlFfmpegBinPath.setBorder(BorderFactory.createTitledBorder("ファイルパス"));
 
         final JButton btnFfmpegPath = new JButton("...");
         btnFfmpegPath.addActionListener(
-                new FileChooseAction(ConfigDialog.this, JFileChooser.FILES_ONLY, fldFfmpegPath));
+                new FileChooseActionListener(ConfigDialog.this, JFileChooser.FILES_ONLY, fldFfmpegPath));
 
         final JButton btnFfmpegDllPath = new JButton("...");
         btnFfmpegDllPath.addActionListener(
-                new FileChooseAction(ConfigDialog.this, JFileChooser.FILES_ONLY, fldFfmpegDllPath));
+                new FileChooseActionListener(ConfigDialog.this, JFileChooser.FILES_ONLY, fldFfmpegDllPath));
 
+        final JButton btnMediaInfoPath = new JButton("...");
+        btnMediaInfoPath.addActionListener(
+                new FileChooseActionListener(ConfigDialog.this, JFileChooser.FILES_ONLY, fldMediaInfoPath));
 
-        GroupLayout gl_jPanel10 = new GroupLayout(jPanel10);
-        jPanel10.setLayout(gl_jPanel10);
+        GroupLayout gl_jPanel10 = new GroupLayout(pnlFfmpegBinPath);
+        pnlFfmpegBinPath.setLayout(gl_jPanel10);
         gl_jPanel10.setHorizontalGroup(
             gl_jPanel10.createParallelGroup(GroupLayout.Alignment.LEADING)
             .addGroup(gl_jPanel10.createSequentialGroup()
                 .addContainerGap()
                 .addGroup(gl_jPanel10.createParallelGroup(GroupLayout.Alignment.LEADING)
+                    .addComponent(lblFfmpegPath)
                     .addComponent(lblFfmpegDllPath)
-                    .addComponent(lblFfmpegPath))
+                    .addComponent(lblMediaInfoPath)
+                )
                 .addPreferredGap(ComponentPlacement.RELATED)
                 .addGroup(gl_jPanel10.createParallelGroup(GroupLayout.Alignment.LEADING)
                     .addComponent(fldFfmpegDllPath, GroupLayout.Alignment.TRAILING, GroupLayout.DEFAULT_SIZE, 280, Short.MAX_VALUE)
-                    .addComponent(fldFfmpegPath, GroupLayout.Alignment.TRAILING, GroupLayout.DEFAULT_SIZE, 280, Short.MAX_VALUE))
+                    .addComponent(fldFfmpegPath, GroupLayout.Alignment.TRAILING, GroupLayout.DEFAULT_SIZE, 280, Short.MAX_VALUE)
+                    .addComponent(fldMediaInfoPath, GroupLayout.Alignment.TRAILING, GroupLayout.DEFAULT_SIZE, 280, Short.MAX_VALUE)
+                )
                 .addPreferredGap(ComponentPlacement.RELATED)
                 .addGroup(gl_jPanel10.createParallelGroup(GroupLayout.Alignment.LEADING)
                     .addComponent(btnFfmpegPath, GroupLayout.Alignment.TRAILING)
-                    .addComponent(btnFfmpegDllPath, GroupLayout.Alignment.TRAILING))
+                    .addComponent(btnFfmpegDllPath, GroupLayout.Alignment.TRAILING)
+                    .addComponent(btnMediaInfoPath, GroupLayout.Alignment.TRAILING)
+                )
                 .addContainerGap())
         );
         gl_jPanel10.setVerticalGroup(
@@ -525,37 +556,49 @@ public class ConfigDialog extends JDialog {
                     .addComponent(lblFfmpegPath)
                     .addComponent(fldFfmpegPath, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE, GroupLayout.PREFERRED_SIZE)
                     .addComponent(btnFfmpegPath))
-                .addPreferredGap(ComponentPlacement.RELATED)
                 .addGroup(gl_jPanel10.createParallelGroup(GroupLayout.Alignment.BASELINE)
                     .addComponent(lblFfmpegDllPath)
                     .addComponent(fldFfmpegDllPath, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE, GroupLayout.PREFERRED_SIZE)
                     .addComponent(btnFfmpegDllPath))
-                .addContainerGap(GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
+                .addGroup(gl_jPanel10.createParallelGroup(GroupLayout.Alignment.BASELINE)
+                    .addComponent(lblMediaInfoPath)
+                    .addComponent(fldMediaInfoPath, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE, GroupLayout.PREFERRED_SIZE)
+                    .addComponent(btnMediaInfoPath))
+            )
         );
 
         pnlFfmpegParam.setBorder(BorderFactory.createTitledBorder("ffmpegパラメータ"));
 
+        // ffmpeg - その他
+        final JPanel pnlFffmpegEtc = new JPanel();
+        pnlFffmpegEtc.setBorder(BorderFactory.createTitledBorder("その他"));
+        final GroupLayout glFfmpegEtc = new GroupLayout(pnlFffmpegEtc);
+        glFfmpegEtc.setAutoCreateContainerGaps(true);
+        glFfmpegEtc.setAutoCreateGaps(true);
+        pnlFffmpegEtc.setLayout(glFfmpegEtc);
+
+        glFfmpegEtc.setHorizontalGroup(glFfmpegEtc.createParallelGroup()
+            .addComponent(cbDisplayConverting)
+            .addComponent(cbDllDisabled)
+        );
+        glFfmpegEtc.setVerticalGroup(glFfmpegEtc.createSequentialGroup()
+            .addComponent(cbDisplayConverting)
+            .addComponent(cbDllDisabled)
+        );
 
-
-        GroupLayout gl_pnlFfmpeg = new GroupLayout(pnlFfmpeg);
-        pnlFfmpeg.setLayout(gl_pnlFfmpeg);
-        gl_pnlFfmpeg.setHorizontalGroup(
-            gl_pnlFfmpeg.createParallelGroup(GroupLayout.Alignment.LEADING)
-            .addGroup(GroupLayout.Alignment.TRAILING, gl_pnlFfmpeg.createSequentialGroup()
-                .addContainerGap()
-                .addGroup(gl_pnlFfmpeg.createParallelGroup(GroupLayout.Alignment.TRAILING)
-                    .addComponent(pnlFfmpegParam, GroupLayout.Alignment.LEADING, GroupLayout.DEFAULT_SIZE, GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
-                    .addComponent(jPanel10, GroupLayout.Alignment.LEADING, GroupLayout.DEFAULT_SIZE, GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
-                .addContainerGap())
+        final GroupLayout glFfmpeg = new GroupLayout(pnlFfmpeg);
+        glFfmpeg.setAutoCreateContainerGaps(true);
+        pnlFfmpeg.setLayout(glFfmpeg);
+        glFfmpeg.setHorizontalGroup(glFfmpeg.createParallelGroup(GroupLayout.Alignment.LEADING)
+            .addComponent(pnlFfmpegBinPath)
+            .addComponent(pnlFfmpegParam)
+            .addComponent(pnlFffmpegEtc)
         );
-        gl_pnlFfmpeg.setVerticalGroup(
-            gl_pnlFfmpeg.createParallelGroup(GroupLayout.Alignment.LEADING)
-            .addGroup(gl_pnlFfmpeg.createSequentialGroup()
-                .addContainerGap()
-                .addComponent(jPanel10, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE, GroupLayout.PREFERRED_SIZE)
-                .addPreferredGap(ComponentPlacement.RELATED)
-                .addComponent(pnlFfmpegParam, GroupLayout.DEFAULT_SIZE, GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
-                .addContainerGap())
+        glFfmpeg.setVerticalGroup(glFfmpeg.createSequentialGroup()
+            .addComponent(pnlFfmpegBinPath, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE, GroupLayout.PREFERRED_SIZE)
+            .addPreferredGap(ComponentPlacement.RELATED)
+            .addComponent(pnlFfmpegParam)
+            .addComponent(pnlFffmpegEtc)
         );
 
         tabbedPane.addTab("ffmpeg", pnlFfmpeg);
@@ -589,6 +632,8 @@ public class ConfigDialog extends JDialog {
         pnlSearchVideo.setBorder(BorderFactory.createTitledBorder("動画検索対象フォルダ"));
         pnlSearchComment.setBorder(BorderFactory.createTitledBorder("コメント検索対象フォルダ"));
 
+        final JLabel lblSearchNeedReboot = new JLabel(NEED_REBOOT);
+
         GroupLayout gl_pnlSearch = new GroupLayout(pnlSearch);
         pnlSearch.setLayout(gl_pnlSearch);
         gl_pnlSearch.setHorizontalGroup(
@@ -596,6 +641,7 @@ public class ConfigDialog extends JDialog {
             .addGroup(GroupLayout.Alignment.TRAILING, gl_pnlSearch.createSequentialGroup()
                 .addContainerGap()
                 .addGroup(gl_pnlSearch.createParallelGroup(GroupLayout.Alignment.TRAILING)
+                    .addComponent(lblSearchNeedReboot, Alignment.CENTER)
                     .addComponent(pnlSearchComment, GroupLayout.Alignment.LEADING, GroupLayout.DEFAULT_SIZE, GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                     .addComponent(pnlSearchVideo, GroupLayout.Alignment.LEADING, GroupLayout.DEFAULT_SIZE, GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
                 .addContainerGap())
@@ -604,10 +650,12 @@ public class ConfigDialog extends JDialog {
             gl_pnlSearch.createParallelGroup(GroupLayout.Alignment.LEADING)
             .addGroup(gl_pnlSearch.createSequentialGroup()
                 .addContainerGap()
-                .addComponent(pnlSearchVideo, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE, GroupLayout.PREFERRED_SIZE)
+                .addComponent(lblSearchNeedReboot)
+                .addComponent(pnlSearchVideo, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                 .addPreferredGap(ComponentPlacement.RELATED)
-                .addComponent(pnlSearchComment, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE, GroupLayout.PREFERRED_SIZE)
-                .addContainerGap(27, Short.MAX_VALUE))
+                .addComponent(pnlSearchComment, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
+                .addContainerGap()
+            )
         );
 
         tabbedPane.addTab("検索", pnlSearch);
@@ -667,7 +715,14 @@ public class ConfigDialog extends JDialog {
         final JLabel lblSystemTempDir = new JLabel("作業フォルダ");
         final JButton btnSystemTempDir = new JButton("...");
         btnSystemTempDir.addActionListener(
-                new FileChooseAction(ConfigDialog.this, JFileChooser.DIRECTORIES_ONLY, fldSystemTempDir));
+                new FileChooseActionListener(ConfigDialog.this, JFileChooser.DIRECTORIES_ONLY, fldSystemTempDir));
+
+        mdlSystemThreadDownload.setMinimum(1);
+        final JSpinner fldSystemThreadDownload = new JSpinner(mdlSystemThreadDownload);
+        mdlSystemWaitDownload.setMinimum(0);
+        final JSpinner fldSystemWaitDownload = new JSpinner(mdlSystemWaitDownload);
+        mdlSystemThreadConvert.setMinimum(1);
+        final JSpinner fldSystemThreadConvert = new JSpinner(mdlSystemThreadConvert);
 
         final JPanel pnlSystemGeneral = new JPanel();
         pnlSystemGeneral.setBorder(BorderFactory.createTitledBorder("システム"));
@@ -683,9 +738,9 @@ public class ConfigDialog extends JDialog {
                     .addComponent(lblSystemWaitDownload)
                     .addComponent(lblSystemThreadConvert))
                 .addGroup(glSystemGenegal.createParallelGroup()
-                    .addComponent(fldSystemThreadDownload, PREFERRED_SIZE, 40, PREFERRED_SIZE)
-                    .addComponent(fldSystemWaitDownload, PREFERRED_SIZE, 40, PREFERRED_SIZE)
-                    .addComponent(fldSystemThreadConvert, PREFERRED_SIZE, 40, PREFERRED_SIZE)
+                    .addComponent(fldSystemThreadDownload, PREFERRED_SIZE, 50, PREFERRED_SIZE)
+                    .addComponent(fldSystemWaitDownload, PREFERRED_SIZE, 55, PREFERRED_SIZE)
+                    .addComponent(fldSystemThreadConvert, PREFERRED_SIZE, 50, PREFERRED_SIZE)
                 )
             )
             .addGroup(glSystemGenegal.createSequentialGroup()
@@ -712,6 +767,8 @@ public class ConfigDialog extends JDialog {
             )
         );
 
+        final JLabel lblSystemNeedReboot = new JLabel("設定を有効にするにはいんきゅばすの再起動が必要です");
+
         final JPanel pnlSystem = new JPanel();
         pnlSystem.setBorder(BorderFactory.createEmptyBorder(1, 1, 1, 1));
         final GroupLayout glSystem = new GroupLayout(pnlSystem);
@@ -720,9 +777,11 @@ public class ConfigDialog extends JDialog {
         pnlSystem.setLayout(glSystem);
 
         glSystem.setHorizontalGroup(glSystem.createParallelGroup()
+            .addComponent(lblSystemNeedReboot, Alignment.CENTER)
             .addComponent(pnlSystemGeneral));
 
         glSystem.setVerticalGroup(glSystem.createSequentialGroup()
+            .addComponent(lblSystemNeedReboot)
             .addComponent(pnlSystemGeneral));
 
         tabbedPane.add("システム", pnlSystem);
@@ -732,44 +791,24 @@ public class ConfigDialog extends JDialog {
         loadConfig();
     }
 
-    /**
-     * @param args the command line arguments
-     */
-    public static void main(String args[]) {
-        /* Set the Nimbus look and feel */
-        /* 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 (UIManager.LookAndFeelInfo info : UIManager.getInstalledLookAndFeels()) {
-                if ("Nimbus".equals(info.getName())) {
-                    UIManager.setLookAndFeel(info.getClassName());
-                    break;
-                }
-            }
-        } catch (ClassNotFoundException | InstantiationException | IllegalAccessException | UnsupportedLookAndFeelException ex) {
-            java.util.logging.Logger.getLogger(ConfigDialog.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);
-        }
-
-        /* Create and display the form */
-        java.awt.EventQueue.invokeLater(new Runnable() {
-
-            @Override
-            public void run() {
-                new ConfigDialog().setVisible(true);
-            }
-        });
-    }
-    // Variables declaration - do not modify//GEN-BEGIN:variables
-
     // ネットワーク
     // ネットワーク - アカウント
+    final JRadioButton btnAccount = new JRadioButton("次の情報を使用してログインする");
     private final JTextField fldMail;
-    private final JTextField fldPassword;
+    private final JPasswordField fldPassword = new JPasswordField();
+    // ネットワーク - cookie
+    final JRadioButton btnLoginCookie = new JRadioButton("ブラウザのログイン情報を使用してアクセスする");
+    final JRadioButton btnCookieIe = new JRadioButton("IE(7以降) (Windows)");
+    final JRadioButton btnCookieFirefox = new JRadioButton("Firefox(4以降) (Windows)");
+    final JRadioButton btnCookieChrome = new JRadioButton("Google Chrome (Windows)");
+    final JRadioButton btnCookieChromium = new JRadioButton("Chrome派生ブラウザ (Windows)");
+    final JRadioButton btnCookieOpera = new JRadioButton("Opera (Windows)");
+    final JRadioButton btnCookieOther = new JRadioButton("上記以外 - cookie保存ディレクトリを次に入力");
+    final JTextField fldCookie = new JTextField();
     // ネットワーク - プロキシ
     private final JCheckBox cbProxyUse;
-    private final JTextField fldProxyHost;
-    private final JTextField fldProxyPort;
+    private final JTextField fldProxyHost = new JTextField();
+    private final NumberFormattedTextField fldProxyPort = new NumberFormattedTextField();
     // ファイル
     // ファイル - 動画
     private final DownloadLocationPanel pnlFileVideo = new DownloadLocationPanel();
@@ -782,17 +821,15 @@ public class ConfigDialog extends JDialog {
     private final JCheckBox cbOutputEnable;
     private final JCheckBox cbOutputCommentOverlay;
     private final JCheckBox cbOutputDisplayProgress;
-    // ファイル - 禁則文字
-    private final JTextField fldReplaceFrom = new JTextField();
-    private final JTextField fldReplaceTo = new JTextField();
     // コメント
     // コメント
-    private final JCheckBox cbCommentSizeAuto;
-    private final JTextField fldCommentSizeManual;
-    private final JCheckBox cbCommentMinSizeAuto;
-    private final JTextField fldCommentMinSizeManual;
-    private final JCheckBox cbCommentDisplaySizeDefault;
-    private final JTextField fldCommentDisplaySizeManual;
+    private final JCheckBox cbCommentSizeAuto = new JCheckBox("自動調整");
+    private final NumberFormattedTextField fldCommentSizeManual = new NumberFormattedTextField();
+    private final JCheckBox cbCommentMinDisable = new JCheckBox("少コメ");
+    private final JCheckBox cbCommentMinSizeAuto = new JCheckBox("自動調整");
+    private final NumberFormattedTextField fldCommentMinSizeManual = new NumberFormattedTextField();
+    private final JCheckBox cbCommentDisplaySizeDefault = new JCheckBox("標準(30)");
+    private final NumberFormattedTextField fldCommentDisplaySizeManual = new NumberFormattedTextField();
     // コメント - 高度な設定
     private final JTextField fldFontPath;
     private final JTextField fldFontIndex;
@@ -801,10 +838,14 @@ public class ConfigDialog extends JDialog {
     private final JCheckBox cbCommentOpaque;
     // ffmpeg
     // ffmpeg - ファイルパス
-    private final JTextField fldFfmpegPath;
-    private final JTextField fldFfmpegDllPath;
+    private final JTextField fldFfmpegPath = new JTextField();
+    private final JTextField fldFfmpegDllPath = new JTextField();
+    private final JTextField fldMediaInfoPath = new JTextField();
     // ffmpeg - ffmpegパラメータ
     private final FfmpegParamPanel pnlFfmpegParam = new FfmpegParamPanel();
+    // ffmpeg - その他
+    private final JCheckBox cbDisplayConverting = new JCheckBox("変換中動画表示");
+    private final JCheckBox cbDllDisabled = new JCheckBox("拡張DLL無効化(デバッグ用)");
     // NG設定
     // NG設定 - NGワード
     private final NgRegisterPanel pnlNgWord = new NgRegisterPanel();
@@ -816,9 +857,9 @@ public class ConfigDialog extends JDialog {
     // 検索 - コメント検索対象フォルダ
     private final DirectoryRegisterPanel pnlSearchComment = new DirectoryRegisterPanel();
     // システム
-    private final JTextField fldSystemThreadDownload = new JTextField();
-    private final JTextField fldSystemWaitDownload = new JTextField();
-    private final JTextField fldSystemThreadConvert = new JTextField();
+    private final SpinnerNumberModel mdlSystemThreadDownload = new SpinnerNumberModel();
+    private final SpinnerNumberModel mdlSystemWaitDownload = new SpinnerNumberModel();
+    private final SpinnerNumberModel mdlSystemThreadConvert = new SpinnerNumberModel();
     private final JTextField fldSystemTempDir = new JTextField();
 
 
@@ -830,10 +871,42 @@ public class ConfigDialog extends JDialog {
         /*
          * ネットワーク - アカウント
          */
+        btnAccount.setSelected(p.getNeedsLogin());
         fldMail.setText(p.getId());
         fldPassword.setText(p.getPassword());
 
         /*
+         * ネットワーク - cookie
+         */
+        btnLoginCookie.setSelected(!p.getNeedsLogin());
+        final CookieBrowser cookieBrowser = p.getCookieBrowser();
+        final JRadioButton enabledBrowser;
+        switch(cookieBrowser){
+            case MSIE:
+                enabledBrowser = btnCookieIe;
+                break;
+            case FIREFOX:
+                enabledBrowser = btnCookieFirefox;
+                break;
+            case CHROME:
+                enabledBrowser = btnCookieChrome;
+                break;
+            case CHROMIUM:
+                enabledBrowser = btnCookieChromium;
+                break;
+            case OPERA:
+                enabledBrowser = btnCookieOpera;
+                break;
+            case OTHER:
+                enabledBrowser = btnCookieOther;
+                break;
+            default:
+                throw new UnsupportedOperationException();
+        }
+        enabledBrowser.setSelected(true);
+        fldCookie.setText(p.getCookieDir());
+
+        /*
          * ネットワーク - プロキシ
          */
         cbProxyUse.setSelected(p.getProxyUse());
@@ -863,17 +936,12 @@ public class ConfigDialog extends JDialog {
         cbOutputCommentOverlay.setSelected(p.getOutputCommentOverlay());
         cbOutputDisplayProgress.setSelected(p.getOutputDisplayProgress());
 
-        /*
-         * ファイル - 禁則文字
-         */
-        fldReplaceFrom.setText(p.getReplaceFrom());
-        fldReplaceTo.setText(p.getReplaceTo());
-
         /**
          * コメント
          */
         cbCommentSizeAuto.setSelected(p.getCommentSizeAutosize());
         fldCommentSizeManual.setText(p.getCommentSizeManual());
+        cbCommentMinDisable.setSelected(p.getCommentMinDisabled());
         cbCommentMinSizeAuto.setSelected(p.getCommentMinSizeAutosize());
         fldCommentSizeManual.setText(p.getCommentMinSizeManual());
         cbCommentDisplaySizeDefault.setSelected(p.getCommentDisplaySizeDefault());
@@ -893,6 +961,7 @@ public class ConfigDialog extends JDialog {
          */
         fldFfmpegPath.setText(p.getFfmpegPath());
         fldFfmpegDllPath.setText(p.getFfmpegDllPath());
+        fldMediaInfoPath.setText(p.getMediaInfoPath());
 
         /*
          * ffmpeg - ffmpegパラメータ
@@ -900,6 +969,12 @@ public class ConfigDialog extends JDialog {
         pnlFfmpegParam.init(p);
 
         /*
+         * ffmpeg - その他
+         */
+        cbDisplayConverting.setSelected(p.getFfmpegDisplayConverting());
+        cbDllDisabled.setSelected(p.getFfmpegDllDisabled());
+
+        /*
          * NG 設定
          */
         final List<String> ngWords = p.getNgWords();
@@ -916,9 +991,9 @@ public class ConfigDialog extends JDialog {
         /*
          * システム
          */
-        fldSystemThreadDownload.setText(Integer.toString(p.getSystemDownloadThread()));
-        fldSystemWaitDownload.setText(Integer.toString(p.getSystemDownloadWait()));
-        fldSystemThreadConvert.setText(Integer.toString(p.getSystemConvertThread()));
+        mdlSystemThreadDownload.setValue(p.getSystemDownloadThread());
+        mdlSystemWaitDownload.setValue(p.getSystemDownloadWait());
+        mdlSystemThreadConvert.setValue(p.getSystemConvertThread());
         fldSystemTempDir.setText(p.getSystemTempDir());
     }
 
@@ -928,9 +1003,31 @@ public class ConfigDialog extends JDialog {
         /*
          * ネットワーク - アカウント
          */
-
+        p.setNeedsLogin(btnAccount.isSelected());
         p.setId(fldMail.getText());
-        p.setPassword(fldPassword.getText());
+        p.setPassword(String.valueOf(fldPassword.getPassword()));
+
+        /*
+         * ネットワーク - cookie
+         */
+        final CookieBrowser cookieBrowser;
+        if(btnCookieIe.isSelected()) {
+            cookieBrowser = CookieBrowser.MSIE;
+        } else if(btnCookieFirefox.isSelected()) {
+            cookieBrowser = CookieBrowser.FIREFOX;
+        } else if (btnCookieChrome.isSelected()) {
+            cookieBrowser = CookieBrowser.CHROME;
+        } else if (btnCookieChromium.isSelected()) {
+            cookieBrowser = CookieBrowser.CHROMIUM;
+        } else if(btnCookieOpera.isSelected()) {
+            cookieBrowser = CookieBrowser.OPERA;
+        } else if(btnCookieOther.isSelected()) {
+            cookieBrowser = CookieBrowser.OTHER;
+        } else {
+            throw new UnsupportedOperationException();
+        }
+        p.setCookieBrowser(cookieBrowser);
+        p.setCookieDir(fldCookie.getText());
 
         /*
          * ネットワーク - プロキシ
@@ -963,16 +1060,11 @@ public class ConfigDialog extends JDialog {
         p.setOutputDisplayProgress(cbOutputDisplayProgress.isSelected());
 
         /*
-         * ファイル - 禁則文字
-         */
-        p.setReplaceFrom(fldReplaceFrom.getText());
-        p.setReplaceTo(fldReplaceTo.getText());
-
-        /*
          * コメント
          */
         p.setCommentSizeAutosize(cbCommentSizeAuto.isSelected());
         p.setCommentSizeManual(fldCommentSizeManual.getText());
+        p.setCommentMinDisabled(cbCommentMinDisable.isSelected());
         p.setCommentMinSizeAutosize(cbCommentMinSizeAuto.isSelected());
         p.setCommentMinSizeManual(fldCommentSizeManual.getText());
         p.setCommentDisplaySizeDefault(cbCommentDisplaySizeDefault.isSelected());
@@ -992,6 +1084,7 @@ public class ConfigDialog extends JDialog {
          */
         p.setFfmpegPath(fldFfmpegPath.getText());
         p.setFfmpegDllPath(fldFfmpegDllPath.getText());
+        p.setMediaInfoPath(fldMediaInfoPath.getText());
 
         /*
          * ffmpeg - ffmpegパラメータ
@@ -1009,6 +1102,12 @@ public class ConfigDialog extends JDialog {
         p.setFfmpegKeepAspect(pnlFfmpegParam.cbFfmpegOptionKeepAspect.isSelected());
 
         /*
+         * ffmpeg - その他
+         */
+        p.setFfmpegDisplayConverting(cbDisplayConverting.isSelected());
+        p.setFfmpegDllDisabled(cbDllDisabled.isSelected());
+
+        /*
          * NG 設定
          */
         p.setNgWords(pnlNgWord.getAllElements());
@@ -1023,20 +1122,22 @@ public class ConfigDialog extends JDialog {
         /*
          * システム
          */
-        p.setSystemDownloadThread(Integer.parseInt(fldSystemThreadDownload.getText()));
-        p.setSystemDownloadWait(Integer.parseInt(fldSystemWaitDownload.getText()));
-        p.setSystemConvertThread(Integer.parseInt(fldSystemThreadConvert.getText()));
+        p.setSystemDownloadThread(mdlSystemThreadDownload.getNumber().intValue());
+        p.setSystemDownloadWait(mdlSystemWaitDownload.getNumber().intValue());
+        p.setSystemConvertThread(mdlSystemThreadConvert.getNumber().intValue());
         p.setSystemTempDir(fldSystemTempDir.getText());
 
         try {
             p.save();
         } catch (ConfigurationException ex) {
-            logger.log(Level.SEVERE, "コンフィグファイル保存に失敗", ex);
+            logger.error("コンフィグファイル保存に失敗", ex);
         }
     }
 }
 
 class DownloadLocationPanel extends JPanel {
+
+    private static final long serialVersionUID = 1L;
     final JTextField fldDir = new JTextField();
     final JTextField fldFileNamePattern = new JTextField();
     final JCheckBox cbLocal = new JCheckBox("local");
@@ -1049,7 +1150,7 @@ class DownloadLocationPanel extends JPanel {
 
         final JButton btnDir = new JButton("...");
         btnDir.addActionListener(
-                new FileChooseAction(DownloadLocationPanel.this, JFileChooser.DIRECTORIES_ONLY, fldDir));
+                new FileChooseActionListener(DownloadLocationPanel.this, JFileChooser.DIRECTORIES_ONLY, fldDir));
 
         final GroupLayout gl = new GroupLayout(this);
         setLayout(gl);