OSDN Git Service

動画ファイル保存設定のパネルを外だし
[coroid/inqubus.git] / frontend / src / yukihane / inqubus / gui / ConfigDialog.java
index 38fa445..b8cb84d 100644 (file)
@@ -10,15 +10,13 @@ import static javax.swing.GroupLayout.PREFERRED_SIZE;
 
 import java.awt.event.ActionEvent;
 import java.awt.event.ActionListener;
-import java.util.ArrayList;
+import java.io.File;
 import java.util.List;
 import java.util.logging.Level;
 import java.util.logging.Logger;
 import javax.swing.BorderFactory;
-import javax.swing.ButtonGroup;
 import javax.swing.ComboBoxModel;
 import javax.swing.DefaultComboBoxModel;
-import javax.swing.DefaultListModel;
 import javax.swing.GroupLayout;
 import javax.swing.GroupLayout.Alignment;
 import javax.swing.JButton;
@@ -27,10 +25,7 @@ import javax.swing.JComboBox;
 import javax.swing.JDialog;
 import javax.swing.JFrame;
 import javax.swing.JLabel;
-import javax.swing.JList;
 import javax.swing.JPanel;
-import javax.swing.JRadioButton;
-import javax.swing.JScrollPane;
 import javax.swing.JTabbedPane;
 import javax.swing.JTextField;
 import javax.swing.LayoutStyle.ComponentPlacement;
@@ -38,8 +33,6 @@ import javax.swing.UIManager;
 import javax.swing.UnsupportedLookAndFeelException;
 import javax.swing.WindowConstants;
 import org.apache.commons.configuration.ConfigurationException;
