Uniformity of mass component dialogs
Unified the look of the dialogs for parachutes, streamers, shock cords, and mass objects.
This commit is contained in:
parent
6b5982c6aa
commit
43a231c738
@ -1025,6 +1025,8 @@ RailBtnCfg.tab.General = General
|
|||||||
RailBtnCfg.tab.GeneralProp = General properties
|
RailBtnCfg.tab.GeneralProp = General properties
|
||||||
|
|
||||||
! MassComponentConfig
|
! MassComponentConfig
|
||||||
|
MassComponentCfg.lbl.Attributes = Attributes
|
||||||
|
MassComponentCfg.lbl.Placement = Placement
|
||||||
MassComponentCfg.lbl.Mass = Mass:
|
MassComponentCfg.lbl.Mass = Mass:
|
||||||
MassComponentCfg.lbl.Density = Approximate density:
|
MassComponentCfg.lbl.Density = Approximate density:
|
||||||
MassComponentCfg.lbl.Length = Length:
|
MassComponentCfg.lbl.Length = Length:
|
||||||
@ -1076,7 +1078,10 @@ NoseConeCfg.tab.ttip.Shoulder = Shoulder properties
|
|||||||
|
|
||||||
! ParachuteConfig
|
! ParachuteConfig
|
||||||
Parachute.Parachute = Parachute
|
Parachute.Parachute = Parachute
|
||||||
ParachuteCfg.lbl.Canopy = Canopy:
|
ParachuteCfg.lbl.Canopy = Canopy
|
||||||
|
ParachuteCfg.lbl.Shroudlines = Shroud lines
|
||||||
|
ParachuteCfg.lbl.Placement = Placement
|
||||||
|
ParachuteCfg.lbl.Deployment = Deployment
|
||||||
ParachuteCfg.lbl.CanopyShape = Canopy shape:
|
ParachuteCfg.lbl.CanopyShape = Canopy shape:
|
||||||
ParachuteCfg.lbl.Diameter = Diameter:
|
ParachuteCfg.lbl.Diameter = Diameter:
|
||||||
ParachuteCfg.lbl.SpillDia = Spill hole diameter:
|
ParachuteCfg.lbl.SpillDia = Spill hole diameter:
|
||||||
@ -1086,7 +1091,6 @@ ParachuteCfg.lbl.longA1 = <html>Drag coefficient C<sub>D</sub>:
|
|||||||
ParachuteCfg.lbl.longB1 = <html>The drag coefficient relative to the total area of the parachute.<br>
|
ParachuteCfg.lbl.longB1 = <html>The drag coefficient relative to the total area of the parachute.<br>
|
||||||
ParachuteCfg.lbl.longB2 = A larger drag coefficient yields a slowed descent rate.
|
ParachuteCfg.lbl.longB2 = A larger drag coefficient yields a slowed descent rate.
|
||||||
ParachuteCfg.lbl.longB3 = A typical value for parachutes is 0.8.
|
ParachuteCfg.lbl.longB3 = A typical value for parachutes is 0.8.
|
||||||
ParachuteCfg.lbl.Shroudlines = Shroud lines:
|
|
||||||
ParachuteCfg.lbl.Numberoflines = Number of lines:
|
ParachuteCfg.lbl.Numberoflines = Number of lines:
|
||||||
ParachuteCfg.lbl.Linelength = Line length:
|
ParachuteCfg.lbl.Linelength = Line length:
|
||||||
ParachuteCfg.lbl.Material = Material:
|
ParachuteCfg.lbl.Material = Material:
|
||||||
@ -1107,6 +1111,8 @@ ParachuteCfg.but.Reset = Reset
|
|||||||
ParachuteCfg.lbl.plusdelay = plus
|
ParachuteCfg.lbl.plusdelay = plus
|
||||||
|
|
||||||
! ShockCordConfig
|
! ShockCordConfig
|
||||||
|
ShockCordCfg.lbl.ShockcordAttributes = Attributes
|
||||||
|
ShockCordCfg.lbl.ShockcordPlacement = Placement
|
||||||
ShockCordCfg.lbl.Shockcordlength = Shock cord length:
|
ShockCordCfg.lbl.Shockcordlength = Shock cord length:
|
||||||
ShockCordCfg.lbl.Shockcordmaterial = Shock cord material:
|
ShockCordCfg.lbl.Shockcordmaterial = Shock cord material:
|
||||||
ShockCordCfg.lbl.Posrelativeto = Position relative to:
|
ShockCordCfg.lbl.Posrelativeto = Position relative to:
|
||||||
@ -1130,6 +1136,9 @@ SleeveCfg.tab.General = General
|
|||||||
SleeveCfg.tab.Generalproperties = General properties
|
SleeveCfg.tab.Generalproperties = General properties
|
||||||
|
|
||||||
! StreamerConfig
|
! StreamerConfig
|
||||||
|
StreamerCfg.lbl.Attributes = Attributes
|
||||||
|
StreamerCfg.lbl.Placement = Placement
|
||||||
|
StreamerCfg.lbl.Deployment = Deployment
|
||||||
StreamerCfg.lbl.Striplength = Strip length:
|
StreamerCfg.lbl.Striplength = Strip length:
|
||||||
StreamerCfg.lbl.Stripwidth = Strip width:
|
StreamerCfg.lbl.Stripwidth = Strip width:
|
||||||
StreamerCfg.lbl.Striparea = Strip area:
|
StreamerCfg.lbl.Striparea = Strip area:
|
||||||
|
@ -16,6 +16,7 @@ import net.sf.openrocket.gui.SpinnerEditor;
|
|||||||
import net.sf.openrocket.gui.adaptors.DoubleModel;
|
import net.sf.openrocket.gui.adaptors.DoubleModel;
|
||||||
import net.sf.openrocket.gui.adaptors.EnumModel;
|
import net.sf.openrocket.gui.adaptors.EnumModel;
|
||||||
import net.sf.openrocket.gui.components.BasicSlider;
|
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.components.UnitSelector;
|
||||||
import net.sf.openrocket.l10n.Translator;
|
import net.sf.openrocket.l10n.Translator;
|
||||||
import net.sf.openrocket.rocketcomponent.MassComponent;
|
import net.sf.openrocket.rocketcomponent.MassComponent;
|
||||||
@ -32,10 +33,13 @@ public class MassComponentConfig extends RocketComponentConfig {
|
|||||||
|
|
||||||
public MassComponentConfig(OpenRocketDocument d, RocketComponent component) {
|
public MassComponentConfig(OpenRocketDocument d, RocketComponent component) {
|
||||||
super(d, component);
|
super(d, component);
|
||||||
|
|
||||||
|
//// Left side
|
||||||
JPanel panel = new JPanel(new MigLayout("gap rel unrel", "[][65lp::][30lp::]", ""));
|
JPanel panel = new JPanel(new MigLayout("gap rel unrel", "[][65lp::][30lp::]", ""));
|
||||||
|
|
||||||
|
//// Attributes
|
||||||
|
panel.add(new StyledLabel(trans.get("MassComponentCfg.lbl.Attributes"), StyledLabel.Style.BOLD), "wrap unrel");
|
||||||
|
|
||||||
//// Mass component type
|
//// Mass component type
|
||||||
panel.add(new JLabel(trans.get("MassComponentCfg.lbl.type")));
|
panel.add(new JLabel(trans.get("MassComponentCfg.lbl.type")));
|
||||||
|
|
||||||
@ -51,7 +55,7 @@ public class MassComponentConfig extends RocketComponentConfig {
|
|||||||
MassComponent.MassComponentType.RECOVERYHARDWARE,
|
MassComponent.MassComponentType.RECOVERYHARDWARE,
|
||||||
MassComponent.MassComponentType.BATTERY}));
|
MassComponent.MassComponentType.BATTERY}));
|
||||||
|
|
||||||
panel.add(typecombo, "spanx, growx, wrap");
|
panel.add(typecombo, "spanx, wrap");
|
||||||
|
|
||||||
//// Mass
|
//// Mass
|
||||||
panel.add(new JLabel(trans.get("MassComponentCfg.lbl.Mass")));
|
panel.add(new JLabel(trans.get("MassComponentCfg.lbl.Mass")));
|
||||||
@ -112,24 +116,31 @@ public class MassComponentConfig extends RocketComponentConfig {
|
|||||||
checkAutoPackedRadius.setText(trans.get("TransitionCfg.checkbox.Automatic"));
|
checkAutoPackedRadius.setText(trans.get("TransitionCfg.checkbox.Automatic"));
|
||||||
panel.add(checkAutoPackedRadius, "skip, span 2, wrap");
|
panel.add(checkAutoPackedRadius, "skip, span 2, wrap");
|
||||||
|
|
||||||
|
|
||||||
//// Position
|
//// Right side
|
||||||
|
JPanel panel2 = new JPanel(new MigLayout("gap rel unrel", "[][65lp::][30lp::]", ""));
|
||||||
|
panel.add(panel2, "cell 4 0, gapleft paragraph, aligny 0%, spany");
|
||||||
|
|
||||||
|
//// Placement
|
||||||
|
panel2.add(new StyledLabel(trans.get("MassComponentCfg.lbl.Placement"), StyledLabel.Style.BOLD), "wrap unrel");
|
||||||
|
|
||||||
//// Position relative to:
|
//// Position relative to:
|
||||||
panel.add(new JLabel(trans.get("MassComponentCfg.lbl.PosRelativeto")));
|
panel2.add(new JLabel(trans.get("MassComponentCfg.lbl.PosRelativeto")));
|
||||||
|
|
||||||
final EnumModel<AxialMethod> methodModel = new EnumModel<AxialMethod>(component, "AxialMethod", AxialMethod.axialOffsetMethods );
|
final EnumModel<AxialMethod> methodModel = new EnumModel<AxialMethod>(component, "AxialMethod", AxialMethod.axialOffsetMethods );
|
||||||
final JComboBox<?> methodCombo = new JComboBox<AxialMethod>( methodModel );
|
final JComboBox<?> methodCombo = new JComboBox<AxialMethod>( methodModel );
|
||||||
panel.add(methodCombo, "spanx, growx, wrap");
|
panel2.add(methodCombo, "spanx, growx, wrap");
|
||||||
|
|
||||||
//// plus
|
//// plus
|
||||||
panel.add(new JLabel(trans.get("MassComponentCfg.lbl.plus")), "right");
|
panel2.add(new JLabel(trans.get("MassComponentCfg.lbl.plus")), "right");
|
||||||
|
|
||||||
m = new DoubleModel(component, "AxialOffset", UnitGroup.UNITS_LENGTH);
|
m = new DoubleModel(component, "AxialOffset", UnitGroup.UNITS_LENGTH);
|
||||||
spin = new JSpinner(m.getSpinnerModel());
|
spin = new JSpinner(m.getSpinnerModel());
|
||||||
spin.setEditor(new SpinnerEditor(spin));
|
spin.setEditor(new SpinnerEditor(spin));
|
||||||
panel.add(spin, "growx");
|
panel2.add(spin, "growx");
|
||||||
|
|
||||||
panel.add(new UnitSelector(m), "growx");
|
panel2.add(new UnitSelector(m), "growx");
|
||||||
panel.add(new BasicSlider(m.getSliderModel(
|
panel2.add(new BasicSlider(m.getSliderModel(
|
||||||
new DoubleModel(component.getParent(), "Length", -1.0, UnitGroup.UNITS_NONE),
|
new DoubleModel(component.getParent(), "Length", -1.0, UnitGroup.UNITS_NONE),
|
||||||
new DoubleModel(component.getParent(), "Length"))),
|
new DoubleModel(component.getParent(), "Length"))),
|
||||||
"w 100lp, wrap");
|
"w 100lp, wrap");
|
||||||
|
@ -31,7 +31,6 @@ import net.sf.openrocket.rocketcomponent.DeploymentConfiguration;
|
|||||||
import net.sf.openrocket.rocketcomponent.DeploymentConfiguration.DeployEvent;
|
import net.sf.openrocket.rocketcomponent.DeploymentConfiguration.DeployEvent;
|
||||||
import net.sf.openrocket.rocketcomponent.Parachute;
|
import net.sf.openrocket.rocketcomponent.Parachute;
|
||||||
import net.sf.openrocket.rocketcomponent.RocketComponent;
|
import net.sf.openrocket.rocketcomponent.RocketComponent;
|
||||||
import net.sf.openrocket.rocketcomponent.Transition;
|
|
||||||
import net.sf.openrocket.rocketcomponent.position.AxialMethod;
|
import net.sf.openrocket.rocketcomponent.position.AxialMethod;
|
||||||
import net.sf.openrocket.startup.Application;
|
import net.sf.openrocket.startup.Application;
|
||||||
import net.sf.openrocket.unit.UnitGroup;
|
import net.sf.openrocket.unit.UnitGroup;
|
||||||
@ -44,12 +43,11 @@ public class ParachuteConfig extends RecoveryDeviceConfig {
|
|||||||
public ParachuteConfig(OpenRocketDocument d, final RocketComponent component) {
|
public ParachuteConfig(OpenRocketDocument d, final RocketComponent component) {
|
||||||
super(d, component);
|
super(d, component);
|
||||||
Parachute parachute = (Parachute) component;
|
Parachute parachute = (Parachute) component;
|
||||||
|
|
||||||
|
// Left Side
|
||||||
JPanel primary = new JPanel(new MigLayout());
|
JPanel primary = new JPanel(new MigLayout());
|
||||||
|
|
||||||
JPanel panel = new JPanel(new MigLayout("gap rel unrel", "[][65lp::][30lp::][]", ""));
|
JPanel panel = new JPanel(new MigLayout("gap rel unrel", "[][65lp::][30lp::][]", ""));
|
||||||
|
|
||||||
|
|
||||||
//// Canopy
|
//// Canopy
|
||||||
panel.add(new StyledLabel(trans.get("ParachuteCfg.lbl.Canopy"), Style.BOLD), "wrap unrel");
|
panel.add(new StyledLabel(trans.get("ParachuteCfg.lbl.Canopy"), Style.BOLD), "wrap unrel");
|
||||||
|
|
||||||
@ -63,7 +61,30 @@ public class ParachuteConfig extends RecoveryDeviceConfig {
|
|||||||
panel.add(spin, "growx");
|
panel.add(spin, "growx");
|
||||||
panel.add(new UnitSelector(m), "growx");
|
panel.add(new UnitSelector(m), "growx");
|
||||||
panel.add(new BasicSlider(m.getSliderModel(0, 0.4, 1.5)), "w 100lp, wrap");
|
panel.add(new BasicSlider(m.getSliderModel(0, 0.4, 1.5)), "w 100lp, wrap");
|
||||||
|
|
||||||
|
// TODO COMPLETE Spill hole development
|
||||||
|
/* panel.add(new JLabel(trans.get("ParachuteCfg.lbl.SpillDia") + CommonStrings.daggerDouble));
|
||||||
|
|
||||||
|
m = new DoubleModel(component, "SpillDia", UnitGroup.UNITS_LENGTH, 0, 0.08);
|
||||||
|
// The "max" value does not affect the slider maximum, and manual entry above that value is possible.
|
||||||
|
|
||||||
|
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, .1)), "w 100lp, wrap");
|
||||||
|
// The slider maximum value is "max", however, manual entry above that value is possible.
|
||||||
|
*/
|
||||||
|
// TODO END Spill hole development
|
||||||
|
|
||||||
|
//// Material:
|
||||||
|
panel.add(new JLabel(trans.get("ParachuteCfg.lbl.Material")));
|
||||||
|
|
||||||
|
JComboBox<Material> surfaceMaterialCombo = new JComboBox<Material>(new MaterialModel(panel, component,
|
||||||
|
Material.Type.SURFACE));
|
||||||
|
surfaceMaterialCombo.setToolTipText(trans.get("ParachuteCfg.combo.MaterialModel"));
|
||||||
|
panel.add( surfaceMaterialCombo, "spanx 3, growx, wrap 15lp");
|
||||||
|
|
||||||
// CD
|
// CD
|
||||||
JLabel label = new HtmlLabel(trans.get("ParachuteCfg.lbl.longA1"));
|
JLabel label = new HtmlLabel(trans.get("ParachuteCfg.lbl.longA1"));
|
||||||
String tip = trans.get("ParachuteCfg.lbl.longB1") +
|
String tip = trans.get("ParachuteCfg.lbl.longB1") +
|
||||||
@ -88,19 +109,8 @@ public class ParachuteConfig extends RecoveryDeviceConfig {
|
|||||||
p.setCD(Parachute.DEFAULT_CD);
|
p.setCD(Parachute.DEFAULT_CD);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
panel.add(button, "spanx, wrap para");
|
panel.add(button, "spanx, wrap 32lp");
|
||||||
|
|
||||||
//// Material:
|
|
||||||
panel.add(new JLabel(trans.get("ParachuteCfg.lbl.Material")));
|
|
||||||
|
|
||||||
JComboBox<Material> surfaceMaterialCombo = new JComboBox<Material>(new MaterialModel(panel, component,
|
|
||||||
Material.Type.SURFACE));
|
|
||||||
surfaceMaterialCombo.setToolTipText(trans.get("ParachuteCfg.combo.MaterialModel"));
|
|
||||||
panel.add( surfaceMaterialCombo, "spanx 3, growx, wrap 30lp");
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
//// Shroud lines
|
//// Shroud lines
|
||||||
panel.add(new StyledLabel(trans.get("ParachuteCfg.lbl.Shroudlines"), Style.BOLD), "wrap unrel");
|
panel.add(new StyledLabel(trans.get("ParachuteCfg.lbl.Shroudlines"), Style.BOLD), "wrap unrel");
|
||||||
|
|
||||||
@ -126,23 +136,23 @@ public class ParachuteConfig extends RecoveryDeviceConfig {
|
|||||||
//// Material:
|
//// Material:
|
||||||
panel.add(new JLabel(trans.get("ParachuteCfg.lbl.Material")));
|
panel.add(new JLabel(trans.get("ParachuteCfg.lbl.Material")));
|
||||||
|
|
||||||
JComboBox<Material> shroudMaterialCombo = new JComboBox<Material>(new MaterialModel(panel, component, Material.Type.LINE,
|
JComboBox<Material> shroudMaterialCombo =
|
||||||
"LineMaterial"));
|
new JComboBox<Material>(new MaterialModel(panel, component, Material.Type.LINE, "LineMaterial"));
|
||||||
panel.add( shroudMaterialCombo, "spanx 3, growx, wrap");
|
panel.add( shroudMaterialCombo, "spanx 3, growx, wrap 15lp");
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
// Right side
|
||||||
primary.add(panel, "grow, gapright 20lp");
|
primary.add(panel, "grow, gapright 20lp");
|
||||||
panel = new JPanel(new MigLayout("gap rel unrel", "[][65lp::][30lp::][]", ""));
|
panel = new JPanel(new MigLayout("gap rel unrel", "[][65lp::][30lp::][]", ""));
|
||||||
|
|
||||||
|
//// Placement
|
||||||
|
panel.add(new StyledLabel(trans.get("ParachuteCfg.lbl.Placement"), Style.BOLD), "wrap unrel");
|
||||||
|
|
||||||
//// Position
|
|
||||||
//// Position relative to:
|
//// Position relative to:
|
||||||
panel.add(new JLabel(trans.get("ParachuteCfg.lbl.Posrelativeto")));
|
panel.add(new JLabel(trans.get("ParachuteCfg.lbl.Posrelativeto")));
|
||||||
|
|
||||||
final EnumModel<AxialMethod> methodModel = new EnumModel<AxialMethod>(component, "AxialMethod", AxialMethod.axialOffsetMethods );
|
final EnumModel<AxialMethod> methodModel =
|
||||||
|
new EnumModel<AxialMethod>(component, "AxialMethod", AxialMethod.axialOffsetMethods );
|
||||||
JComboBox<AxialMethod> positionCombo = new JComboBox<AxialMethod>( methodModel );
|
JComboBox<AxialMethod> positionCombo = new JComboBox<AxialMethod>( methodModel );
|
||||||
panel.add( positionCombo, "spanx, growx, wrap");
|
panel.add( positionCombo, "spanx, growx, wrap");
|
||||||
|
|
||||||
@ -160,7 +170,6 @@ public class ParachuteConfig extends RecoveryDeviceConfig {
|
|||||||
new DoubleModel(component.getParent(), "Length"))),
|
new DoubleModel(component.getParent(), "Length"))),
|
||||||
"w 100lp, wrap");
|
"w 100lp, wrap");
|
||||||
|
|
||||||
|
|
||||||
//// Spatial length
|
//// Spatial length
|
||||||
//// Packed length:
|
//// Packed length:
|
||||||
panel.add(new JLabel(trans.get("ParachuteCfg.lbl.Packedlength")));
|
panel.add(new JLabel(trans.get("ParachuteCfg.lbl.Packedlength")));
|
||||||
@ -192,17 +201,20 @@ public class ParachuteConfig extends RecoveryDeviceConfig {
|
|||||||
////// Automatic
|
////// Automatic
|
||||||
JCheckBox checkAutoPackedRadius = new JCheckBox(od.getAutomaticAction());
|
JCheckBox checkAutoPackedRadius = new JCheckBox(od.getAutomaticAction());
|
||||||
checkAutoPackedRadius.setText(trans.get("TransitionCfg.checkbox.Automatic"));
|
checkAutoPackedRadius.setText(trans.get("TransitionCfg.checkbox.Automatic"));
|
||||||
panel.add(checkAutoPackedRadius, "skip, span 2, wrap 30lp");
|
panel.add(checkAutoPackedRadius, "skip, span 2, wrap 5lp");
|
||||||
|
|
||||||
|
|
||||||
//// Deployment
|
//// Deployment
|
||||||
|
panel.add(new StyledLabel(trans.get("ParachuteCfg.lbl.Deployment"), Style.BOLD), "wrap unrel");
|
||||||
|
|
||||||
//// Deploys at:
|
//// Deploys at:
|
||||||
panel.add(new JLabel(trans.get("ParachuteCfg.lbl.Deploysat") + " " + CommonStrings.dagger), "");
|
panel.add(new JLabel(trans.get("ParachuteCfg.lbl.Deploysat") + " " + CommonStrings.dagger), "");
|
||||||
|
|
||||||
DeploymentConfiguration deploymentConfig = parachute.getDeploymentConfigurations().getDefault();
|
DeploymentConfiguration deploymentConfig = parachute.getDeploymentConfigurations().getDefault();
|
||||||
// this issues a warning because EnumModel ipmlements ComboBoxModel without a parameter...
|
// this issues a warning because EnumModel ipmlements ComboBoxModel without a parameter...
|
||||||
ComboBoxModel<DeploymentConfiguration.DeployEvent> deployOptionsModel = new EnumModel<DeploymentConfiguration.DeployEvent>(deploymentConfig, "DeployEvent");
|
ComboBoxModel<DeploymentConfiguration.DeployEvent> deployOptionsModel =
|
||||||
JComboBox<DeploymentConfiguration.DeployEvent> eventCombo = new JComboBox<DeploymentConfiguration.DeployEvent>( deployOptionsModel );
|
new EnumModel<DeploymentConfiguration.DeployEvent>(deploymentConfig, "DeployEvent");
|
||||||
|
JComboBox<DeploymentConfiguration.DeployEvent> eventCombo =
|
||||||
|
new JComboBox<DeploymentConfiguration.DeployEvent>( deployOptionsModel );
|
||||||
if( (component.getStageNumber() + 1 ) == d.getRocket().getStageCount() ){
|
if( (component.getStageNumber() + 1 ) == d.getRocket().getStageCount() ){
|
||||||
// This is the bottom stage: Restrict deployment options.
|
// This is the bottom stage: Restrict deployment options.
|
||||||
eventCombo.removeItem( DeployEvent.LOWER_STAGE_SEPARATION );
|
eventCombo.removeItem( DeployEvent.LOWER_STAGE_SEPARATION );
|
||||||
@ -221,7 +233,7 @@ public class ParachuteConfig extends RecoveryDeviceConfig {
|
|||||||
//// seconds
|
//// seconds
|
||||||
panel.add(new JLabel(trans.get("ParachuteCfg.lbl.seconds")), "wrap paragraph");
|
panel.add(new JLabel(trans.get("ParachuteCfg.lbl.seconds")), "wrap paragraph");
|
||||||
|
|
||||||
// Altitude:
|
//// Altitude:
|
||||||
label = new JLabel(trans.get("ParachuteCfg.lbl.Altitude") + CommonStrings.dagger);
|
label = new JLabel(trans.get("ParachuteCfg.lbl.Altitude") + CommonStrings.dagger);
|
||||||
altitudeComponents.add(label);
|
altitudeComponents.add(label);
|
||||||
panel.add(label);
|
panel.add(label);
|
||||||
@ -252,10 +264,8 @@ public class ParachuteConfig extends RecoveryDeviceConfig {
|
|||||||
trans.get("ParachuteCfg.tab.ttip.Radialpos"), 1);
|
trans.get("ParachuteCfg.tab.ttip.Radialpos"), 1);
|
||||||
tabbedPane.setSelectedIndex(0);
|
tabbedPane.setSelectedIndex(0);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
protected JPanel positionTab() {
|
protected JPanel positionTab() {
|
||||||
JPanel panel = new JPanel(new MigLayout("gap rel unrel", "[][65lp::][30lp::]", ""));
|
JPanel panel = new JPanel(new MigLayout("gap rel unrel", "[][65lp::][30lp::]", ""));
|
||||||
|
|
||||||
|
@ -9,6 +9,7 @@ import net.sf.openrocket.gui.SpinnerEditor;
|
|||||||
import net.sf.openrocket.gui.adaptors.DoubleModel;
|
import net.sf.openrocket.gui.adaptors.DoubleModel;
|
||||||
import net.sf.openrocket.gui.adaptors.EnumModel;
|
import net.sf.openrocket.gui.adaptors.EnumModel;
|
||||||
import net.sf.openrocket.gui.components.BasicSlider;
|
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.components.UnitSelector;
|
||||||
import net.sf.openrocket.l10n.Translator;
|
import net.sf.openrocket.l10n.Translator;
|
||||||
import net.sf.openrocket.material.Material;
|
import net.sf.openrocket.material.Material;
|
||||||
@ -28,14 +29,17 @@ public class ShockCordConfig extends RocketComponentConfig {
|
|||||||
|
|
||||||
public ShockCordConfig(OpenRocketDocument d, RocketComponent component) {
|
public ShockCordConfig(OpenRocketDocument d, RocketComponent component) {
|
||||||
super(d, component);
|
super(d, component);
|
||||||
|
|
||||||
JPanel panel = new JPanel(new MigLayout("gap rel unrel", "[][65lp::][30lp::]", ""));
|
|
||||||
JLabel label;
|
JLabel label;
|
||||||
DoubleModel m;
|
DoubleModel m;
|
||||||
JSpinner spin;
|
JSpinner spin;
|
||||||
|
|
||||||
////// Left side
|
////// Left side
|
||||||
|
JPanel panel = new JPanel(new MigLayout("gap rel unrel", "[][65lp::][30lp::]", ""));
|
||||||
|
|
||||||
|
//// Attributes
|
||||||
|
panel.add(new StyledLabel(trans.get("ShockCordCfg.lbl.ShockcordAttributes"), StyledLabel.Style.BOLD), "wrap unrel");
|
||||||
|
|
||||||
// Cord length
|
// Cord length
|
||||||
//// Shock cord length
|
//// Shock cord length
|
||||||
label = new JLabel(trans.get("ShockCordCfg.lbl.Shockcordlength"));
|
label = new JLabel(trans.get("ShockCordCfg.lbl.Shockcordlength"));
|
||||||
@ -49,7 +53,6 @@ public class ShockCordConfig extends RocketComponentConfig {
|
|||||||
|
|
||||||
panel.add(new UnitSelector(m), "growx");
|
panel.add(new UnitSelector(m), "growx");
|
||||||
panel.add(new BasicSlider(m.getSliderModel(0, 1, 10)), "w 100lp, wrap");
|
panel.add(new BasicSlider(m.getSliderModel(0, 1, 10)), "w 100lp, wrap");
|
||||||
|
|
||||||
|
|
||||||
// Material
|
// Material
|
||||||
//// Shock cord material:
|
//// Shock cord material:
|
||||||
@ -61,8 +64,9 @@ public class ShockCordConfig extends RocketComponentConfig {
|
|||||||
JPanel panel2 = new JPanel(new MigLayout("gap rel unrel", "[][65lp::][30lp::]", ""));
|
JPanel panel2 = new JPanel(new MigLayout("gap rel unrel", "[][65lp::][30lp::]", ""));
|
||||||
panel.add(panel2, "cell 4 0, gapleft paragraph, aligny 0%, spany");
|
panel.add(panel2, "cell 4 0, gapleft paragraph, aligny 0%, spany");
|
||||||
|
|
||||||
|
//// Placement
|
||||||
|
panel2.add(new StyledLabel(trans.get("ShockCordCfg.lbl.ShockcordPlacement"), StyledLabel.Style.BOLD), "wrap unrel");
|
||||||
|
|
||||||
//// Position
|
|
||||||
//// Position relative to:
|
//// Position relative to:
|
||||||
panel2.add(new JLabel(trans.get("ShockCordCfg.lbl.Posrelativeto")));
|
panel2.add(new JLabel(trans.get("ShockCordCfg.lbl.Posrelativeto")));
|
||||||
|
|
||||||
|
@ -39,12 +39,15 @@ public class StreamerConfig extends RecoveryDeviceConfig {
|
|||||||
public StreamerConfig(OpenRocketDocument d, final RocketComponent component) {
|
public StreamerConfig(OpenRocketDocument d, final RocketComponent component) {
|
||||||
super(d, component);
|
super(d, component);
|
||||||
Streamer streamer = (Streamer) component;
|
Streamer streamer = (Streamer) component;
|
||||||
|
|
||||||
|
// Left side
|
||||||
JPanel primary = new JPanel(new MigLayout());
|
JPanel primary = new JPanel(new MigLayout());
|
||||||
|
|
||||||
JPanel panel = new JPanel(new MigLayout("gap rel unrel", "[][65lp::][30lp::][]", ""));
|
JPanel panel = new JPanel(new MigLayout("gap rel unrel", "[][65lp::][30lp::][]", ""));
|
||||||
|
|
||||||
|
//// Attributes
|
||||||
|
panel.add(new StyledLabel(trans.get("StreamerCfg.lbl.Attributes"), StyledLabel.Style.BOLD), "wrap unrel");
|
||||||
|
|
||||||
//// Strip length:
|
//// Strip length:
|
||||||
panel.add(new JLabel(trans.get("StreamerCfg.lbl.Striplength")));
|
panel.add(new JLabel(trans.get("StreamerCfg.lbl.Striplength")));
|
||||||
|
|
||||||
@ -65,10 +68,8 @@ public class StreamerConfig extends RecoveryDeviceConfig {
|
|||||||
spin.setEditor(new SpinnerEditor(spin));
|
spin.setEditor(new SpinnerEditor(spin));
|
||||||
panel.add(spin, "growx");
|
panel.add(spin, "growx");
|
||||||
panel.add(new UnitSelector(m), "growx");
|
panel.add(new UnitSelector(m), "growx");
|
||||||
panel.add(new BasicSlider(m.getSliderModel(0, 0.2)), "w 100lp, wrap 20lp");
|
panel.add(new BasicSlider(m.getSliderModel(0, 0.2)), "w 100lp, wrap 10lp");
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
//// Strip area:
|
//// Strip area:
|
||||||
panel.add(new JLabel(trans.get("StreamerCfg.lbl.Striparea")));
|
panel.add(new JLabel(trans.get("StreamerCfg.lbl.Striparea")));
|
||||||
|
|
||||||
@ -89,9 +90,8 @@ public class StreamerConfig extends RecoveryDeviceConfig {
|
|||||||
spin.setEditor(new SpinnerEditor(spin));
|
spin.setEditor(new SpinnerEditor(spin));
|
||||||
panel.add(spin, "growx");
|
panel.add(spin, "growx");
|
||||||
// panel.add(new UnitSelector(m),"growx");
|
// panel.add(new UnitSelector(m),"growx");
|
||||||
panel.add(new BasicSlider(m.getSliderModel(2, 15)), "skip, w 100lp, wrap 20lp");
|
panel.add(new BasicSlider(m.getSliderModel(2, 15)), "skip, w 100lp, wrap 10lp");
|
||||||
|
|
||||||
|
|
||||||
//// Material:
|
//// Material:
|
||||||
panel.add(new JLabel(trans.get("StreamerCfg.lbl.Material")));
|
panel.add(new JLabel(trans.get("StreamerCfg.lbl.Material")));
|
||||||
|
|
||||||
@ -99,10 +99,8 @@ public class StreamerConfig extends RecoveryDeviceConfig {
|
|||||||
Material.Type.SURFACE));
|
Material.Type.SURFACE));
|
||||||
//// The component material affects the weight of the component.
|
//// The component material affects the weight of the component.
|
||||||
streamerMaterialCombo.setToolTipText(trans.get("StreamerCfg.combo.ttip.MaterialModel"));
|
streamerMaterialCombo.setToolTipText(trans.get("StreamerCfg.combo.ttip.MaterialModel"));
|
||||||
panel.add(streamerMaterialCombo, "spanx 3, growx, wrap 20lp");
|
panel.add(streamerMaterialCombo, "spanx 3, growx, wrap 15lp");
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
// CD
|
// CD
|
||||||
//// <html>Drag coefficient C<sub>D</sub>:
|
//// <html>Drag coefficient C<sub>D</sub>:
|
||||||
JLabel label = new HtmlLabel(trans.get("StreamerCfg.lbl.longA1"));
|
JLabel label = new HtmlLabel(trans.get("StreamerCfg.lbl.longA1"));
|
||||||
@ -127,17 +125,16 @@ public class StreamerConfig extends RecoveryDeviceConfig {
|
|||||||
|
|
||||||
//// The drag coefficient is relative to the area of the streamer.
|
//// The drag coefficient is relative to the area of the streamer.
|
||||||
panel.add(new StyledLabel(trans.get("StreamerCfg.lbl.longC1"),
|
panel.add(new StyledLabel(trans.get("StreamerCfg.lbl.longC1"),
|
||||||
-2), "span, wrap");
|
-1), "span, wrap");
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
// Right side
|
||||||
primary.add(panel, "grow, gapright 20lp");
|
primary.add(panel, "grow, gapright 20lp");
|
||||||
panel = new JPanel(new MigLayout("gap rel unrel", "[][65lp::][30lp::][]", ""));
|
panel = new JPanel(new MigLayout("gap rel unrel", "[][65lp::][30lp::][]", ""));
|
||||||
|
|
||||||
|
//// Placement
|
||||||
|
panel.add(new StyledLabel(trans.get("StreamerCfg.lbl.Placement"), StyledLabel.Style.BOLD), "wrap unrel");
|
||||||
|
|
||||||
//// Position
|
|
||||||
//// Position relative to:
|
//// Position relative to:
|
||||||
panel.add(new JLabel(trans.get("StreamerCfg.lbl.Posrelativeto")));
|
panel.add(new JLabel(trans.get("StreamerCfg.lbl.Posrelativeto")));
|
||||||
|
|
||||||
@ -190,10 +187,12 @@ public class StreamerConfig extends RecoveryDeviceConfig {
|
|||||||
////// Automatic
|
////// Automatic
|
||||||
JCheckBox checkAutoPackedRadius = new JCheckBox(od.getAutomaticAction());
|
JCheckBox checkAutoPackedRadius = new JCheckBox(od.getAutomaticAction());
|
||||||
checkAutoPackedRadius.setText(trans.get("TransitionCfg.checkbox.Automatic"));
|
checkAutoPackedRadius.setText(trans.get("TransitionCfg.checkbox.Automatic"));
|
||||||
panel.add(checkAutoPackedRadius, "skip, span 2, wrap 30lp");
|
panel.add(checkAutoPackedRadius, "skip, span 2, wrap 5lp");
|
||||||
|
|
||||||
|
|
||||||
//// Deployment
|
//// Deployment
|
||||||
|
panel.add(new StyledLabel(trans.get("StreamerCfg.lbl.Deployment"), StyledLabel.Style.BOLD), "wrap unrel");
|
||||||
|
|
||||||
//// Deploys at:
|
//// Deploys at:
|
||||||
panel.add(new JLabel(trans.get("StreamerCfg.lbl.Deploysat") + " " + CommonStrings.dagger), "");
|
panel.add(new JLabel(trans.get("StreamerCfg.lbl.Deploysat") + " " + CommonStrings.dagger), "");
|
||||||
|
|
||||||
@ -234,8 +233,8 @@ public class StreamerConfig extends RecoveryDeviceConfig {
|
|||||||
BasicSlider slider = new BasicSlider(m.getSliderModel(100, 1000));
|
BasicSlider slider = new BasicSlider(m.getSliderModel(100, 1000));
|
||||||
altitudeComponents.add(slider);
|
altitudeComponents.add(slider);
|
||||||
panel.add(slider, "w 100lp, wrap");
|
panel.add(slider, "w 100lp, wrap");
|
||||||
|
|
||||||
panel.add(new StyledLabel(CommonStrings.override_description, -1), "skip 1, spanx, wrap para");
|
panel.add(new StyledLabel(CommonStrings.override_description, -1), "spanx, wrap para");
|
||||||
|
|
||||||
primary.add(panel, "grow");
|
primary.add(panel, "grow");
|
||||||
|
|
||||||
@ -257,7 +256,7 @@ public class StreamerConfig extends RecoveryDeviceConfig {
|
|||||||
protected JPanel positionTab() {
|
protected JPanel positionTab() {
|
||||||
JPanel panel = new JPanel(new MigLayout("gap rel unrel", "[][65lp::][30lp::]", ""));
|
JPanel panel = new JPanel(new MigLayout("gap rel unrel", "[][65lp::][30lp::]", ""));
|
||||||
|
|
||||||
//// Radial position
|
//// Radial position
|
||||||
//// Radial distance:
|
//// Radial distance:
|
||||||
panel.add(new JLabel(trans.get("StreamerCfg.lbl.Radialdistance")));
|
panel.add(new JLabel(trans.get("StreamerCfg.lbl.Radialdistance")));
|
||||||
|
|
||||||
@ -269,9 +268,7 @@ public class StreamerConfig extends RecoveryDeviceConfig {
|
|||||||
|
|
||||||
panel.add(new UnitSelector(m), "growx");
|
panel.add(new UnitSelector(m), "growx");
|
||||||
panel.add(new BasicSlider(m.getSliderModel(0, 0.1, 1.0)), "w 100lp, wrap");
|
panel.add(new BasicSlider(m.getSliderModel(0, 0.1, 1.0)), "w 100lp, wrap");
|
||||||
|
|
||||||
|
|
||||||
//// Radial direction
|
|
||||||
//// Radial direction:
|
//// Radial direction:
|
||||||
panel.add(new JLabel(trans.get("StreamerCfg.lbl.Radialdirection")));
|
panel.add(new JLabel(trans.get("StreamerCfg.lbl.Radialdirection")));
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user