Move buttons to top.

This commit is contained in:
kruland2607 2013-10-02 08:55:55 -05:00
parent 6abcda7abd
commit ed0444a909

View File

@ -45,16 +45,15 @@ public class FlightConfigurationPanel extends JPanel implements StateChangeListe
} }
public FlightConfigurationPanel(OpenRocketDocument doc) { public FlightConfigurationPanel(OpenRocketDocument doc) {
super(new MigLayout("fill")); super(new MigLayout("fill","[grow][][][][][grow]"));
this.document = doc; this.document = doc;
this.rocket = doc.getRocket(); this.rocket = doc.getRocket();
JPanel panel = new JPanel(new MigLayout("fill","[grow][][][][][grow]")); //JPanel panel = new JPanel(new MigLayout("fill","[grow][][][][][grow]"));
//// Tabs for advanced view. //// Tabs for advanced view.
tabs = new JTabbedPane(); tabs = new JTabbedPane();
this.add(tabs, "spanx, grow, wrap");
//// Motor tabs //// Motor tabs
motorConfigurationPanel = new MotorConfigurationPanel(this, rocket); motorConfigurationPanel = new MotorConfigurationPanel(this, rocket);
@ -77,7 +76,7 @@ public class FlightConfigurationPanel extends JPanel implements StateChangeListe
}); });
panel.add(newConfButton,"skip 1,gapright para"); this.add(newConfButton,"skip 1,gapright para");
renameConfButton = new JButton(trans.get("edtmotorconfdlg.but.Renameconfiguration")); renameConfButton = new JButton(trans.get("edtmotorconfdlg.but.Renameconfiguration"));
renameConfButton.addActionListener(new ActionListener() { renameConfButton.addActionListener(new ActionListener() {
@ -87,7 +86,7 @@ public class FlightConfigurationPanel extends JPanel implements StateChangeListe
configurationChanged(); configurationChanged();
} }
}); });
panel.add(renameConfButton,"gapright para"); this.add(renameConfButton,"gapright para");
removeConfButton = new JButton(trans.get("edtmotorconfdlg.but.Removeconfiguration")); removeConfButton = new JButton(trans.get("edtmotorconfdlg.but.Removeconfiguration"));
removeConfButton.addActionListener(new ActionListener() { removeConfButton.addActionListener(new ActionListener() {
@ -97,7 +96,7 @@ public class FlightConfigurationPanel extends JPanel implements StateChangeListe
configurationChanged(); configurationChanged();
} }
}); });
panel.add(removeConfButton,"gapright para"); this.add(removeConfButton,"gapright para");
copyConfButton = new JButton(trans.get("edtmotorconfdlg.but.Copyconfiguration")); copyConfButton = new JButton(trans.get("edtmotorconfdlg.but.Copyconfiguration"));
copyConfButton.addActionListener(new ActionListener() { copyConfButton.addActionListener(new ActionListener() {
@ -107,11 +106,13 @@ public class FlightConfigurationPanel extends JPanel implements StateChangeListe
configurationChanged(); configurationChanged();
} }
}); });
panel.add(copyConfButton, "wrap para"); this.add(copyConfButton, "wrap");
this.add(panel, "growx");
updateButtonState(); updateButtonState();
this.add(tabs, "spanx, grow, wrap rel");
this.rocket.getDefaultConfiguration().addChangeListener(this); this.rocket.getDefaultConfiguration().addChangeListener(this);
} }