From bb11644fbb82e372a1d38d02934b88e45eecec61 Mon Sep 17 00:00:00 2001 From: yukihane Date: Wed, 31 Aug 2011 19:58:10 +0900 Subject: [PATCH] =?utf8?q?=E3=83=95=E3=82=A1=E3=82=A4=E3=83=AB=E9=81=B8?= =?utf8?q?=E6=8A=9E=E3=83=9C=E3=82=BF=E3=83=B3=E3=82=92=E5=89=8A=E9=99=A4?= MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit --- frontend/src/yukihane/inqubus/gui/MainFrame.java | 65 ++++++++---------------- 1 file changed, 21 insertions(+), 44 deletions(-) diff --git a/frontend/src/yukihane/inqubus/gui/MainFrame.java b/frontend/src/yukihane/inqubus/gui/MainFrame.java index 4643fea..f221e0a 100644 --- a/frontend/src/yukihane/inqubus/gui/MainFrame.java +++ b/frontend/src/yukihane/inqubus/gui/MainFrame.java @@ -125,7 +125,6 @@ public class MainFrame extends JFrame { cbVideoLocal.setToolTipText(FILE_LOCALBUTTON_TOOLTIP); fldVideo = new JTextField(); fldVideo.setToolTipText(FILE_INPUTFIELD_TOOLTIP); - btnVideo = new JButton(); final JLabel lblComment = new JLabel(); fldBackLog.setToolTipText("YYYY/MM/DD hh:mm:ss形式、あるいは1970/01/01からの経過秒を入力します。"); @@ -161,7 +160,6 @@ public class MainFrame extends JFrame { }); fldComment = new JTextField(); fldComment.setToolTipText(FILE_INPUTFIELD_TOOLTIP); - btnComment = new JButton(); final JLabel lblOutput = new JLabel(); cbOutputEnable = new JCheckBox(); fldOutput = new JTextField(); @@ -222,8 +220,6 @@ public class MainFrame extends JFrame { } }); - btnVideo.setText("..."); - lblComment.setText("コメント"); cbCommentLocal.setText("local"); @@ -234,8 +230,6 @@ public class MainFrame extends JFrame { } }); - btnComment.setText("..."); - lblOutput.setText("出力"); cbOutputEnable.setText("変換"); @@ -267,34 +261,26 @@ public class MainFrame extends JFrame { .addGroup(glInputMain.createSequentialGroup() .addContainerGap() .addGroup(glInputMain.createParallelGroup(Alignment.LEADING) - .addGroup(glInputMain.createSequentialGroup() - .addGroup(glInputMain.createParallelGroup(Alignment.LEADING) - .addComponent(lblVideo) - .addComponent(lblComment) - .addComponent(lblOutput)) - .addPreferredGap(ComponentPlacement.RELATED) - .addGroup(glInputMain.createParallelGroup(Alignment.LEADING) - .addGroup(glInputMain.createSequentialGroup() - .addComponent(cbVideoLocal) - .addPreferredGap(ComponentPlacement.RELATED) - .addComponent(fldVideo, GroupLayout.DEFAULT_SIZE, 317, Short.MAX_VALUE) - .addPreferredGap(ComponentPlacement.RELATED) - .addComponent(btnVideo)) - .addGroup(Alignment.TRAILING, glInputMain.createSequentialGroup() - .addGroup(glInputMain.createParallelGroup(Alignment.TRAILING) - .addGroup(Alignment.LEADING, glInputMain.createSequentialGroup() - .addComponent(cbOutputEnable) - .addPreferredGap(ComponentPlacement.RELATED) - .addComponent(fldOutput, GroupLayout.DEFAULT_SIZE, 317, Short.MAX_VALUE)) - .addGroup(glInputMain.createSequentialGroup() - .addComponent(cbCommentLocal) - .addPreferredGap(ComponentPlacement.RELATED) - .addComponent(fldComment, GroupLayout.DEFAULT_SIZE, 317, Short.MAX_VALUE))) - .addPreferredGap(ComponentPlacement.RELATED) - .addComponent(btnComment)))) - ) - .addContainerGap()) + .addComponent(lblVideo) + .addComponent(lblComment) + .addComponent(lblOutput) + ) + .addPreferredGap(ComponentPlacement.RELATED) + .addGroup(glInputMain.createParallelGroup(Alignment.LEADING) + .addComponent(cbVideoLocal) + .addComponent(cbCommentLocal) + .addComponent(cbOutputEnable) + ) + .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(fldOutput, GroupLayout.DEFAULT_SIZE, 300, Short.MAX_VALUE) + ) + .addContainerGap() + ) ); + glInputMain.setVerticalGroup( glInputMain.createParallelGroup(Alignment.LEADING) .addGroup(glInputMain.createSequentialGroup() @@ -310,19 +296,18 @@ public class MainFrame extends JFrame { .addGroup(glInputMain.createParallelGroup(Alignment.BASELINE) .addComponent(lblVideo) .addComponent(fldVideo, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE, GroupLayout.PREFERRED_SIZE) - .addComponent(btnVideo) .addComponent(cbVideoLocal)) .addPreferredGap(ComponentPlacement.RELATED) .addGroup(glInputMain.createParallelGroup(Alignment.BASELINE) .addComponent(lblComment) .addComponent(fldComment, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE, GroupLayout.PREFERRED_SIZE) - .addComponent(btnComment) .addComponent(cbCommentLocal)) .addPreferredGap(ComponentPlacement.RELATED) .addGroup(glInputMain.createParallelGroup(Alignment.BASELINE) .addComponent(lblOutput) .addComponent(fldOutput, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE, GroupLayout.PREFERRED_SIZE) - .addComponent(cbOutputEnable)) + .addComponent(cbOutputEnable) + ) ) ); @@ -543,21 +528,17 @@ public class MainFrame extends JFrame { final ItemSelectable source = evt.getItemSelectable(); - JButton btn; JTextField field; File dir; if (source == cbVideoLocal) { - btn = btnVideo; field = fldVideo; dir = new File(p.getVideoDir()); } else { - btn = btnComment; field = fldComment; dir = new File(p.getCommentDir()); } final boolean useLocal = (evt.getStateChange() == ItemEvent.SELECTED); - btn.setEnabled(useLocal); String text; if (useLocal) { @@ -616,10 +597,8 @@ public class MainFrame extends JFrame { private final JTextField fldBackLog = new JTextField(); private final JCheckBox cbVideoLocal; private final JTextField fldVideo; - private final JButton btnVideo; private final JCheckBox cbCommentLocal; private final JTextField fldComment; - private final JButton btnComment; private final JCheckBox cbOutputEnable; private final JTextField fldOutput; // 入力領域 - ffmpeg @@ -643,14 +622,12 @@ public class MainFrame extends JFrame { final boolean movieLocal = p.getVideoUseLocal(); cbVideoLocal.setSelected(movieLocal); - btnVideo.setEnabled(movieLocal); if (!movieLocal) { fldVideo.setText(p.getVideoFileNamePattern()); } final boolean commentLocal = p.getCommentUseLocal(); cbCommentLocal.setSelected(commentLocal); - btnComment.setEnabled(commentLocal); if (!commentLocal) { fldComment.setText(p.getCommentFileNamePattern()); } -- 2.11.0