Rework BodyTubeConfig and InnerTubeConfig removing the motor

configuration stuff.  The motormount checkbox and default ignition
configuration is now on the General tab.  Removed
ThicknessRingComponentConfig since that was only used by
InnerTubeConfig.  Moved the radialPanel from RingComponentConfig to
InnerTubeConfig for now.
This commit is contained in:
kruland2607 2013-10-02 12:51:59 -05:00
parent ed0444a909
commit 59e75d5c83
6 changed files with 295 additions and 331 deletions

View File

@ -16,13 +16,13 @@ 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;
import net.sf.openrocket.unit.UnitGroup;
public class BodyTubeConfig extends RocketComponentConfig {
private MotorConfig motorConfigPane = null;
private DoubleModel maxLength;
private static final Translator trans = Application.getTranslator();
@ -98,6 +98,9 @@ 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),
@ -106,10 +109,7 @@ public class BodyTubeConfig extends RocketComponentConfig {
//// General and General properties
tabbedPane.insertTab(trans.get("BodyTubecfg.tab.General"), null, panel,
trans.get("BodyTubecfg.tab.Generalproperties"), 0);
motorConfigPane = new MotorConfig((BodyTube) c);
//// Motor and Motor mount configuration
tabbedPane.insertTab(trans.get("BodyTubecfg.tab.Motor"), null, motorConfigPane,
trans.get("BodyTubecfg.tab.Motormountconf"), 1);
tabbedPane.setSelectedIndex(0);
@ -118,8 +118,6 @@ public class BodyTubeConfig extends RocketComponentConfig {
@Override
public void updateFields() {
super.updateFields();
if (motorConfigPane != null)
motorConfigPane.updateFields();
}
}

View File

@ -1,28 +1,12 @@
package net.sf.openrocket.gui.configdialog;
import net.miginfocom.swing.MigLayout;
import net.sf.openrocket.document.OpenRocketDocument;
import net.sf.openrocket.gui.Resettable;
import net.sf.openrocket.gui.SpinnerEditor;
import net.sf.openrocket.gui.adaptors.DoubleModel;
import net.sf.openrocket.gui.components.BasicSlider;
import net.sf.openrocket.gui.components.UnitSelector;
import net.sf.openrocket.l10n.Translator;
import net.sf.openrocket.rocketcomponent.ClusterConfiguration;
import net.sf.openrocket.rocketcomponent.Clusterable;
import net.sf.openrocket.rocketcomponent.InnerTube;
import net.sf.openrocket.rocketcomponent.MotorMount;
import net.sf.openrocket.rocketcomponent.RocketComponent;
import net.sf.openrocket.startup.Application;
import net.sf.openrocket.unit.UnitGroup;
import net.sf.openrocket.util.BugException;
import net.sf.openrocket.util.Coordinate;
import net.sf.openrocket.util.StateChangeListener;
import javax.swing.*;
import javax.swing.border.BevelBorder;
import java.awt.*;
import java.awt.Color;
import java.awt.Dimension;
import java.awt.Graphics;
import java.awt.Graphics2D;
import java.awt.Rectangle;
import java.awt.RenderingHints;
import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;
import java.awt.event.MouseEvent;
@ -31,22 +15,171 @@ import java.awt.geom.Ellipse2D;
import java.util.EventObject;
import java.util.List;
import javax.swing.BorderFactory;
import javax.swing.JButton;
import javax.swing.JCheckBox;
import javax.swing.JComboBox;
import javax.swing.JComponent;
import javax.swing.JLabel;
import javax.swing.JPanel;
import javax.swing.JSpinner;
import javax.swing.SwingUtilities;
import javax.swing.border.BevelBorder;
public class InnerTubeConfig extends ThicknessRingComponentConfig {
import net.miginfocom.swing.MigLayout;
import net.sf.openrocket.document.OpenRocketDocument;
import net.sf.openrocket.gui.Resettable;
import net.sf.openrocket.gui.SpinnerEditor;
import net.sf.openrocket.gui.adaptors.DoubleModel;
import net.sf.openrocket.gui.adaptors.EnumModel;
import net.sf.openrocket.gui.components.BasicSlider;
import net.sf.openrocket.gui.components.DescriptionArea;
import net.sf.openrocket.gui.components.UnitSelector;
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;
import net.sf.openrocket.rocketcomponent.RocketComponent;
import net.sf.openrocket.startup.Application;
import net.sf.openrocket.unit.UnitGroup;
import net.sf.openrocket.util.BugException;
import net.sf.openrocket.util.Coordinate;
import net.sf.openrocket.util.StateChangeListener;
public class InnerTubeConfig extends RocketComponentConfig {
private static final Translator trans = Application.getTranslator();
public InnerTubeConfig(OpenRocketDocument d, RocketComponent c) {
super(d, c);
JPanel tab;
//// General and General properties
JPanel panel = new JPanel(new MigLayout("gap rel unrel", "[][65lp::][30lp::][]", ""));
DoubleModel m;
JSpinner spin;
DoubleModel od = null;
tab = new MotorConfig((MotorMount) c);
//// Motor and Motor mount configuration
tabbedPane.insertTab(trans.get("InnerTubeCfg.tab.Motor"), null, tab,
trans.get("InnerTubeCfg.tab.ttip.Motor"), 1);
//// Outer diameter
panel.add(new JLabel(trans.get("ThicknessRingCompCfg.tab.Outerdiam")));
tab = clusterTab();
//// OuterRadius
od = new DoubleModel(component, "OuterRadius", 2, UnitGroup.UNITS_LENGTH, 0);
// Diameter = 2*Radius
spin = new JSpinner(od.getSpinnerModel());
spin.setEditor(new SpinnerEditor(spin));
panel.add(spin, "growx");
panel.add(new UnitSelector(od), "growx");
panel.add(new BasicSlider(od.getSliderModel(0, 0.04, 0.2)), "w 100lp, wrap");
if (od.isAutomaticAvailable()) {
JCheckBox check = new JCheckBox(od.getAutomaticAction());
//// Automatic
check.setText(trans.get("ringcompcfg.Automatic"));
panel.add(check, "skip, span 2, wrap");
}
//// Inner diameter
panel.add(new JLabel(trans.get("ThicknessRingCompCfg.tab.Innerdiam")));
//// InnerRadius
m = new DoubleModel(component, "InnerRadius", 2, UnitGroup.UNITS_LENGTH, 0);
spin = new JSpinner(m.getSpinnerModel());
spin.setEditor(new SpinnerEditor(spin));
panel.add(spin, "growx");
panel.add(new UnitSelector(m), "growx");
if (od == null)
panel.add(new BasicSlider(m.getSliderModel(0, 0.04, 0.2)), "w 100lp, wrap");
else
panel.add(new BasicSlider(m.getSliderModel(new DoubleModel(0), od)),
"w 100lp, wrap");
if (m.isAutomaticAvailable()) {
JCheckBox check = new JCheckBox(m.getAutomaticAction());
//// Automatic
check.setText(trans.get("ringcompcfg.Automatic"));
panel.add(check, "skip, span 2, wrap");
}
//// Wall thickness
panel.add(new JLabel(trans.get("ThicknessRingCompCfg.tab.Wallthickness")));
//// Thickness
m = new DoubleModel(component, "Thickness", UnitGroup.UNITS_LENGTH, 0);
spin = new JSpinner(m.getSpinnerModel());
spin.setEditor(new SpinnerEditor(spin));
panel.add(spin, "growx");
panel.add(new UnitSelector(m), "growx");
panel.add(new BasicSlider(m.getSliderModel(0, 0.01)), "w 100lp, wrap");
//// Inner tube length
panel.add(new JLabel(trans.get("ThicknessRingCompCfg.tab.Length")));
//// Length
m = new DoubleModel(component, "Length", UnitGroup.UNITS_LENGTH, 0);
spin = new JSpinner(m.getSpinnerModel());
spin.setEditor(new SpinnerEditor(spin));
panel.add(spin, "growx");
panel.add(new UnitSelector(m), "growx");
panel.add(new BasicSlider(m.getSliderModel(0, 0.1, 1.0)), "w 100lp, wrap");
//// Position
//// Position relative to:
panel.add(new JLabel(trans.get("ringcompcfg.Positionrelativeto")));
JComboBox combo = new JComboBox(
new EnumModel<RocketComponent.Position>(component, "RelativePosition",
new RocketComponent.Position[] {
RocketComponent.Position.TOP,
RocketComponent.Position.MIDDLE,
RocketComponent.Position.BOTTOM,
RocketComponent.Position.ABSOLUTE
}));
panel.add(combo, "spanx 3, growx, wrap");
//// plus
panel.add(new JLabel(trans.get("ringcompcfg.plus")), "right");
//// PositionValue
m = new DoubleModel(component, "PositionValue", UnitGroup.UNITS_LENGTH);
spin = new JSpinner(m.getSpinnerModel());
spin.setEditor(new SpinnerEditor(spin));
panel.add(spin, "growx");
panel.add(new UnitSelector(m), "growx");
panel.add(new BasicSlider(m.getSliderModel(
new DoubleModel(component.getParent(), "Length", -1.0, UnitGroup.UNITS_NONE),
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");
tabbedPane.insertTab(trans.get("ThicknessRingCompCfg.tab.General"), null, panel,
trans.get("ThicknessRingCompCfg.tab.Generalprop"), 0);
JPanel tab = clusterTab();
//// Cluster and Cluster configuration
tabbedPane.insertTab(trans.get("InnerTubeCfg.tab.Cluster"), null, tab,
trans.get("InnerTubeCfg.tab.ttip.Cluster"), 2);
@ -59,6 +192,75 @@ public class InnerTubeConfig extends ThicknessRingComponentConfig {
tabbedPane.setSelectedIndex(0);
}
protected JPanel positionTab() {
JPanel panel = new JPanel(new MigLayout("align 20% 20%, gap rel unrel",
"[][65lp::][30lp::]", ""));
//// Radial position
JLabel l = new JLabel(trans.get("ringcompcfg.Radialdistance"));
//// Distance from the rocket centerline
l.setToolTipText(trans.get("ringcompcfg.Distancefrom"));
panel.add(l);
DoubleModel m = new DoubleModel(component, "RadialPosition", UnitGroup.UNITS_LENGTH, 0);
JSpinner spin = new JSpinner(m.getSpinnerModel());
spin.setEditor(new SpinnerEditor(spin));
//// Distance from the rocket centerline
spin.setToolTipText(trans.get("ringcompcfg.Distancefrom"));
panel.add(spin, "growx");
panel.add(new UnitSelector(m), "growx");
BasicSlider bs = new BasicSlider(m.getSliderModel(0, 0.1, 1.0));
//// Distance from the rocket centerline
bs.setToolTipText(trans.get("ringcompcfg.Distancefrom"));
panel.add(bs, "w 100lp, wrap");
//// Radial direction
l = new JLabel(trans.get("ringcompcfg.Radialdirection"));
//// The radial direction from the rocket centerline
l.setToolTipText(trans.get("ringcompcfg.radialdirectionfrom"));
panel.add(l);
m = new DoubleModel(component, "RadialDirection", UnitGroup.UNITS_ANGLE);
spin = new JSpinner(m.getSpinnerModel());
spin.setEditor(new SpinnerEditor(spin));
//// The radial direction from the rocket centerline
spin.setToolTipText(trans.get("ringcompcfg.radialdirectionfrom"));
panel.add(spin, "growx");
panel.add(new UnitSelector(m), "growx");
bs = new BasicSlider(m.getSliderModel(-Math.PI, Math.PI));
//// The radial direction from the rocket centerline
bs.setToolTipText(trans.get("ringcompcfg.radialdirectionfrom"));
panel.add(bs, "w 100lp, wrap");
//// Reset button
JButton button = new JButton(trans.get("ringcompcfg.but.Reset"));
//// Reset the component to the rocket centerline
button.setToolTipText(trans.get("ringcompcfg.but.Resetcomponant"));
button.addActionListener(new ActionListener() {
@Override
public void actionPerformed(ActionEvent e) {
((RingComponent) component).setRadialDirection(0.0);
((RingComponent) component).setRadialPosition(0.0);
}
});
panel.add(button, "spanx, right, wrap para");
DescriptionArea note = new DescriptionArea(3);
//// Note: An inner tube will not affect the aerodynamics of the rocket even if it is located outside of the body tube.
note.setText(trans.get("ringcompcfg.note.desc"));
panel.add(note, "spanx, growx");
return panel;
}
private JPanel clusterTab() {
JPanel panel = new JPanel(new MigLayout());

View File

@ -154,8 +154,6 @@ public class LaunchLugConfig extends RocketComponentConfig {
@Override
public void updateFields() {
super.updateFields();
if (motorConfigPane != null)
motorConfigPane.updateFields();
}
}

View File

@ -1,20 +1,16 @@
package net.sf.openrocket.gui.configdialog;
import java.awt.Color;
import java.awt.Component;
import java.awt.Container;
import java.awt.Font;
import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;
import javax.swing.JButton;
import javax.swing.BorderFactory;
import javax.swing.JCheckBox;
import javax.swing.JComboBox;
import javax.swing.JDialog;
import javax.swing.JLabel;
import javax.swing.JPanel;
import javax.swing.JSpinner;
import javax.swing.SwingUtilities;
import javax.swing.event.ChangeEvent;
import javax.swing.event.ChangeListener;
@ -23,40 +19,27 @@ import net.sf.openrocket.gui.SpinnerEditor;
import net.sf.openrocket.gui.adaptors.BooleanModel;
import net.sf.openrocket.gui.adaptors.DoubleModel;
import net.sf.openrocket.gui.adaptors.EnumModel;
import net.sf.openrocket.gui.adaptors.FlightConfigurationModel;
import net.sf.openrocket.gui.components.BasicSlider;
import net.sf.openrocket.gui.components.StyledLabel;
import net.sf.openrocket.gui.components.UnitSelector;
import net.sf.openrocket.gui.dialogs.flightconfiguration.FlightConfigurationDialog;
import net.sf.openrocket.gui.dialogs.motor.MotorChooserDialog;
import net.sf.openrocket.l10n.Translator;
import net.sf.openrocket.motor.Motor;
import net.sf.openrocket.motor.ThrustCurveMotor;
import net.sf.openrocket.rocketcomponent.Configuration;
import net.sf.openrocket.rocketcomponent.IgnitionConfiguration;
import net.sf.openrocket.rocketcomponent.MotorConfiguration;
import net.sf.openrocket.rocketcomponent.MotorMount;
import net.sf.openrocket.rocketcomponent.Rocket;
import net.sf.openrocket.rocketcomponent.RocketComponent;
import net.sf.openrocket.startup.Application;
import net.sf.openrocket.unit.UnitGroup;
public class MotorConfig extends JPanel {
private final Rocket rocket;
private final MotorMount mount;
private final Configuration configuration;
private JPanel panel;
private JLabel motorLabel;
private static final Translator trans = Application.getTranslator();
public MotorConfig(MotorMount motorMount) {
super(new MigLayout("fill"));
this.rocket = ((RocketComponent) motorMount).getRocket();
this.mount = motorMount;
this.configuration = ((RocketComponent) motorMount).getRocket().getDefaultConfiguration();
this.setBorder( BorderFactory.createLineBorder(Color.BLACK,1) );
BooleanModel model;
model = new BooleanModel(motorMount, "MotorMount");
@ -65,58 +48,10 @@ public class MotorConfig extends JPanel {
check.setText(trans.get("MotorCfg.checkbox.compmotormount"));
this.add(check, "wrap");
panel = new JPanel(new MigLayout("fill"));
final JPanel panel = new JPanel(new MigLayout("fill"));
this.add(panel, "grow, wrap");
// Motor configuration selector
//// Motor configuration:
panel.add(new JLabel(trans.get("MotorCfg.lbl.Flightcfg")), "shrink");
JComboBox combo = new JComboBox(new FlightConfigurationModel(configuration));
panel.add(combo, "growx");
combo.addActionListener(new ActionListener() {
@Override
public void actionPerformed(ActionEvent e) {
updateFields();
}
});
//// New button
JButton button = new JButton(trans.get("MotorCfg.but.New"));
button.addActionListener(new ActionListener() {
@Override
public void actionPerformed(ActionEvent e) {
String id = rocket.newFlightConfigurationID();
configuration.setFlightConfigurationID(id);
}
});
panel.add(button, "");
//// Edit button
button = new JButton(trans.get("MotorCfg.but.FlightcfgEdit"));
button.addActionListener(new ActionListener() {
@Override
public void actionPerformed(ActionEvent e) {
JDialog configDialog = new FlightConfigurationDialog(rocket, SwingUtilities.windowForComponent(MotorConfig.this));
configDialog.show();
}
});
panel.add(button, "wrap unrel");
// Current motor:
panel.add(new JLabel(trans.get("MotorCfg.lbl.Currentmotor")), "shrink");
motorLabel = new JLabel();
motorLabel.setFont(motorLabel.getFont().deriveFont(Font.BOLD));
updateFields();
panel.add(motorLabel, "wrap unrel");
// Overhang
//// Motor overhang:
panel.add(new JLabel(trans.get("MotorCfg.lbl.Motoroverhang")));
@ -137,7 +72,7 @@ public class MotorConfig extends JPanel {
panel.add(new JLabel(trans.get("MotorCfg.lbl.Ignitionat") + " " + CommonStrings.dagger), "");
IgnitionConfiguration ignitionConfig = mount.getIgnitionConfiguration().getDefault();
combo = new JComboBox(new EnumModel<IgnitionConfiguration.IgnitionEvent>(ignitionConfig, "IgnitionEvent"));
JComboBox combo = new JComboBox(new EnumModel<IgnitionConfiguration.IgnitionEvent>(ignitionConfig, "IgnitionEvent"));
panel.add(combo, "growx, wrap");
// ... and delay
@ -176,51 +111,6 @@ public class MotorConfig extends JPanel {
}
// Select etc. buttons
//// Select motor
button = new JButton(trans.get("MotorCfg.but.Selectmotor"));
button.addActionListener(new ActionListener() {
@Override
public void actionPerformed(ActionEvent e) {
String id = configuration.getFlightConfigurationID();
MotorChooserDialog dialog = new MotorChooserDialog(mount.getMotor(id),
mount.getMotorDelay(id), mount.getMotorMountDiameter(),
SwingUtilities.getWindowAncestor(MotorConfig.this));
dialog.setVisible(true);
Motor m = dialog.getSelectedMotor();
double d = dialog.getSelectedDelay();
if (m != null) {
if (id == null) {
id = rocket.newFlightConfigurationID();
configuration.setFlightConfigurationID(id);
}
MotorConfiguration config = new MotorConfiguration();
config.setMotor(m);
config.setEjectionDelay(d);
mount.getMotorConfiguration().set(id, config);
}
updateFields();
}
});
panel.add(button, "span, split, growx");
//// Remove motor
button = new JButton(trans.get("MotorCfg.but.Removemotor"));
button.addActionListener(new ActionListener() {
@Override
public void actionPerformed(ActionEvent e) {
mount.getMotorConfiguration().resetDefault(configuration.getFlightConfigurationID());
updateFields();
}
});
panel.add(button, "growx, wrap");
// Set enabled status
setDeepEnabled(panel, motorMount.isMotorMount());
@ -233,22 +123,6 @@ public class MotorConfig extends JPanel {
}
public void updateFields() {
String id = configuration.getFlightConfigurationID();
Motor m = mount.getMotor(id);
if (m == null) {
//// None
motorLabel.setText(trans.get("MotorCfg.lbl.motorLabel"));
} else {
String str = "";
if (m instanceof ThrustCurveMotor)
str = ((ThrustCurveMotor) m).getManufacturer() + " ";
str += m.getDesignation(mount.getMotorDelay(id));
motorLabel.setText(str);
}
}
private static void setDeepEnabled(Component component, boolean enabled) {
component.setEnabled(enabled);
if (component instanceof Container) {

View File

@ -1,10 +1,6 @@
package net.sf.openrocket.gui.configdialog;
import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;
import javax.swing.JButton;
import javax.swing.JCheckBox;
import javax.swing.JComboBox;
import javax.swing.JLabel;
@ -22,7 +18,6 @@ import net.sf.openrocket.gui.components.UnitSelector;
import net.sf.openrocket.l10n.Translator;
import net.sf.openrocket.material.Material;
import net.sf.openrocket.rocketcomponent.EngineBlock;
import net.sf.openrocket.rocketcomponent.RingComponent;
import net.sf.openrocket.rocketcomponent.RocketComponent;
import net.sf.openrocket.startup.Application;
import net.sf.openrocket.unit.UnitGroup;
@ -171,73 +166,4 @@ public class RingComponentConfig extends RocketComponentConfig {
}
protected JPanel positionTab() {
JPanel panel = new JPanel(new MigLayout("align 20% 20%, gap rel unrel",
"[][65lp::][30lp::]", ""));
//// Radial position
JLabel l = new JLabel(trans.get("ringcompcfg.Radialdistance"));
//// Distance from the rocket centerline
l.setToolTipText(trans.get("ringcompcfg.Distancefrom"));
panel.add(l);
DoubleModel m = new DoubleModel(component, "RadialPosition", UnitGroup.UNITS_LENGTH, 0);
JSpinner spin = new JSpinner(m.getSpinnerModel());
spin.setEditor(new SpinnerEditor(spin));
//// Distance from the rocket centerline
spin.setToolTipText(trans.get("ringcompcfg.Distancefrom"));
panel.add(spin, "growx");
panel.add(new UnitSelector(m), "growx");
BasicSlider bs = new BasicSlider(m.getSliderModel(0, 0.1, 1.0));
//// Distance from the rocket centerline
bs.setToolTipText(trans.get("ringcompcfg.Distancefrom"));
panel.add(bs, "w 100lp, wrap");
//// Radial direction
l = new JLabel(trans.get("ringcompcfg.Radialdirection"));
//// The radial direction from the rocket centerline
l.setToolTipText(trans.get("ringcompcfg.radialdirectionfrom"));
panel.add(l);
m = new DoubleModel(component, "RadialDirection", UnitGroup.UNITS_ANGLE);
spin = new JSpinner(m.getSpinnerModel());
spin.setEditor(new SpinnerEditor(spin));
//// The radial direction from the rocket centerline
spin.setToolTipText(trans.get("ringcompcfg.radialdirectionfrom"));
panel.add(spin, "growx");
panel.add(new UnitSelector(m), "growx");
bs = new BasicSlider(m.getSliderModel(-Math.PI, Math.PI));
//// The radial direction from the rocket centerline
bs.setToolTipText(trans.get("ringcompcfg.radialdirectionfrom"));
panel.add(bs, "w 100lp, wrap");
//// Reset button
JButton button = new JButton(trans.get("ringcompcfg.but.Reset"));
//// Reset the component to the rocket centerline
button.setToolTipText(trans.get("ringcompcfg.but.Resetcomponant"));
button.addActionListener(new ActionListener() {
@Override
public void actionPerformed(ActionEvent e) {
((RingComponent) component).setRadialDirection(0.0);
((RingComponent) component).setRadialPosition(0.0);
}
});
panel.add(button, "spanx, right, wrap para");
DescriptionArea note = new DescriptionArea(3);
//// Note: An inner tube will not affect the aerodynamics of the rocket even if it is located outside of the body tube.
note.setText(trans.get("ringcompcfg.note.desc"));
panel.add(note, "spanx, growx");
return panel;
}
}

View File

@ -1,34 +0,0 @@
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);
}
}