-import saccubus.FFmpegSelectedItem;
-import saccubus.OptionComboBoxModel;
 import yukihane.inqubus.Config;
 
 /**
@@ -58,7 +51,6 @@ public class ConfigDialog extends JDialog {
     public ConfigDialog(JFrame owner){
         super(owner);
 
-        final ButtonGroup buttonGroup1 = new ButtonGroup();
         final JTabbedPane tabbedPane = new JTabbedPane();
         final JPanel pnlNetwork = new JPanel();
         final JPanel pnlAccount = new JPanel();
@@ -73,13 +65,6 @@ public class ConfigDialog extends JDialog {
         fldProxyHost = new JTextField();
         fldProxyPort = new JTextField();
         final JPanel pnlFile = new JPanel();
-        final JPanel pnlFileVideo = new JPanel();
-        final JLabel lblVideoDir = new JLabel();
-        final JLabel lblVideoFileNamepattern = new JLabel();
-        fldVideoDir = new JTextField();
-        fldVideoFileNamePattern = new JTextField();
-        btnVideoDir = new JButton();
-        cbVideoLocal = new JCheckBox();
         final JPanel pnlFileComment = new JPanel();
         final JLabel lblCommentDir = new JLabel();
         final JLabel lblCommentFileNamePattern = new JLabel();
@@ -127,50 +112,8 @@ public class ConfigDialog extends JDialog {
         fldFfmpegDllPath = new JTextField();
         btnFfmpegPath = new JButton();
         btnFfmpegDllPath = new JButton();
-        final JPanel pnlFfmpegParam = new JPanel();
-        rbFfmpegOptionFile = new JRadioButton();
-        rbFfmpegOptionDirectInput = new JRadioButton();
-        final JPanel pnlFfmpegParamOption = new JPanel();
-        final JLabel lblFfmpegOptionExtension = new JLabel();
-        final JLabel lblFfmpegOptionMain = new JLabel();
-        final JLabel lblFfmpegOptionIn = new JLabel();
-        final JLabel lblFfmpegOptionOut = new JLabel();
-        final JLabel lblFfmpegOptionAvfilter = new JLabel();
-        cbFfmpegOptionResize = new JCheckBox();
-        final JLabel lblFfmpegOptionResizeWidth = new JLabel();
-        fldFfmpegOptionResizeWidth = new JTextField();
-        final JLabel lblFfmpegOptionResizeHeight = new JLabel();
-        fldFfmpegOptionResizeHeight = new JTextField();
-        cbFfmpegOptionKeepAspect = new JCheckBox();
-        fldFfmpegOptionExtension = new JTextField();
-        fldFfmpegOptionMain = new JTextField();
-        fldFfmpegOptionIn = new JTextField();
-        fldFfmpegOptionOut = new JTextField();
-        fldFfmpegOptionAv = new JTextField();
         final JPanel pnlNgSetting = new JPanel();
-        final JPanel pnlNgWord = new JPanel();
-        final JScrollPane scrNgWord = new JScrollPane();
-        lstNgWord = new JList<>();
-        fldNgWord = new JTextField();
-        btnNgWordAdd = new JButton();
-        btnNgWordDel = new JButton();
-        final JPanel pnlNgId = new JPanel();
-        final JScrollPane scrNgId = new JScrollPane();
-        lstNgId = new JList<>();
-        fldNgId = new JTextField();
-        btnNgIdAdd = new JButton();
-        btnNgIdDel = new JButton();
         final JPanel pnlSearch = new JPanel();
-        final JPanel pnlSearchVideo = new JPanel();
-        final JScrollPane srcSearchVideo = new JScrollPane();
-        lstSearchVideo = new JList<>();
-        btnSearchVideoAdd = new JButton();
-        btnSearchVideoDel = new JButton();
-        final JPanel pnlSearchComment = new JPanel();
-        final JScrollPane srcSearchComment = new JScrollPane();
-        lstSearchComment = new JList<>();
-        btnSearchCommentAdd = new JButton();
-        btnSearchCommentDel = new JButton();
         final JPanel pnlSearchCache = new JPanel();
         final JLabel lblSearchCache = new JLabel();
         fldSearchCache = new JTextField();
@@ -281,50 +224,6 @@ public class ConfigDialog extends JDialog {
 
         pnlFileVideo.setBorder(BorderFactory.createTitledBorder("動画"));
 
-        lblVideoDir.setText("保存フォルダ");
-
-        lblVideoFileNamepattern.setText("ファイル名規則");
-
-        btnVideoDir.setText("...");
-
-        cbVideoLocal.setText("local");
-
-        GroupLayout gl_pnlFileVideo = new GroupLayout(pnlFileVideo);
-        pnlFileVideo.setLayout(gl_pnlFileVideo);
-        gl_pnlFileVideo.setHorizontalGroup(
-            gl_pnlFileVideo.createParallelGroup(GroupLayout.Alignment.LEADING)
-            .addGroup(GroupLayout.Alignment.TRAILING, gl_pnlFileVideo.createSequentialGroup()
-                .addContainerGap()
-                .addGroup(gl_pnlFileVideo.createParallelGroup(GroupLayout.Alignment.LEADING)
-                    .addComponent(lblVideoFileNamepattern)
-                    .addComponent(lblVideoDir))
-                .addPreferredGap(ComponentPlacement.RELATED)
-                .addGroup(gl_pnlFileVideo.createParallelGroup(GroupLayout.Alignment.LEADING)
-                    .addGroup(gl_pnlFileVideo.createSequentialGroup()
-                        .addComponent(fldVideoDir, GroupLayout.DEFAULT_SIZE, 262, Short.MAX_VALUE)
-                        .addPreferredGap(ComponentPlacement.RELATED)
-                        .addComponent(btnVideoDir))
-                    .addGroup(GroupLayout.Alignment.TRAILING, gl_pnlFileVideo.createSequentialGroup()
-                        .addComponent(fldVideoFileNamePattern, GroupLayout.PREFERRED_SIZE, 165, GroupLayout.PREFERRED_SIZE)
-                        .addPreferredGap(ComponentPlacement.RELATED, 94, Short.MAX_VALUE)
-                        .addComponent(cbVideoLocal)))
-                .addContainerGap())
-        );
-        gl_pnlFileVideo.setVerticalGroup(
-            gl_pnlFileVideo.createParallelGroup(GroupLayout.Alignment.LEADING)
-            .addGroup(gl_pnlFileVideo.createSequentialGroup()
-                .addGroup(gl_pnlFileVideo.createParallelGroup(GroupLayout.Alignment.BASELINE)
-                    .addComponent(lblVideoDir)
-                    .addComponent(fldVideoDir, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE, GroupLayout.PREFERRED_SIZE)
-                    .addComponent(btnVideoDir))
-                .addPreferredGap(ComponentPlacement.RELATED)
-                .addGroup(gl_pnlFileVideo.createParallelGroup(GroupLayout.Alignment.BASELINE)
-                    .addComponent(lblVideoFileNamepattern)
-                    .addComponent(fldVideoFileNamePattern, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE, GroupLayout.PREFERRED_SIZE)
-                    .addComponent(cbVideoLocal))
-                .addContainerGap(GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
-        );
-
         pnlFileComment.setBorder(BorderFactory.createTitledBorder("コメント"));
 
         lblCommentDir.setText("保存フォルダ");
@@ -685,132 +584,7 @@ public class ConfigDialog extends JDialog {
 
         pnlFfmpegParam.setBorder(BorderFactory.createTitledBorder("ffmpegパラメータ"));
 
-        buttonGroup1.add(rbFfmpegOptionFile);
-        rbFfmpegOptionFile.setText("オプションファイル");
-
-        buttonGroup1.add(rbFfmpegOptionDirectInput);
-        rbFfmpegOptionDirectInput.setText("直接入力");
-
-        pnlFfmpegParamOption.setBorder(BorderFactory.createEtchedBorder());
-
-        lblFfmpegOptionExtension.setText("出力動画の拡張子");
-
-        lblFfmpegOptionMain.setText("メインオプション");
-
-        lblFfmpegOptionIn.setText("入力オプション");
-
-        lblFfmpegOptionOut.setText("出力オプション");
-
-        lblFfmpegOptionAvfilter.setText("avfilterオプション");
 
-        cbFfmpegOptionResize.setText("次のサイズに収まるよう縮小(-s)");
-
-        lblFfmpegOptionResizeWidth.setText("横");
-
-        lblFfmpegOptionResizeHeight.setText("縦");
-
-        cbFfmpegOptionKeepAspect.setText("アスペクト比を維持");
-
-        GroupLayout gl_pnlFfmpegParamOption = new GroupLayout(pnlFfmpegParamOption);
-        pnlFfmpegParamOption.setLayout(gl_pnlFfmpegParamOption);
-        gl_pnlFfmpegParamOption.setHorizontalGroup(
-            gl_pnlFfmpegParamOption.createParallelGroup(GroupLayout.Alignment.LEADING)
-            .addGroup(gl_pnlFfmpegParamOption.createSequentialGroup()
-                .addGroup(gl_pnlFfmpegParamOption.createParallelGroup(GroupLayout.Alignment.LEADING)
-                    .addGroup(gl_pnlFfmpegParamOption.createSequentialGroup()
-                        .addContainerGap()
-                        .addGroup(gl_pnlFfmpegParamOption.createParallelGroup(GroupLayout.Alignment.LEADING)
-                            .addComponent(lblFfmpegOptionAvfilter)
-                            .addComponent(lblFfmpegOptionExtension)
-                            .addComponent(lblFfmpegOptionMain)
-                            .addComponent(lblFfmpegOptionIn)
-                            .addComponent(lblFfmpegOptionOut))
-                        .addPreferredGap(ComponentPlacement.RELATED)
-                        .addGroup(gl_pnlFfmpegParamOption.createParallelGroup(GroupLayout.Alignment.LEADING)
-                            .addComponent(fldFfmpegOptionExtension, GroupLayout.PREFERRED_SIZE, 51, GroupLayout.PREFERRED_SIZE)
-                            .addComponent(fldFfmpegOptionMain, GroupLayout.DEFAULT_SIZE, 268, Short.MAX_VALUE)
-                            .addComponent(fldFfmpegOptionIn, GroupLayout.DEFAULT_SIZE, 268, Short.MAX_VALUE)
-                            .addComponent(fldFfmpegOptionOut, GroupLayout.DEFAULT_SIZE, 268, Short.MAX_VALUE)
-                            .addComponent(fldFfmpegOptionAv, GroupLayout.DEFAULT_SIZE, 268, Short.MAX_VALUE)))
-                    .addGroup(gl_pnlFfmpegParamOption.createSequentialGroup()
-                        .addGap(12, 12, 12)
-                        .addComponent(cbFfmpegOptionResize)
-                        .addPreferredGap(ComponentPlacement.UNRELATED)
-                        .addComponent(lblFfmpegOptionResizeWidth)
-                        .addPreferredGap(ComponentPlacement.RELATED)
-                        .addComponent(fldFfmpegOptionResizeWidth, GroupLayout.PREFERRED_SIZE, 48, GroupLayout.PREFERRED_SIZE)
-                        .addGap(12, 12, 12)
-                        .addComponent(lblFfmpegOptionResizeHeight)
-                        .addPreferredGap(ComponentPlacement.RELATED)
-                        .addComponent(fldFfmpegOptionResizeHeight, GroupLayout.PREFERRED_SIZE, 48, GroupLayout.PREFERRED_SIZE))
-                    .addGroup(gl_pnlFfmpegParamOption.createSequentialGroup()
-                        .addGap(33, 33, 33)
-                        .addComponent(cbFfmpegOptionKeepAspect)))
-                .addContainerGap())
-        );
-        gl_pnlFfmpegParamOption.setVerticalGroup(
-            gl_pnlFfmpegParamOption.createParallelGroup(GroupLayout.Alignment.LEADING)
-            .addGroup(gl_pnlFfmpegParamOption.createSequentialGroup()
-                .addContainerGap()
-                .addGroup(gl_pnlFfmpegParamOption.createParallelGroup(GroupLayout.Alignment.BASELINE)
-                    .addComponent(lblFfmpegOptionExtension)
-                    .addComponent(fldFfmpegOptionExtension, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE, GroupLayout.PREFERRED_SIZE))
-                .addPreferredGap(ComponentPlacement.RELATED)
-                .addGroup(gl_pnlFfmpegParamOption.createParallelGroup(GroupLayout.Alignment.BASELINE)
-                    .addComponent(lblFfmpegOptionMain)
-                    .addComponent(fldFfmpegOptionMain, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE, GroupLayout.PREFERRED_SIZE))
-                .addPreferredGap(ComponentPlacement.RELATED)
-                .addGroup(gl_pnlFfmpegParamOption.createParallelGroup(GroupLayout.Alignment.BASELINE)
-                    .addComponent(lblFfmpegOptionIn)
-                    .addComponent(fldFfmpegOptionIn, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE, GroupLayout.PREFERRED_SIZE))
-                .addPreferredGap(ComponentPlacement.RELATED)
-                .addGroup(gl_pnlFfmpegParamOption.createParallelGroup(GroupLayout.Alignment.BASELINE)
-                    .addComponent(lblFfmpegOptionOut)
-                    .addComponent(fldFfmpegOptionOut, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE, GroupLayout.PREFERRED_SIZE))
-                .addPreferredGap(ComponentPlacement.RELATED)
-                .addGroup(gl_pnlFfmpegParamOption.createParallelGroup(GroupLayout.Alignment.BASELINE)
-                    .addComponent(lblFfmpegOptionAvfilter)
-                    .addComponent(fldFfmpegOptionAv, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE, GroupLayout.PREFERRED_SIZE))
-                .addPreferredGap(ComponentPlacement.RELATED)
-                .addGroup(gl_pnlFfmpegParamOption.createParallelGroup(GroupLayout.Alignment.BASELINE)
-                    .addComponent(cbFfmpegOptionResize)
-                    .addComponent(lblFfmpegOptionResizeWidth)
-                    .addComponent(fldFfmpegOptionResizeWidth, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE, GroupLayout.PREFERRED_SIZE)
-                    .addComponent(lblFfmpegOptionResizeHeight)
-                    .addComponent(fldFfmpegOptionResizeHeight, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE, GroupLayout.PREFERRED_SIZE))
-                .addPreferredGap(ComponentPlacement.RELATED)
-                .addComponent(cbFfmpegOptionKeepAspect)
-                .addContainerGap())
-        );
-
-        GroupLayout gl_pnlFfmpegParam = new GroupLayout(pnlFfmpegParam);
-        pnlFfmpegParam.setLayout(gl_pnlFfmpegParam);
-        gl_pnlFfmpegParam.setHorizontalGroup(
-            gl_pnlFfmpegParam.createParallelGroup(Alignment.LEADING)
-            .addGroup(gl_pnlFfmpegParam.createSequentialGroup()
-                .addContainerGap()
-                .addGroup(gl_pnlFfmpegParam.createParallelGroup(Alignment.LEADING)
-                    .addComponent(pnlFfmpegParamOption, GroupLayout.DEFAULT_SIZE, GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
-                    .addGroup(gl_pnlFfmpegParam.createSequentialGroup()
-                        .addComponent(rbFfmpegOptionFile)
-                        .addPreferredGap(ComponentPlacement.RELATED)
-                        .addComponent(cmbFfmpegOptionFile, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE, GroupLayout.PREFERRED_SIZE))
-                    .addComponent(rbFfmpegOptionDirectInput))
-                .addContainerGap())
-        );
-        gl_pnlFfmpegParam.setVerticalGroup(
-            gl_pnlFfmpegParam.createParallelGroup(Alignment.LEADING)
-            .addGroup(gl_pnlFfmpegParam.createSequentialGroup()
-                .addContainerGap()
-                .addGroup(gl_pnlFfmpegParam.createParallelGroup(Alignment.BASELINE)
-                    .addComponent(rbFfmpegOptionFile)
-                    .addComponent(cmbFfmpegOptionFile, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE, GroupLayout.PREFERRED_SIZE))
-                .addPreferredGap(ComponentPlacement.RELATED)
-                .addComponent(rbFfmpegOptionDirectInput)
-                .addPreferredGap(ComponentPlacement.RELATED)
-                .addComponent(pnlFfmpegParamOption, GroupLayout.DEFAULT_SIZE, GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
-                .addContainerGap())
-        );
 
         GroupLayout gl_pnlFfmpeg = new GroupLayout(pnlFfmpeg);
         pnlFfmpeg.setLayout(gl_pnlFfmpeg);
@@ -836,79 +610,8 @@ public class ConfigDialog extends JDialog {
         tabbedPane.addTab("ffmpeg", pnlFfmpeg);
 
         pnlNgWord.setBorder(BorderFactory.createTitledBorder("NGワード"));
-
-        lstNgWord.setModel(mdlNgWord);
-        scrNgWord.setViewportView(lstNgWord);
-
-        btnNgWordAdd.setText("追加");
-
-        btnNgWordDel.setText("削除");
-
-        GroupLayout gl_pnlNgWord = new GroupLayout(pnlNgWord);
-        pnlNgWord.setLayout(gl_pnlNgWord);
-        gl_pnlNgWord.setHorizontalGroup(
-            gl_pnlNgWord.createParallelGroup(GroupLayout.Alignment.LEADING)
-            .addGroup(gl_pnlNgWord.createSequentialGroup()
-                .addContainerGap()
-                .addGroup(gl_pnlNgWord.createParallelGroup(GroupLayout.Alignment.LEADING)
-                    .addComponent(scrNgWord, GroupLayout.DEFAULT_SIZE, 395, Short.MAX_VALUE)
-                    .addGroup(gl_pnlNgWord.createSequentialGroup()
-                        .addComponent(fldNgWord, GroupLayout.DEFAULT_SIZE, 256, Short.MAX_VALUE)
-                        .addPreferredGap(ComponentPlacement.RELATED)
-                        .addComponent(btnNgWordAdd)
-                        .addGap(18, 18, 18)
-                        .addComponent(btnNgWordDel)))
-                .addContainerGap())
-        );
-        gl_pnlNgWord.setVerticalGroup(
-            gl_pnlNgWord.createParallelGroup(GroupLayout.Alignment.LEADING)
-            .addGroup(gl_pnlNgWord.createSequentialGroup()
-                .addComponent(scrNgWord, GroupLayout.PREFERRED_SIZE, 100, GroupLayout.PREFERRED_SIZE)
-                .addPreferredGap(ComponentPlacement.RELATED)
-                .addGroup(gl_pnlNgWord.createParallelGroup(GroupLayout.Alignment.BASELINE)
-                    .addComponent(fldNgWord, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE, GroupLayout.PREFERRED_SIZE)
-                    .addComponent(btnNgWordDel)
-                    .addComponent(btnNgWordAdd))
-                .addContainerGap(GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
-        );
-
         pnlNgId.setBorder(BorderFactory.createTitledBorder("NGID"));
 
-        lstNgId.setModel(mdlNgId);
-        scrNgId.setViewportView(lstNgId);
-
-        btnNgIdAdd.setText("追加");
-
-        btnNgIdDel.setText("削除");
-
-        GroupLayout gl_pnlNgId = new GroupLayout(pnlNgId);
-        pnlNgId.setLayout(gl_pnlNgId);
-        gl_pnlNgId.setHorizontalGroup(
-            gl_pnlNgId.createParallelGroup(GroupLayout.Alignment.LEADING)
-            .addGroup(gl_pnlNgId.createSequentialGroup()
-                .addContainerGap()
-                .addGroup(gl_pnlNgId.createParallelGroup(GroupLayout.Alignment.LEADING)
-                    .addComponent(scrNgId, GroupLayout.DEFAULT_SIZE, 395, Short.MAX_VALUE)
-                    .addGroup(GroupLayout.Alignment.TRAILING, gl_pnlNgId.createSequentialGroup()
-                        .addComponent(fldNgId, GroupLayout.DEFAULT_SIZE, 256, Short.MAX_VALUE)
-                        .addPreferredGap(ComponentPlacement.RELATED)
-                        .addComponent(btnNgIdAdd)
-                        .addGap(18, 18, 18)
-                        .addComponent(btnNgIdDel)))
-                .addContainerGap())
-        );
-        gl_pnlNgId.setVerticalGroup(
-            gl_pnlNgId.createParallelGroup(GroupLayout.Alignment.LEADING)
-            .addGroup(gl_pnlNgId.createSequentialGroup()
-                .addComponent(scrNgId, GroupLayout.PREFERRED_SIZE, 100, GroupLayout.PREFERRED_SIZE)
-                .addPreferredGap(ComponentPlacement.RELATED)
-                .addGroup(gl_pnlNgId.createParallelGroup(GroupLayout.Alignment.BASELINE)
-                    .addComponent(fldNgId, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE, GroupLayout.PREFERRED_SIZE)
-                    .addComponent(btnNgIdDel)
-                    .addComponent(btnNgIdAdd))
-                .addContainerGap(GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
-        );
-
         GroupLayout gl_pnlNgSetting = new GroupLayout(pnlNgSetting);
         pnlNgSetting.setLayout(gl_pnlNgSetting);
         gl_pnlNgSetting.setHorizontalGroup(
@@ -924,78 +627,17 @@ public class ConfigDialog extends JDialog {
             gl_pnlNgSetting.createParallelGroup(GroupLayout.Alignment.LEADING)
             .addGroup(gl_pnlNgSetting.createSequentialGroup()
                 .addContainerGap()
-                .addComponent(pnlNgWord, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE, GroupLayout.PREFERRED_SIZE)
+                .addComponent(pnlNgWord, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                 .addPreferredGap(ComponentPlacement.RELATED)
-                .addComponent(pnlNgId, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE, GroupLayout.PREFERRED_SIZE)
-                .addContainerGap(82, Short.MAX_VALUE))
+                .addComponent(pnlNgId, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
+                .addContainerGap())
         );
 
         tabbedPane.addTab("NG設定", pnlNgSetting);
 
         pnlSearchVideo.setBorder(BorderFactory.createTitledBorder("動画検索対象フォルダ"));
-
-        lstSearchVideo.setModel(mdlSearchVideo);
-        srcSearchVideo.setViewportView(lstSearchVideo);
-
-        btnSearchVideoAdd.setText("追加...");
-
-        btnSearchVideoDel.setText("削除");
-
-        GroupLayout gl_pnlSearchVideo = new GroupLayout(pnlSearchVideo);
-        pnlSearchVideo.setLayout(gl_pnlSearchVideo);
-        gl_pnlSearchVideo.setHorizontalGroup(
-            gl_pnlSearchVideo.createParallelGroup(GroupLayout.Alignment.LEADING)
-            .addComponent(srcSearchVideo, GroupLayout.DEFAULT_SIZE, 419, Short.MAX_VALUE)
-            .addGroup(GroupLayout.Alignment.TRAILING, gl_pnlSearchVideo.createSequentialGroup()
-                .addContainerGap(269, Short.MAX_VALUE)
-                .addComponent(btnSearchVideoAdd)
-                .addGap(18, 18, 18)
-                .addComponent(btnSearchVideoDel)
-                .addContainerGap())
-        );
-        gl_pnlSearchVideo.setVerticalGroup(
-            gl_pnlSearchVideo.createParallelGroup(GroupLayout.Alignment.LEADING)
-            .addGroup(gl_pnlSearchVideo.createSequentialGroup()
-                .addComponent(srcSearchVideo, GroupLayout.PREFERRED_SIZE, 100, GroupLayout.PREFERRED_SIZE)
-                .addPreferredGap(ComponentPlacement.RELATED)
-                .addGroup(gl_pnlSearchVideo.createParallelGroup(GroupLayout.Alignment.BASELINE)
-                    .addComponent(btnSearchVideoDel)
-                    .addComponent(btnSearchVideoAdd))
-                .addContainerGap(GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
-        );
-
         pnlSearchComment.setBorder(BorderFactory.createTitledBorder("コメント検索対象フォルダ"));
 
-        lstSearchComment.setModel(mdlSearchComment);
-        srcSearchComment.setViewportView(lstSearchComment);
-
-        btnSearchCommentAdd.setText("追加...");
-
-        btnSearchCommentDel.setText("削除");
-
-        GroupLayout gl_pnlSearchComment = new GroupLayout(pnlSearchComment);
-        pnlSearchComment.setLayout(gl_pnlSearchComment);
-        gl_pnlSearchComment.setHorizontalGroup(
-            gl_pnlSearchComment.createParallelGroup(GroupLayout.Alignment.LEADING)
-            .addComponent(srcSearchComment, GroupLayout.DEFAULT_SIZE, 419, Short.MAX_VALUE)
-            .addGroup(GroupLayout.Alignment.TRAILING, gl_pnlSearchComment.createSequentialGroup()
-                .addContainerGap(269, Short.MAX_VALUE)
-                .addComponent(btnSearchCommentAdd)
-                .addGap(18, 18, 18)
-                .addComponent(btnSearchCommentDel)
-                .addContainerGap())
-        );
-        gl_pnlSearchComment.setVerticalGroup(
-            gl_pnlSearchComment.createParallelGroup(GroupLayout.Alignment.LEADING)
-            .addGroup(gl_pnlSearchComment.createSequentialGroup()
-                .addComponent(srcSearchComment, GroupLayout.PREFERRED_SIZE, 100, GroupLayout.PREFERRED_SIZE)
-                .addPreferredGap(ComponentPlacement.RELATED)
-                .addGroup(gl_pnlSearchComment.createParallelGroup(GroupLayout.Alignment.BASELINE)
-                    .addComponent(btnSearchCommentDel)
-                    .addComponent(btnSearchCommentAdd))
-                .addContainerGap(16, Short.MAX_VALUE))
-        );
-
         pnlSearchCache.setBorder(BorderFactory.createEtchedBorder());
 
         lblSearchCache.setText("キャッシュ更新(秒)");
@@ -1058,6 +700,13 @@ public class ConfigDialog extends JDialog {
             }
         });
         final JButton btnCancel = new JButton("Cancel");
+        btnCancel.addActionListener(new ActionListener() {
+
+            @Override
+            public void actionPerformed(ActionEvent e) {
+                dispose();
+            }
+        });
         pnlButton.add(btnOk);
         pnlButton.add(btnCancel);
 
@@ -1143,7 +792,6 @@ public class ConfigDialog extends JDialog {
      */
     public static void main(String args[]) {
         /* 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
          */
@@ -1154,16 +802,9 @@ public class ConfigDialog extends JDialog {
                     break;
                 }
             }
