OSDN Git Service

コメント検索ディレクトリ設定パネルを共通化
authoryukihane <yukihane.feather@gmail.com>
Wed, 31 Aug 2011 13:56:56 +0000 (22:56 +0900)
committeryukihane <yukihane.feather@gmail.com>
Wed, 31 Aug 2011 13:59:53 +0000 (22:59 +0900)
frontend/src/yukihane/inqubus/gui/ConfigDialog.java

index 361ed5d..96e48b1 100644 (file)
@@ -17,7 +17,6 @@ import java.util.logging.Logger;
 import javax.swing.BorderFactory;
 import javax.swing.ComboBoxModel;
 import javax.swing.DefaultComboBoxModel;
 import javax.swing.BorderFactory;
 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;
 import javax.swing.GroupLayout;
 import javax.swing.GroupLayout.Alignment;
 import javax.swing.JButton;
@@ -26,9 +25,7 @@ import javax.swing.JComboBox;
 import javax.swing.JDialog;
 import javax.swing.JFrame;
 import javax.swing.JLabel;
 import javax.swing.JDialog;
 import javax.swing.JFrame;
 import javax.swing.JLabel;
-import javax.swing.JList;
 import javax.swing.JPanel;
 import javax.swing.JPanel;
-import javax.swing.JScrollPane;
 import javax.swing.JTabbedPane;
 import javax.swing.JTextField;
 import javax.swing.LayoutStyle.ComponentPlacement;
 import javax.swing.JTabbedPane;
 import javax.swing.JTextField;
 import javax.swing.LayoutStyle.ComponentPlacement;
@@ -124,11 +121,6 @@ public class ConfigDialog extends JDialog {
         btnFfmpegDllPath = new JButton();
         final JPanel pnlNgSetting = new JPanel();
         final JPanel pnlSearch = new JPanel();
         btnFfmpegDllPath = new JButton();
         final JPanel pnlNgSetting = new JPanel();
         final JPanel pnlSearch = new JPanel();
-        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();
         final JPanel pnlSearchCache = new JPanel();
         final JLabel lblSearchCache = new JLabel();
         fldSearchCache = new JTextField();
@@ -695,40 +687,8 @@ public class ConfigDialog extends JDialog {
         tabbedPane.addTab("NG設定", pnlNgSetting);
 
         pnlSearchVideo.setBorder(BorderFactory.createTitledBorder("動画検索対象フォルダ"));
         tabbedPane.addTab("NG設定", pnlNgSetting);
 
         pnlSearchVideo.setBorder(BorderFactory.createTitledBorder("動画検索対象フォルダ"));
-
-
         pnlSearchComment.setBorder(BorderFactory.createTitledBorder("コメント検索対象フォルダ"));
 
         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("キャッシュ更新(秒)");
         pnlSearchCache.setBorder(BorderFactory.createEtchedBorder());
 
         lblSearchCache.setText("キャッシュ更新(秒)");
@@ -970,10 +930,7 @@ public class ConfigDialog extends JDialog {
     // 検索 - 動画検索対象フォルダ
     private final DirectoryRegisterPanel pnlSearchVideo = new DirectoryRegisterPanel();
     // 検索 - コメント検索対象フォルダ
     // 検索 - 動画検索対象フォルダ
     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;
     // システム
     // 検索 - キャッシュ更新(秒)
     private final JTextField fldSearchCache;
     // システム