OSDN Git Service

videoInfoPanelのレイアウトをGroupLayoutで書き直し
authoryukihane <yukihane.feather@gmail.com>
Fri, 19 Aug 2011 10:23:43 +0000 (19:23 +0900)
committeryukihane <yukihane.feather@gmail.com>
Fri, 19 Aug 2011 10:23:43 +0000 (19:23 +0900)
frontend/src/saccubus/MainFrame.java

index 9d8fce0..4007c56 100644 (file)
@@ -175,6 +175,9 @@ public class MainFrame extends JFrame {
         }
     }
 
+    /**
+     * メイン画面最上部(ID/URL, 過去ログ, 変換ボタン)のパネルを初期化します.
+     */
     private void initVideoInfoPanel() {
 
         videoIdLabel.setText("URL/ID");
@@ -206,18 +209,14 @@ public class MainFrame extends JFrame {
         doButton.setText(DoButtonDefString);
         doButton.addActionListener(new MainFrame_DoButton_actionAdapter(this));
 
-        videoInfoPanel.setLayout(gridBagLayout1);
-        videoInfoPanel.add(opPanel, new GridBagConstraints(0, 0, 1, 1, 1.0,
-                0.0, GridBagConstraints.CENTER, GridBagConstraints.BOTH,
-                new Insets(0, 0, 0, 0), 0, 0));
+        final GroupLayout vipLayout = new GroupLayout(videoInfoPanel);
+        videoInfoPanel.setLayout(vipLayout);
 
-        final GridBagConstraints gridBagConstraints71 = new GridBagConstraints(1, 0, 1, 1, 0.0, 0.0,
-                GridBagConstraints.CENTER,
-                GridBagConstraints.NONE, new Insets(0, 0, 0, 0), 0, 6);
-        gridBagConstraints71.fill = GridBagConstraints.BOTH;
-        gridBagConstraints71.ipady = 0;
+        vipLayout.setHorizontalGroup(vipLayout.createSequentialGroup()
+                .addComponent(opPanel).addComponent(doButton));
 
-        videoInfoPanel.add(doButton, gridBagConstraints71);
+        vipLayout.setVerticalGroup(vipLayout.createParallelGroup()
+                .addComponent(opPanel).addComponent(doButton, 10, 20, 50));
     }
 
     /**
@@ -868,7 +867,6 @@ public class MainFrame extends JFrame {
     // FFmpegの設定 ここまで
     private JLabel FontIndexLabel = new JLabel();
     private JTextField fontIndexField = new JTextField();
-    private GridBagLayout gridBagLayout1 = new GridBagLayout();
     private JPanel BasicInfoTabPanel = new JPanel();
     private GridBagLayout gridBagLayout12 = new GridBagLayout();
     private JPanel ConvertingSettingPanel = null;