-        } catch (ClassNotFoundException ex) {
-            java.util.logging.Logger.getLogger(ConfigDialog.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);
-        } catch (InstantiationException ex) {
-            java.util.logging.Logger.getLogger(ConfigDialog.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);
-        } catch (IllegalAccessException ex) {
-            java.util.logging.Logger.getLogger(ConfigDialog.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);
-        } catch (UnsupportedLookAndFeelException ex) {
+        } catch (ClassNotFoundException | InstantiationException | IllegalAccessException | UnsupportedLookAndFeelException ex) {
             java.util.logging.Logger.getLogger(ConfigDialog.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);
         }
-        //</editor-fold>
 
         /* Create and display the form */
         java.awt.EventQueue.invokeLater(new Runnable() {
@@ -1186,10 +827,7 @@ public class ConfigDialog extends JDialog {
     private final JTextField fldProxyPort;
     // ファイル
     // ファイル - 動画
-    private final JTextField fldVideoDir;
-    private final JButton btnVideoDir;
-    private final JTextField fldVideoFileNamePattern;
-    private final JCheckBox cbVideoLocal;
+    private final FileVideoPanel pnlFileVideo = new FileVideoPanel();
     // ファイル - コメント
     private final JTextField fldCommentDir;
     private final JButton btnCommentDir;
@@ -1227,42 +865,17 @@ public class ConfigDialog extends JDialog {
     private final JTextField fldFfmpegDllPath;
     private final JButton btnFfmpegDllPath;
     // ffmpeg - ffmpegパラメータ
-    private final JRadioButton rbFfmpegOptionFile;
-    private final JRadioButton rbFfmpegOptionDirectInput;
-    private final JComboBox<FFmpegSelectedItem> cmbFfmpegOptionFile = new JComboBox<>(new OptionComboBoxModel());
-    private final JTextField fldFfmpegOptionExtension;
-    private final JTextField fldFfmpegOptionMain;
-    private final JTextField fldFfmpegOptionIn;
-    private final JTextField fldFfmpegOptionOut;
-    private final JTextField fldFfmpegOptionAv;
-    private final JCheckBox cbFfmpegOptionResize;
-    private final JTextField fldFfmpegOptionResizeWidth;
-    private final JTextField fldFfmpegOptionResizeHeight;
-    private final JCheckBox cbFfmpegOptionKeepAspect;
+    private final FfmpegParamPanel pnlFfmpegParam = new FfmpegParamPanel();
     // NG設定
     // NG設定 - NGワード
-    private final JList<String> lstNgWord;
-    private final DefaultListModel<String> mdlNgWord = new DefaultListModel<>();
-    private final JTextField fldNgWord;
-    private final JButton btnNgWordAdd;
-    private final JButton btnNgWordDel;
+    private final NgRegisterPanel pnlNgWord = new NgRegisterPanel();
     // NG設定 - NGID
-    private final JList<String> lstNgId;
-    private final DefaultListModel<String> mdlNgId = new DefaultListModel<>();
-    private final JTextField fldNgId;
-    private final JButton btnNgIdAdd;
-    private final JButton btnNgIdDel;
+    private final NgRegisterPanel pnlNgId = new NgRegisterPanel();
     // 検索
     // 検索 - 動画検索対象フォルダ
-    private final JList<String> lstSearchVideo;
-    private final DefaultListModel<String> mdlSearchVideo = new DefaultListModel<>();
-    private final JButton btnSearchVideoAdd;
-    private final JButton btnSearchVideoDel;
+    private final DirectoryRegisterPanel pnlSearchVideo = new DirectoryRegisterPanel();
     // 検索 - コメント検索対象フォルダ
-    private final JList<String> lstSearchComment;
-    private final DefaultListModel<String> mdlSearchComment = new DefaultListModel<>();
-    private final JButton btnSearchCommentAdd;
-    private final JButton btnSearchCommentDel;
+    private final DirectoryRegisterPanel pnlSearchComment = new DirectoryRegisterPanel();
     // 検索 - キャッシュ更新(秒)
     private final JTextField fldSearchCache;
     // システム
@@ -1293,9 +906,9 @@ public class ConfigDialog extends JDialog {
         /*
          * ファイル - 動画
          */
-        fldVideoDir.setText(p.getVideoDir());
-        fldVideoFileNamePattern.setText(p.getVideoFileNamePattern());
-        cbVideoLocal.setSelected(p.getVideoUseLocal());
+        pnlFileVideo.fldVideoDir.setText(p.getVideoDir());
+        pnlFileVideo.fldVideoFileNamePattern.setText(p.getVideoFileNamePattern());
+        pnlFileVideo.cbVideoLocal.setSelected(p.getVideoUseLocal());
 
         /*
          * ファイル - コメント
@@ -1347,30 +960,21 @@ public class ConfigDialog extends JDialog {
         /*
          * ffmpeg - ffmpegパラメータ
          */
-        rbFfmpegOptionFile.setSelected(!p.getFfmpegParamInputDirect());
-        rbFfmpegOptionDirectInput.setSelected(p.getFfmpegParamInputDirect());
-        // TODO cmbFfmpegOptionFile
-        fldFfmpegOptionExtension.setText(p.getFfmpegExtension());
-        fldFfmpegOptionMain.setText(p.getFfmpegMainOption());
-        fldFfmpegOptionIn.setText(p.getFfmpegInOption());
-        fldFfmpegOptionOut.setText(p.getFfmpegOutOption());
-        fldFfmpegOptionAv.setText(p.getFfmpegAvOption());
-        cbFfmpegOptionResize.setSelected(p.getFfmpegResizeEnable());
-        fldFfmpegOptionResizeWidth.setText(p.getFfmpegResizeWidth());
-        fldFfmpegOptionResizeHeight.setText(p.getFfmpegResizeHeight());
-        cbFfmpegOptionKeepAspect.setSelected(p.getFfmpegKeepAspect());
+        pnlFfmpegParam.init(p);
 
         /*
          * NG 設定
          */
         final List<String> ngWords = p.getNgWords();
-        for (String s : ngWords) {
-            mdlNgWord.addElement(s);
-        }
+        pnlNgWord.init(ngWords);
         final List<String> ngIds = p.getNgIds();
-        for (String s : ngIds) {
-            mdlNgId.addElement(s);
-        }
+        pnlNgId.init(ngIds);
+
+        /*
+         * 検索
+         */
+        pnlSearchVideo.init(p.getSearchVideoDirs());
+        pnlSearchComment.init(p.getSearchCommentDirs());
 
         /*
          * システム
@@ -1401,9 +1005,9 @@ public class ConfigDialog extends JDialog {
         /*
          * ファイル - 動画
          */
-        p.setVideoDir(fldVideoDir.getText());
-        p.setVideoFileNamePattern(fldVideoFileNamePattern.getText());
-        p.setVideoUseLocal(cbVideoLocal.isSelected());
+        p.setVideoDir(pnlFileVideo.fldVideoDir.getText());
+        p.setVideoFileNamePattern(pnlFileVideo.fldVideoFileNamePattern.getText());
+        p.setVideoUseLocal(pnlFileVideo.cbVideoLocal.isSelected());
 
         /*
          * ファイル - コメント
@@ -1455,31 +1059,29 @@ public class ConfigDialog extends JDialog {
         /*
          * ffmpeg - ffmpegパラメータ
          */
-        p.setFfmpegParamInputDirect(rbFfmpegOptionDirectInput.isSelected());
-        // TODO cmbFfmpegOptionFile
-        p.setFfmpegExtension(fldFfmpegOptionExtension.getText());
-        p.setFfmpegMainOption(fldFfmpegOptionMain.getText());
-        p.setFfmpegInOption(fldFfmpegOptionIn.getText());
-        p.setFfmpegOutOption(fldFfmpegOptionOut.getText());
-        p.setFfmpegAvOption(fldFfmpegOptionAv.getText());
-        p.setFfmpegResizeEnable(cbFfmpegOptionResize.isSelected());
-        p.setFfmpegResizeWidth(fldFfmpegOptionResizeWidth.getText());
-        p.setFfmpegResizeHeight(fldFfmpegOptionResizeHeight.getText());
-        p.setFfmpegKeepAspect(cbFfmpegOptionKeepAspect.isSelected());
+        final File fileFfmpegOption = pnlFfmpegParam.mdlFfmpegOption.getSelectedFile();
+        p.setFfmpegOptionFile(fileFfmpegOption != null ? fileFfmpegOption.getPath() : null);
+        p.setFfmpegExtension(pnlFfmpegParam.fldFfmpegOptionExtension.getText());
+        p.setFfmpegMainOption(pnlFfmpegParam.fldFfmpegOptionMain.getText());
+        p.setFfmpegInOption(pnlFfmpegParam.fldFfmpegOptionIn.getText());
+        p.setFfmpegOutOption(pnlFfmpegParam.fldFfmpegOptionOut.getText());
+        p.setFfmpegAvOption(pnlFfmpegParam.fldFfmpegOptionAv.getText());
+        p.setFfmpegResizeEnable(pnlFfmpegParam.cbFfmpegOptionResize.isSelected());
+        p.setFfmpegResizeWidth(pnlFfmpegParam.fldFfmpegOptionResizeWidth.getText());
+        p.setFfmpegResizeHeight(pnlFfmpegParam.fldFfmpegOptionResizeHeight.getText());
+        p.setFfmpegKeepAspect(pnlFfmpegParam.cbFfmpegOptionKeepAspect.isSelected());
 
         /*
          * NG 設定
          */
-        final List<String> ngWords = new ArrayList<>(mdlNgId.getSize());
-        for (int i = 0; i < mdlNgId.getSize(); i++) {
-            ngWords.add(mdlNgId.get(i));
-        }
-        p.setNgWords(ngWords);
-        final List<String> ngIds = new ArrayList<>(mdlNgWord.getSize());
-        for(int i = 0; i<mdlNgWord.getSize();i++) {
-            ngIds.add(mdlNgWord.get(i));
-        }
-        p.setNgIds(ngIds);
+        p.setNgWords(pnlNgWord.getAllElements());
+        p.setNgIds(pnlNgId.getAllElements());
+
+        /*
+         * 検索
+         */
+        p.setSearchVideoDirs(pnlSearchVideo.getAllElements());
+        p.setSearchCommentDirs(pnlSearchComment.getAllElements());
 
         /*
          * システム
@@ -1496,3 +1098,56 @@ public class ConfigDialog extends JDialog {
         }
     }
 }
+
+class FileVideoPanel extends JPanel {
+    final JTextField fldVideoDir = new JTextField();
+    final JButton btnVideoDir = new JButton("...");
+    final JTextField fldVideoFileNamePattern = new JTextField();
+    final JCheckBox cbVideoLocal = new JCheckBox("local");
+
+    FileVideoPanel(){
+        super();
+
+        final JLabel lblVideoDir = new JLabel("保存フォルダ");
+
+        final JLabel lblVideoFileNamepattern = new JLabel("ファイル名規則");
+
+
+        GroupLayout gl_pnlFileVideo = new GroupLayout(this);
+        setLayout(gl_pnlFileVideo);
+        gl_pnlFileVideo.setHorizontalGroup(
+            gl_pnlFileVideo.createParallelGroup(GroupLayout.Alignment.LEADING)
+            .addGroup(GroupLayout.Alignment.TRAILING, gl_pnlFileVideo.createSequentialGroup()
+                .addContainerGap()
+                .addGroup(gl_pnlFileVideo.createParallelGroup(GroupLayout.Alignment.LEADING)
+                    .addComponent(lblVideoFileNamepattern)
+                    .addComponent(lblVideoDir))
+                .addPreferredGap(ComponentPlacement.RELATED)
+                .addGroup(gl_pnlFileVideo.createParallelGroup(GroupLayout.Alignment.LEADING)
+                    .addGroup(gl_pnlFileVideo.createSequentialGroup()
+                        .addComponent(fldVideoDir, GroupLayout.DEFAULT_SIZE, 262, Short.MAX_VALUE)
+                        .addPreferredGap(ComponentPlacement.RELATED)
+                        .addComponent(btnVideoDir))
+                    .addGroup(GroupLayout.Alignment.TRAILING, gl_pnlFileVideo.createSequentialGroup()
+                        .addComponent(fldVideoFileNamePattern, GroupLayout.PREFERRED_SIZE, 165, GroupLayout.PREFERRED_SIZE)
+                        .addPreferredGap(ComponentPlacement.RELATED, 94, Short.MAX_VALUE)
+                        .addComponent(cbVideoLocal)))
+                .addContainerGap())
+        );
+        gl_pnlFileVideo.setVerticalGroup(
+            gl_pnlFileVideo.createParallelGroup(GroupLayout.Alignment.LEADING)
+            .addGroup(gl_pnlFileVideo.createSequentialGroup()
+                .addGroup(gl_pnlFileVideo.createParallelGroup(GroupLayout.Alignment.BASELINE)
+                    .addComponent(lblVideoDir)
+                    .addComponent(fldVideoDir, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE, GroupLayout.PREFERRED_SIZE)
+                    .addComponent(btnVideoDir))
+                .addPreferredGap(ComponentPlacement.RELATED)
+                .addGroup(gl_pnlFileVideo.createParallelGroup(GroupLayout.Alignment.BASELINE)
+                    .addComponent(lblVideoFileNamepattern)
+                    .addComponent(fldVideoFileNamePattern, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE, GroupLayout.PREFERRED_SIZE)
+                    .addComponent(cbVideoLocal))
+                .addContainerGap(GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
+        );
+
+    }
+}