OSDN Git Service

動画/コメントファイル名入力欄をコンボボックスにする
authoryukihane <yukihane.feather@gmail.com>
Fri, 2 Sep 2011 14:44:40 +0000 (23:44 +0900)
committeryukihane <yukihane.feather@gmail.com>
Fri, 9 Sep 2011 11:41:06 +0000 (20:41 +0900)
frontend/src/yukihane/inqubus/gui/MainFrame.java

index fa719c6..c575716 100644 (file)
@@ -155,8 +155,7 @@ public class MainFrame extends JFrame {
         final JLabel lblVideo = new JLabel();
         cbVideoLocal = new JCheckBox();
         cbVideoLocal.setToolTipText(FILE_LOCALBUTTON_TOOLTIP);
-        fldVideo = new JTextField();
-        fldVideo.setToolTipText(FILE_INPUTFIELD_TOOLTIP);
+        cmbVideo.setToolTipText(FILE_INPUTFIELD_TOOLTIP);
         btnVideo.addActionListener(
                 new FileChooseAction(MainFrame.this, JFileChooser.FILES_ONLY, fldVideo));
         final JLabel lblComment = new JLabel();
@@ -192,8 +191,7 @@ public class MainFrame extends JFrame {
                 cbBackLog.setEnabled(!selected);
             }
         });
-        fldComment = new JTextField();
-        fldComment.setToolTipText(FILE_INPUTFIELD_TOOLTIP);
+        cmbComment.setToolTipText(FILE_INPUTFIELD_TOOLTIP);
         btnComment.addActionListener(
                 new FileChooseAction(MainFrame.this, JFileChooser.FILES_ONLY, fldComment));
         final JLabel lblOutput = new JLabel();
@@ -319,8 +317,8 @@ public class MainFrame extends JFrame {
                 )
                 .addPreferredGap(ComponentPlacement.RELATED)
                 .addGroup(glInputMain.createParallelGroup(Alignment.LEADING)
-                    .addComponent(fldVideo, GroupLayout.DEFAULT_SIZE, 300, Short.MAX_VALUE)
-                    .addComponent(fldComment, GroupLayout.DEFAULT_SIZE, 300, Short.MAX_VALUE)
+                    .addComponent(cmbVideo, GroupLayout.DEFAULT_SIZE, 300, Short.MAX_VALUE)
+                    .addComponent(cmbComment, GroupLayout.DEFAULT_SIZE, 300, Short.MAX_VALUE)
                     .addComponent(fldOutput, GroupLayout.DEFAULT_SIZE, 300, Short.MAX_VALUE)
                 )
                 .addGroup(glInputMain.createParallelGroup()
@@ -346,14 +344,14 @@ public class MainFrame extends JFrame {
                 .addGroup(glInputMain.createParallelGroup(Alignment.BASELINE)
                     .addComponent(lblVideo)
                     .addComponent(cbVideoLocal)
-                    .addComponent(fldVideo, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE, GroupLayout.PREFERRED_SIZE)
+                    .addComponent(cmbVideo, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE, GroupLayout.PREFERRED_SIZE)
                     .addComponent(btnVideo)
                 )
                 .addPreferredGap(ComponentPlacement.RELATED)
                 .addGroup(glInputMain.createParallelGroup(Alignment.BASELINE)
                     .addComponent(lblComment)
                     .addComponent(cbCommentLocal)
-                    .addComponent(fldComment, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE, GroupLayout.PREFERRED_SIZE)
+                    .addComponent(cmbComment, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE, GroupLayout.PREFERRED_SIZE)
                     .addComponent(btnComment)
                 )
                 .addPreferredGap(ComponentPlacement.RELATED)
@@ -685,10 +683,12 @@ public class MainFrame extends JFrame {
     private final JCheckBox cbBackLog = new JCheckBox("過去ログ");
     private final JTextField fldBackLog = new JTextField();
     private final JCheckBox cbVideoLocal;
-    private final JTextField fldVideo;
+    private final FileComboBox cmbVideo = new FileComboBox();
+    private final JTextField fldVideo = cmbVideo.getEditorComponent();
     private final JButton btnVideo = new JButton("...");
     private final JCheckBox cbCommentLocal;
-    private final JTextField fldComment;
+    private final FileComboBox cmbComment = new FileComboBox();
+    private final JTextField fldComment = cmbComment.getEditorComponent();
     private final JButton btnComment = new JButton("...");
     private final JCheckBox cbOutputEnable;
     private final JTextField fldOutput;