diff --git a/core/.classpath b/core/.classpath
index 753ef1030..81fec6f9a 100644
--- a/core/.classpath
+++ b/core/.classpath
@@ -18,12 +18,12 @@
-
-
-
-
-
-
-
+
+
+
+
+
+
+
diff --git a/core/src/net/sf/openrocket/document/OpenRocketDocument.java b/core/src/net/sf/openrocket/document/OpenRocketDocument.java
index fdf88c742..c479005b9 100644
--- a/core/src/net/sf/openrocket/document/OpenRocketDocument.java
+++ b/core/src/net/sf/openrocket/document/OpenRocketDocument.java
@@ -287,7 +287,7 @@ public class OpenRocketDocument implements ComponentChangeListener {
}
for (Simulation s : getSimulations()) {
// Assumes modifiable collection - which it is
- if (s.getConfiguration().getFlightConfigurationID().equals(configId)) {
+ if (configId.equals(s.getConfiguration().getFlightConfigurationID())) {
removeSimulation(s);
}
}
diff --git a/lib-test/.classpath b/lib-test/.classpath
new file mode 100644
index 000000000..d8f3ede07
--- /dev/null
+++ b/lib-test/.classpath
@@ -0,0 +1,12 @@
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/lib-test/.gitignore b/lib-test/.gitignore
new file mode 100644
index 000000000..5e56e040e
--- /dev/null
+++ b/lib-test/.gitignore
@@ -0,0 +1 @@
+/bin
diff --git a/lib-test/.project b/lib-test/.project
new file mode 100644
index 000000000..0dca65e02
--- /dev/null
+++ b/lib-test/.project
@@ -0,0 +1,17 @@
+
+
+ OpenRocket Test Libraries
+
+
+
+
+
+ org.eclipse.jdt.core.javabuilder
+
+
+
+
+
+ org.eclipse.jdt.core.javanature
+
+
diff --git a/swing/.classpath b/swing/.classpath
index 94bc55d43..db78974b7 100644
--- a/swing/.classpath
+++ b/swing/.classpath
@@ -6,7 +6,6 @@
-
@@ -21,5 +20,6 @@
+
diff --git a/swing/build.xml b/swing/build.xml
index 53afdf087..5b5c4408e 100644
--- a/swing/build.xml
+++ b/swing/build.xml
@@ -29,8 +29,6 @@
-
-
@@ -93,7 +91,7 @@
-
+
@@ -101,7 +99,6 @@
-
diff --git a/swing/lib/miglayout-4.0-swing.jar b/swing/lib/miglayout-4.0-swing.jar
new file mode 100644
index 000000000..7b6a22cac
Binary files /dev/null and b/swing/lib/miglayout-4.0-swing.jar differ
diff --git a/swing/lib/miglayout15-swing.jar b/swing/lib/miglayout15-swing.jar
deleted file mode 100644
index 2e5301255..000000000
Binary files a/swing/lib/miglayout15-swing.jar and /dev/null differ
diff --git a/swing/reference/miglayout-4.0-sources.jar b/swing/reference/miglayout-4.0-sources.jar
new file mode 100644
index 000000000..7628516df
Binary files /dev/null and b/swing/reference/miglayout-4.0-sources.jar differ
diff --git a/swing/src/net/sf/openrocket/gui/configdialog/BodyTubeConfig.java b/swing/src/net/sf/openrocket/gui/configdialog/BodyTubeConfig.java
index 2e5dad565..e490c23a0 100644
--- a/swing/src/net/sf/openrocket/gui/configdialog/BodyTubeConfig.java
+++ b/swing/src/net/sf/openrocket/gui/configdialog/BodyTubeConfig.java
@@ -15,7 +15,6 @@ import net.sf.openrocket.gui.components.BasicSlider;
import net.sf.openrocket.gui.components.UnitSelector;
import net.sf.openrocket.l10n.Translator;
import net.sf.openrocket.material.Material;
-import net.sf.openrocket.rocketcomponent.BodyTube;
import net.sf.openrocket.rocketcomponent.MotorMount;
import net.sf.openrocket.rocketcomponent.RocketComponent;
import net.sf.openrocket.startup.Application;
@@ -98,10 +97,6 @@ public class BodyTubeConfig extends RocketComponentConfig {
check.setText(trans.get("BodyTubecfg.checkbox.Filled"));
panel.add(check, "skip, span 2, wrap");
- MotorConfig motorConfig = new MotorConfig((MotorMount)c);
-
- panel.add(motorConfig,"spanx, growx");
-
//// Material
panel.add(materialPanel(new JPanel(new MigLayout()), Material.Type.BULK),
"cell 4 0, gapleft paragraph, aligny 0%, spany");
@@ -112,6 +107,11 @@ public class BodyTubeConfig extends RocketComponentConfig {
tabbedPane.setSelectedIndex(0);
+ MotorConfig motorConfig = new MotorConfig((MotorMount)c);
+
+ tabbedPane.insertTab(trans.get("BodyTubecfg.tab.Motor"), null, motorConfig,
+ trans.get("BodyTubecfg.tab.Motormountconf"), 1);
+
}
diff --git a/swing/src/net/sf/openrocket/gui/configdialog/InnerTubeConfig.java b/swing/src/net/sf/openrocket/gui/configdialog/InnerTubeConfig.java
index 4d981d7b3..338feb38c 100644
--- a/swing/src/net/sf/openrocket/gui/configdialog/InnerTubeConfig.java
+++ b/swing/src/net/sf/openrocket/gui/configdialog/InnerTubeConfig.java
@@ -39,7 +39,6 @@ import net.sf.openrocket.l10n.Translator;
import net.sf.openrocket.material.Material;
import net.sf.openrocket.rocketcomponent.ClusterConfiguration;
import net.sf.openrocket.rocketcomponent.Clusterable;
-import net.sf.openrocket.rocketcomponent.EngineBlock;
import net.sf.openrocket.rocketcomponent.InnerTube;
import net.sf.openrocket.rocketcomponent.MotorMount;
import net.sf.openrocket.rocketcomponent.RingComponent;
@@ -168,10 +167,6 @@ public class InnerTubeConfig extends RocketComponentConfig {
new DoubleModel(component.getParent(), "Length"))),
"w 100lp, wrap");
- MotorConfig motorConfig = new MotorConfig((MotorMount)c);
-
- panel.add(motorConfig,"spanx, growx");
-
//// Material
panel.add(materialPanel(new JPanel(new MigLayout()), Material.Type.BULK),
"cell 4 0, gapleft paragraph, aligny 0%, spany");
@@ -179,6 +174,11 @@ public class InnerTubeConfig extends RocketComponentConfig {
tabbedPane.insertTab(trans.get("ThicknessRingCompCfg.tab.General"), null, panel,
trans.get("ThicknessRingCompCfg.tab.Generalprop"), 0);
+ MotorConfig motorConfig = new MotorConfig((MotorMount)c);
+
+ tabbedPane.insertTab(trans.get("InnerTubeCfg.tab.Motor"), null, motorConfig,
+ trans.get("InnerTubeCfg.tab.ttip.Motor"), 1);
+
JPanel tab = clusterTab();
//// Cluster and Cluster configuration
tabbedPane.insertTab(trans.get("InnerTubeCfg.tab.Cluster"), null, tab,
diff --git a/swing/src/net/sf/openrocket/gui/configdialog/MotorConfig.java b/swing/src/net/sf/openrocket/gui/configdialog/MotorConfig.java
index ca4538e38..eaa449245 100644
--- a/swing/src/net/sf/openrocket/gui/configdialog/MotorConfig.java
+++ b/swing/src/net/sf/openrocket/gui/configdialog/MotorConfig.java
@@ -39,7 +39,6 @@ public class MotorConfig extends JPanel {
this.mount = motorMount;
- this.setBorder( BorderFactory.createLineBorder(Color.BLACK,1) );
BooleanModel model;
model = new BooleanModel(motorMount, "MotorMount");
diff --git a/swing/src/net/sf/openrocket/gui/configdialog/RocketComponentConfig.java b/swing/src/net/sf/openrocket/gui/configdialog/RocketComponentConfig.java
index 02b59f507..dea61a680 100644
--- a/swing/src/net/sf/openrocket/gui/configdialog/RocketComponentConfig.java
+++ b/swing/src/net/sf/openrocket/gui/configdialog/RocketComponentConfig.java
@@ -352,7 +352,7 @@ public class RocketComponentConfig extends JPanel {
private JPanel commentTab() {
- JPanel panel = new JPanel(new MigLayout("fill"));
+ JPanel panel = new JPanel(new MigLayout("fill","[]","[][grow]"));
//// Comments on the
panel.add(new StyledLabel(trans.get("RocketCompCfg.lbl.Commentsonthe") + " " + component.getComponentName() + ":",
@@ -366,7 +366,7 @@ public class RocketComponentConfig extends JPanel {
GUIUtil.setTabToFocusing(commentTextArea);
commentTextArea.addFocusListener(textFieldListener);
- panel.add(new JScrollPane(commentTextArea), "width 10px, height 10px, growx, growy");
+ panel.add(new JScrollPane(commentTextArea), "grow");
return panel;
}
diff --git a/swing/src/net/sf/openrocket/gui/configdialog/ThicknessRingComponentConfig.java b/swing/src/net/sf/openrocket/gui/configdialog/ThicknessRingComponentConfig.java
new file mode 100644
index 000000000..3013b7c97
--- /dev/null
+++ b/swing/src/net/sf/openrocket/gui/configdialog/ThicknessRingComponentConfig.java
@@ -0,0 +1,34 @@
+package net.sf.openrocket.gui.configdialog;
+
+
+import javax.swing.JPanel;
+
+import net.sf.openrocket.document.OpenRocketDocument;
+import net.sf.openrocket.l10n.Translator;
+import net.sf.openrocket.rocketcomponent.RocketComponent;
+import net.sf.openrocket.startup.Application;
+
+
+
+public class ThicknessRingComponentConfig extends RingComponentConfig {
+ private static final Translator trans = Application.getTranslator();
+
+ public ThicknessRingComponentConfig(OpenRocketDocument d, RocketComponent c) {
+ super(d, c);
+
+ JPanel tab;
+
+ //// Outer diameter:
+ //// Inner diameter:
+ //// Wall thickness:
+ //// Length:
+ tab = generalTab(trans.get("ThicknessRingCompCfg.tab.Outerdiam"),
+ trans.get("ThicknessRingCompCfg.tab.Innerdiam"),
+ trans.get("ThicknessRingCompCfg.tab.Wallthickness"), trans.get("ThicknessRingCompCfg.tab.Length"));
+ //// General and General properties
+ tabbedPane.insertTab(trans.get("ThicknessRingCompCfg.tab.General"), null, tab,
+ trans.get("ThicknessRingCompCfg.tab.Generalprop"), 0);
+ tabbedPane.setSelectedIndex(0);
+ }
+
+}
\ No newline at end of file
diff --git a/swing/src/net/sf/openrocket/gui/dialogs/motor/thrustcurve/MotorFilterPanel.java b/swing/src/net/sf/openrocket/gui/dialogs/motor/thrustcurve/MotorFilterPanel.java
index 31ebf72bd..421c4f3c8 100644
--- a/swing/src/net/sf/openrocket/gui/dialogs/motor/thrustcurve/MotorFilterPanel.java
+++ b/swing/src/net/sf/openrocket/gui/dialogs/motor/thrustcurve/MotorFilterPanel.java
@@ -344,8 +344,6 @@ public abstract class MotorFilterPanel extends JPanel {
((SwingPreferences) Application.getPreferences()).putBoolean("motorFilterLimitLength", limitLength);
if ( mountLength != null & limitLength ) {
lengthSlider.setValueAt(1, (int) Math.min(1000,Math.round(1000*mountLength)));
- } else {
- lengthSlider.setValueAt(1, 1000);
}
}
@@ -363,8 +361,6 @@ public abstract class MotorFilterPanel extends JPanel {
i--;
}
diameterSlider.setValueAt(1, i-1);
- } else {
- diameterSlider.setValueAt(1, diameterValues.length-1);
}
}
diff --git a/swing/src/net/sf/openrocket/gui/main/flightconfigpanel/MotorConfigurationPanel.java b/swing/src/net/sf/openrocket/gui/main/flightconfigpanel/MotorConfigurationPanel.java
index 538eb9709..0bb128a4b 100644
--- a/swing/src/net/sf/openrocket/gui/main/flightconfigpanel/MotorConfigurationPanel.java
+++ b/swing/src/net/sf/openrocket/gui/main/flightconfigpanel/MotorConfigurationPanel.java
@@ -49,11 +49,15 @@ public class MotorConfigurationPanel extends FlightConfigurablePanel
private final JButton selectMotorButton, removeMotorButton, selectIgnitionButton, resetIgnitionButton;
+ private final MotorChooserDialog motorChooserDialog;
protected FlightConfigurableTableModel configurationTableModel;
MotorConfigurationPanel(final FlightConfigurationPanel flightConfigurationPanel, Rocket rocket) {
super(flightConfigurationPanel,rocket);
+ motorChooserDialog = new MotorChooserDialog(SwingUtilities.getWindowAncestor(flightConfigurationPanel));
+
+
{
//// Select motor mounts
JPanel subpanel = new JPanel(new MigLayout(""));
@@ -177,13 +181,12 @@ public class MotorConfigurationPanel extends FlightConfigurablePanel
MotorConfiguration config = mount.getMotorConfiguration().get(id);
- MotorChooserDialog dialog = new MotorChooserDialog(
- mount,
- id,
- SwingUtilities.getWindowAncestor(flightConfigurationPanel));
- dialog.setVisible(true);
- Motor m = dialog.getSelectedMotor();
- double d = dialog.getSelectedDelay();
+ motorChooserDialog.setMotorMountAndConfig(mount, id);
+
+ motorChooserDialog.setVisible(true);
+
+ Motor m = motorChooserDialog.getSelectedMotor();
+ double d = motorChooserDialog.getSelectedDelay();
if (m != null) {
config = new MotorConfiguration();
@@ -257,7 +260,7 @@ public class MotorConfigurationPanel extends FlightConfigurablePanel
}
c.setBorder(b);
}
-
+
@Override
public Component getTableCellRendererComponent(JTable table,Object value, boolean isSelected, boolean hasFocus, int row,int column) {
switch (column) {
@@ -289,7 +292,7 @@ public class MotorConfigurationPanel extends FlightConfigurablePanel
label.add(ignitionLabel);
label.validate();
return label;
-// label.setText(motorString + " " + ignitionString);
+ // label.setText(motorString + " " + ignitionString);
}
private String getMotorSpecification(MotorMount mount, MotorConfiguration motorConfig) {