Change general tab categorizations
This commit is contained in:
parent
6f2a633fdc
commit
a8945c7bb0
@ -810,7 +810,6 @@ custmatdlg.checkbox.Addmaterial = Add material to database
|
||||
|
||||
|
||||
! Ring Component Config
|
||||
ringcompcfg.lbl.Attributes = Attributes
|
||||
ringcompcfg.OuterRadius = OuterRadius
|
||||
ringcompcfg.Automatic = Automatic
|
||||
ringcompcfg.AutomaticOuter.ttip = Matches outer diameter to the inner diameter of the parent component.
|
||||
@ -818,7 +817,6 @@ ringcompcfg.InnerRadius = InnerRadius
|
||||
ringcompcfg.AutomaticInner.ttip = Matches inner diameter to the outer diameter of the child inner tube.
|
||||
ringcompcfg.Thickness = Thickness
|
||||
ringcompcfg.Length = Length
|
||||
ringcompcfg.lbl.Placement = Placement
|
||||
ringcompcfg.Positionrelativeto = Position relative to:
|
||||
ringcompcfg.plus = plus
|
||||
ringcompcfg.PositionValue = PositionValue
|
||||
@ -1141,8 +1139,6 @@ RailBtnCfg.tab.General = General
|
||||
RailBtnCfg.tab.GeneralProp = General properties
|
||||
|
||||
! MassComponentConfig
|
||||
MassComponentCfg.lbl.Attributes = Attributes
|
||||
MassComponentCfg.lbl.Placement = Placement
|
||||
MassComponentCfg.lbl.Mass = Mass:
|
||||
MassComponentCfg.lbl.Density = Approximate density:
|
||||
MassComponentCfg.lbl.Length = Length:
|
||||
@ -1234,8 +1230,6 @@ ParachuteCfg.but.ResetRadial.ttip = Resets the component to the rocket centerlin
|
||||
ParachuteCfg.lbl.plusdelay = plus
|
||||
|
||||
! ShockCordConfig
|
||||
ShockCordCfg.lbl.ShockcordAttributes = Attributes
|
||||
ShockCordCfg.lbl.ShockcordPlacement = Placement
|
||||
ShockCordCfg.lbl.Shockcordlength = Shock cord length:
|
||||
ShockCordCfg.lbl.Shockcordmaterial = Shock cord material:
|
||||
ShockCordCfg.lbl.Posrelativeto = Position relative to:
|
||||
|
@ -1096,8 +1096,6 @@ RailBtnCfg.tab.General = عام
|
||||
RailBtnCfg.tab.GeneralProp = الخصائص العامة
|
||||
|
||||
! MassComponentConfig
|
||||
MassComponentCfg.lbl.Attributes = صفات
|
||||
MassComponentCfg.lbl.Placement = تحديد مستوى
|
||||
MassComponentCfg.lbl.Mass = الكتلة
|
||||
MassComponentCfg.lbl.Density = :الكثافة التقريبية
|
||||
MassComponentCfg.lbl.Length = :الطول
|
||||
@ -1187,8 +1185,6 @@ ParachuteCfg.but.ResetRadial.ttip = .يعيد تعيين المكون إلى خ
|
||||
ParachuteCfg.lbl.plusdelay = زائد
|
||||
|
||||
! ShockCordConfig
|
||||
ShockCordCfg.lbl.ShockcordAttributes = صفات
|
||||
ShockCordCfg.lbl.ShockcordPlacement = تحديد مستوى
|
||||
ShockCordCfg.lbl.Shockcordlength = :طول حبل الصدمة
|
||||
ShockCordCfg.lbl.Shockcordmaterial = :المادة المكونة لحبل الصدمة
|
||||
ShockCordCfg.lbl.Posrelativeto = :الموضع بالنسبة إلى
|
||||
|
@ -1071,8 +1071,6 @@ RailBtnCfg.tab.General = \u041E\u0441\u043D\u043E\u0432\u043D\u043E\u0435
|
||||
RailBtnCfg.tab.GeneralProp = \u041E\u0441\u043D\u043E\u0432\u043D\u044B\u0435 \u043F\u0430\u0440\u0430\u043C\u0435\u0442\u0440\u044B
|
||||
|
||||
! MassComponentConfig
|
||||
MassComponentCfg.lbl.Attributes = \u0410\u0442\u0440\u0438\u0431\u0443\u0442\u044B
|
||||
MassComponentCfg.lbl.Placement = \u041F\u043E\u043B\u043E\u0436\u0435\u043D\u0438\u0435
|
||||
MassComponentCfg.lbl.Mass = \u041C\u0430\u0441\u0441\u0430:
|
||||
MassComponentCfg.lbl.Density = \u041F\u0440\u0438\u0431\u043B\u0438\u0437\u0438\u0442\u0435\u043B\u044C\u043D\u0430\u044F \u043F\u043B\u043E\u0442\u043D\u043E\u0441\u0442\u044C:
|
||||
MassComponentCfg.lbl.Length = \u0414\u043B\u0438\u043D\u0430:
|
||||
@ -1162,8 +1160,6 @@ ParachuteCfg.but.ResetRadial.ttip = \u0420\u0430\u0437\u043C\u0435\u0441\u0442\u
|
||||
ParachuteCfg.lbl.plusdelay = \u043F\u043B\u044E\u0441
|
||||
|
||||
! ShockCordConfig
|
||||
ShockCordCfg.lbl.ShockcordAttributes = \u0410\u0442\u0440\u0438\u0431\u0443\u0442\u044B
|
||||
ShockCordCfg.lbl.ShockcordPlacement = \u041F\u043E\u043B\u043E\u0436\u0435\u043D\u0438\u0435
|
||||
ShockCordCfg.lbl.Shockcordlength = \u0414\u043B\u0438\u043D\u0430 \u0441\u0442\u0440\u043E\u043F\u044B:
|
||||
ShockCordCfg.lbl.Shockcordmaterial = \u041C\u0430\u0442\u0435\u0440\u0438\u0430\u043B \u0441\u0442\u0440\u043E\u043F\u044B:
|
||||
ShockCordCfg.lbl.Posrelativeto = \u041F\u043E\u043B\u043E\u0436\u0435\u043D\u0438\u0435 \u043E\u0442\u043D\u043E\u0441\u0438\u0442\u0435\u043B\u044C\u043D\u043E:
|
||||
|
@ -104,7 +104,7 @@ public class ComponentAssemblyConfig extends RocketComponentConfig {
|
||||
IntegerModel countModel = new IntegerModel( boosters, "InstanceCount", 1);
|
||||
JSpinner countSpinner = new JSpinner(countModel.getSpinnerModel());
|
||||
countSpinner.setEditor(new SpinnerEditor(countSpinner));
|
||||
motherPanel.add(countSpinner, "wmin 65lp, growx 1, wrap");
|
||||
motherPanel.add(countSpinner, "wmin 65lp, growx 1, wrap 10lp");
|
||||
order.add(((SpinnerEditor) countSpinner.getEditor()).getTextField());
|
||||
|
||||
// setPositions relative to parent component
|
||||
|
@ -37,7 +37,6 @@ 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.StyledLabel;
|
||||
import net.sf.openrocket.gui.components.UnitSelector;
|
||||
import net.sf.openrocket.gui.widgets.SelectColorButton;
|
||||
import net.sf.openrocket.l10n.Translator;
|
||||
@ -71,8 +70,7 @@ public class InnerTubeConfig extends RocketComponentConfig {
|
||||
JSpinner spin;
|
||||
DoubleModel od = null;
|
||||
|
||||
//// Attributes ----
|
||||
panel.add(new StyledLabel(trans.get("InnerTubeCfg.lbl.Attributes"), StyledLabel.Style.BOLD), "wrap unrel");
|
||||
//// ---------------------------- Attributes ----------------------------
|
||||
|
||||
//// Outer diameter
|
||||
panel.add(new JLabel(trans.get("ThicknessRingCompCfg.tab.Outerdiam")));
|
||||
@ -157,8 +155,7 @@ public class InnerTubeConfig extends RocketComponentConfig {
|
||||
JPanel panel2 = new JPanel(new MigLayout("gap rel unrel, insets 0", "[][65lp::][30lp::][15lp]", ""));
|
||||
panel.add(panel2, "cell 4 0, gapleft 15lp, aligny 0%, spany");
|
||||
|
||||
//// Placement
|
||||
panel2.add(new StyledLabel(trans.get("InnerTubeCfg.lbl.Placement"), StyledLabel.Style.BOLD), "wrap unrel");
|
||||
//// ---------------------------- Placement ----------------------------
|
||||
|
||||
//// Position relative to:
|
||||
panel2.add(new JLabel(trans.get("ringcompcfg.Positionrelativeto")));
|
||||
|
@ -18,7 +18,6 @@ import net.sf.openrocket.gui.adaptors.CustomFocusTraversalPolicy;
|
||||
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.StyledLabel;
|
||||
import net.sf.openrocket.gui.components.UnitSelector;
|
||||
import net.sf.openrocket.l10n.Translator;
|
||||
import net.sf.openrocket.rocketcomponent.MassComponent;
|
||||
@ -39,14 +38,13 @@ public class MassComponentConfig extends RocketComponentConfig {
|
||||
//// Left side
|
||||
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");
|
||||
// Attributes
|
||||
|
||||
//// Mass component type
|
||||
panel.add(new JLabel(trans.get("MassComponentCfg.lbl.type")));
|
||||
|
||||
final JComboBox<?> typecombo = new JComboBox<MassComponent.MassComponentType>(
|
||||
new EnumModel<MassComponent.MassComponentType>(component, "MassComponentType",
|
||||
final JComboBox<?> typecombo = new JComboBox<>(
|
||||
new EnumModel<>(component, "MassComponentType",
|
||||
new MassComponent.MassComponentType[] {
|
||||
MassComponent.MassComponentType.MASSCOMPONENT,
|
||||
MassComponent.MassComponentType.ALTIMETER,
|
||||
@ -57,7 +55,7 @@ public class MassComponentConfig extends RocketComponentConfig {
|
||||
MassComponent.MassComponentType.RECOVERYHARDWARE,
|
||||
MassComponent.MassComponentType.BATTERY}));
|
||||
|
||||
panel.add(typecombo, "spanx, wrap");
|
||||
panel.add(typecombo, "spanx 3, growx, wrap");
|
||||
order.add(typecombo);
|
||||
|
||||
//// Mass
|
||||
@ -127,17 +125,16 @@ public class MassComponentConfig extends RocketComponentConfig {
|
||||
|
||||
|
||||
//// Right side
|
||||
JPanel panel2 = new JPanel(new MigLayout("gap rel unrel", "[][65lp::][30lp::]", ""));
|
||||
JPanel panel2 = new JPanel(new MigLayout("gap rel unrel, ins 0", "[][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");
|
||||
// Placement
|
||||
|
||||
//// Position relative to:
|
||||
panel2.add(new JLabel(trans.get("MassComponentCfg.lbl.PosRelativeto")));
|
||||
|
||||
final EnumModel<AxialMethod> methodModel = new EnumModel<AxialMethod>(component, "AxialMethod", AxialMethod.axialOffsetMethods );
|
||||
final JComboBox<?> methodCombo = new JComboBox<AxialMethod>( methodModel );
|
||||
final EnumModel<AxialMethod> methodModel = new EnumModel<>(component, "AxialMethod", AxialMethod.axialOffsetMethods );
|
||||
final JComboBox<?> methodCombo = new JComboBox<>( methodModel );
|
||||
panel2.add(methodCombo, "spanx, growx, wrap");
|
||||
order.add(methodCombo);
|
||||
|
||||
|
@ -6,6 +6,7 @@ import java.awt.event.ActionListener;
|
||||
import java.awt.event.ItemEvent;
|
||||
import java.awt.event.ItemListener;
|
||||
|
||||
import javax.swing.BorderFactory;
|
||||
import javax.swing.ComboBoxModel;
|
||||
import javax.swing.JButton;
|
||||
import javax.swing.JCheckBox;
|
||||
@ -48,43 +49,44 @@ public class ParachuteConfig extends RecoveryDeviceConfig {
|
||||
JPanel primary = new JPanel(new MigLayout());
|
||||
JPanel panel = new JPanel(new MigLayout("gap rel unrel", "[][65lp::][30lp::][]", ""));
|
||||
|
||||
//// Canopy
|
||||
panel.add(new StyledLabel(trans.get("ParachuteCfg.lbl.Canopy"), Style.BOLD), "wrap unrel");
|
||||
// ---------------------------- Canopy ----------------------------
|
||||
JPanel canopyPanel = new JPanel(new MigLayout("gap rel unrel", "[][65lp::][30lp::][]"));
|
||||
canopyPanel.setBorder(BorderFactory.createTitledBorder(trans.get("ParachuteCfg.lbl.Canopy")));
|
||||
|
||||
//// Diameter:
|
||||
panel.add(new JLabel(trans.get("ParachuteCfg.lbl.Diameter")));
|
||||
canopyPanel.add(new JLabel(trans.get("ParachuteCfg.lbl.Diameter")));
|
||||
|
||||
DoubleModel m = new DoubleModel(component, "Diameter", UnitGroup.UNITS_LENGTH, 0);
|
||||
|
||||
JSpinner spin = new JSpinner(m.getSpinnerModel());
|
||||
spin.setEditor(new SpinnerEditor(spin));
|
||||
panel.add(spin, "growx");
|
||||
canopyPanel.add(spin, "growx");
|
||||
order.add(((SpinnerEditor) spin.getEditor()).getTextField());
|
||||
panel.add(new UnitSelector(m), "growx");
|
||||
panel.add(new BasicSlider(m.getSliderModel(0, 0.4, 1.5)), "w 150lp, wrap");
|
||||
canopyPanel.add(new UnitSelector(m), "growx");
|
||||
canopyPanel.add(new BasicSlider(m.getSliderModel(0, 0.4, 1.5)), "w 150lp, wrap");
|
||||
|
||||
// TODO COMPLETE Spill hole development
|
||||
/* panel.add(new JLabel(trans.get("ParachuteCfg.lbl.SpillDia") + CommonStrings.daggerDouble));
|
||||
/* pacanopyPanelnel.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 150lp, wrap");
|
||||
canopyPanel.add(spin, "growx");
|
||||
canopyPanel.add(new UnitSelector(m), "growx");
|
||||
canopyPanel.add(new BasicSlider(m.getSliderModel(0, 0.01, .1)), "w 150lp, 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")), "wrap rel");
|
||||
canopyPanel.add(new JLabel(trans.get("ParachuteCfg.lbl.Material")), "wrap rel");
|
||||
|
||||
JComboBox<Material> surfaceMaterialCombo = new JComboBox<Material>(new MaterialModel(panel, component,
|
||||
JComboBox<Material> surfaceMaterialCombo = new JComboBox<Material>(new MaterialModel(canopyPanel, component,
|
||||
Material.Type.SURFACE));
|
||||
surfaceMaterialCombo.setToolTipText(trans.get("ParachuteCfg.combo.MaterialModel"));
|
||||
panel.add( surfaceMaterialCombo, "spanx, growx, wrap 15lp");
|
||||
canopyPanel.add(surfaceMaterialCombo, "spanx, growx, wrap 15lp");
|
||||
order.add(surfaceMaterialCombo);
|
||||
|
||||
// Drag Coefficient:
|
||||
@ -94,14 +96,14 @@ public class ParachuteConfig extends RecoveryDeviceConfig {
|
||||
trans.get("ParachuteCfg.lbl.longB2") + " " +
|
||||
trans.get("ParachuteCfg.lbl.longB3");
|
||||
label.setToolTipText(tip);
|
||||
panel.add(label);
|
||||
canopyPanel.add(label);
|
||||
|
||||
m = new DoubleModel(component, "CD", UnitGroup.UNITS_COEFFICIENT, 0);
|
||||
|
||||
spin = new JSpinner(m.getSpinnerModel());
|
||||
spin.setToolTipText(tip);
|
||||
spin.setEditor(new SpinnerEditor(spin));
|
||||
panel.add(spin, "growx");
|
||||
canopyPanel.add(spin, "growx");
|
||||
order.add(((SpinnerEditor) spin.getEditor()).getTextField());
|
||||
|
||||
//// Reset button
|
||||
@ -114,116 +116,126 @@ public class ParachuteConfig extends RecoveryDeviceConfig {
|
||||
p.setCD(Parachute.DEFAULT_CD);
|
||||
}
|
||||
});
|
||||
panel.add(button, "spanx, wrap 32lp");
|
||||
canopyPanel.add(button, "spanx");
|
||||
order.add(button);
|
||||
|
||||
//// Shroud lines
|
||||
panel.add(new StyledLabel(trans.get("ParachuteCfg.lbl.Shroudlines"), Style.BOLD), "wrap unrel");
|
||||
panel.add(canopyPanel, "spanx, growx, wrap 10lp");
|
||||
|
||||
|
||||
// ---------------------------- Shroud lines ----------------------------
|
||||
JPanel shroudPanel = new JPanel(new MigLayout("gap rel unrel", "[][65lp::][30lp::][]"));
|
||||
shroudPanel.setBorder(BorderFactory.createTitledBorder(trans.get("ParachuteCfg.lbl.Shroudlines")));
|
||||
|
||||
//// Number of lines:
|
||||
panel.add(new JLabel(trans.get("ParachuteCfg.lbl.Numberoflines")));
|
||||
shroudPanel.add(new JLabel(trans.get("ParachuteCfg.lbl.Numberoflines")));
|
||||
IntegerModel im = new IntegerModel(component, "LineCount", 0);
|
||||
|
||||
spin = new JSpinner(im.getSpinnerModel());
|
||||
spin.setEditor(new SpinnerEditor(spin));
|
||||
panel.add(spin, "growx, wrap");
|
||||
shroudPanel.add(spin, "growx, wrap");
|
||||
order.add(((SpinnerEditor) spin.getEditor()).getTextField());
|
||||
|
||||
//// Line length:
|
||||
panel.add(new JLabel(trans.get("ParachuteCfg.lbl.Linelength")));
|
||||
shroudPanel.add(new JLabel(trans.get("ParachuteCfg.lbl.Linelength")));
|
||||
|
||||
m = new DoubleModel(component, "LineLength", UnitGroup.UNITS_LENGTH, 0);
|
||||
|
||||
spin = new JSpinner(m.getSpinnerModel());
|
||||
spin.setEditor(new SpinnerEditor(spin));
|
||||
panel.add(spin, "growx");
|
||||
shroudPanel.add(spin, "growx");
|
||||
order.add(((SpinnerEditor) spin.getEditor()).getTextField());
|
||||
panel.add(new UnitSelector(m), "growx");
|
||||
panel.add(new BasicSlider(m.getSliderModel(0, 0.4, 1.5)), "w 150lp, wrap");
|
||||
shroudPanel.add(new UnitSelector(m), "growx");
|
||||
shroudPanel.add(new BasicSlider(m.getSliderModel(0, 0.4, 1.5)), "w 150lp, wrap");
|
||||
|
||||
//// Material:
|
||||
panel.add(new JLabel(trans.get("ParachuteCfg.lbl.Material")), "wrap rel");
|
||||
shroudPanel.add(new JLabel(trans.get("ParachuteCfg.lbl.Material")), "spanx, wrap rel");
|
||||
|
||||
JComboBox<Material> shroudMaterialCombo =
|
||||
new JComboBox<Material>(new MaterialModel(panel, component, Material.Type.LINE, "LineMaterial"));
|
||||
panel.add( shroudMaterialCombo, "spanx, growx, wrap 15lp");
|
||||
new JComboBox<Material>(new MaterialModel(shroudPanel, component, Material.Type.LINE, "LineMaterial"));
|
||||
shroudPanel.add(shroudMaterialCombo, "spanx, growx");
|
||||
order.add(shroudMaterialCombo);
|
||||
|
||||
panel.add(shroudPanel, "spanx, wrap");
|
||||
primary.add(panel, "grow");
|
||||
|
||||
// Right side
|
||||
primary.add(panel, "grow, gapright 20lp");
|
||||
panel = new JPanel(new MigLayout("gap rel unrel", "[][65lp::][30lp::][]", ""));
|
||||
|
||||
//// Placement
|
||||
panel.add(new StyledLabel(trans.get("ParachuteCfg.lbl.Placement"), Style.BOLD), "wrap unrel");
|
||||
// ---------------------------- Placement ----------------------------
|
||||
JPanel placementPanel = new JPanel(new MigLayout("gap rel unrel", "[][65lp::][30lp::][]"));
|
||||
placementPanel.setBorder(BorderFactory.createTitledBorder(trans.get("ParachuteCfg.lbl.Placement")));
|
||||
|
||||
//// Position relative to:
|
||||
panel.add(new JLabel(trans.get("ParachuteCfg.lbl.Posrelativeto")));
|
||||
placementPanel.add(new JLabel(trans.get("ParachuteCfg.lbl.Posrelativeto")));
|
||||
|
||||
final EnumModel<AxialMethod> methodModel =
|
||||
new EnumModel<AxialMethod>(component, "AxialMethod", AxialMethod.axialOffsetMethods );
|
||||
JComboBox<AxialMethod> positionCombo = new JComboBox<AxialMethod>( methodModel );
|
||||
panel.add( positionCombo, "spanx, growx, wrap");
|
||||
placementPanel.add( positionCombo, "spanx, growx, wrap");
|
||||
order.add(positionCombo);
|
||||
|
||||
//// plus
|
||||
panel.add(new JLabel(trans.get("ParachuteCfg.lbl.plus")), "right");
|
||||
placementPanel.add(new JLabel(trans.get("ParachuteCfg.lbl.plus")), "right");
|
||||
|
||||
m = new DoubleModel(component, "AxialOffset", UnitGroup.UNITS_LENGTH);
|
||||
spin = new JSpinner(m.getSpinnerModel());
|
||||
spin.setEditor(new SpinnerEditor(spin));
|
||||
focusElement = spin;
|
||||
panel.add(spin, "growx");
|
||||
placementPanel.add(spin, "growx");
|
||||
order.add(((SpinnerEditor) spin.getEditor()).getTextField());
|
||||
|
||||
panel.add(new UnitSelector(m), "growx");
|
||||
panel.add(new BasicSlider(m.getSliderModel(
|
||||
placementPanel.add(new UnitSelector(m), "growx");
|
||||
placementPanel.add(new BasicSlider(m.getSliderModel(
|
||||
new DoubleModel(component.getParent(), "Length", -1.0, UnitGroup.UNITS_NONE),
|
||||
new DoubleModel(component.getParent(), "Length"))),
|
||||
"w 150lp, wrap");
|
||||
|
||||
//// Spatial length
|
||||
//// Packed length:
|
||||
panel.add(new JLabel(trans.get("ParachuteCfg.lbl.Packedlength")));
|
||||
placementPanel.add(new JLabel(trans.get("ParachuteCfg.lbl.Packedlength")));
|
||||
|
||||
m = new DoubleModel(component, "Length", UnitGroup.UNITS_LENGTH, 0);
|
||||
|
||||
spin = new JSpinner(m.getSpinnerModel());
|
||||
spin.setEditor(new SpinnerEditor(spin));
|
||||
panel.add(spin, "growx");
|
||||
placementPanel.add(spin, "growx");
|
||||
order.add(((SpinnerEditor) spin.getEditor()).getTextField());
|
||||
|
||||
panel.add(new UnitSelector(m), "growx");
|
||||
panel.add(new BasicSlider(m.getSliderModel(0, 0.1, 0.5)), "w 150lp, wrap");
|
||||
placementPanel.add(new UnitSelector(m), "growx");
|
||||
placementPanel.add(new BasicSlider(m.getSliderModel(0, 0.1, 0.5)), "w 150lp, wrap");
|
||||
|
||||
|
||||
//// Tube diameter
|
||||
//// Packed diameter:
|
||||
panel.add(new JLabel(trans.get("ParachuteCfg.lbl.Packeddiam")));
|
||||
placementPanel.add(new JLabel(trans.get("ParachuteCfg.lbl.Packeddiam")));
|
||||
|
||||
final DoubleModel od = new DoubleModel(component, "Radius", 2, UnitGroup.UNITS_LENGTH, 0);
|
||||
// Diameter = 2*Radius
|
||||
|
||||
spin = new JSpinner(od.getSpinnerModel());
|
||||
spin.setEditor(new SpinnerEditor(spin));
|
||||
panel.add(spin, "growx");
|
||||
placementPanel.add(spin, "growx");
|
||||
order.add(((SpinnerEditor) spin.getEditor()).getTextField());
|
||||
|
||||
panel.add(new UnitSelector(od), "growx");
|
||||
panel.add(new BasicSlider(od.getSliderModel(0, 0.04, 0.2)), "w 150lp, wrap");
|
||||
placementPanel.add(new UnitSelector(od), "growx");
|
||||
placementPanel.add(new BasicSlider(od.getSliderModel(0, 0.04, 0.2)), "w 150lp, wrap");
|
||||
|
||||
////// Automatic
|
||||
JCheckBox checkAutoPackedRadius = new JCheckBox(od.getAutomaticAction());
|
||||
checkAutoPackedRadius.setText(trans.get("ParachuteCfg.checkbox.AutomaticPacked"));
|
||||
checkAutoPackedRadius.setToolTipText(trans.get("ParachuteCfg.checkbox.AutomaticPacked.ttip"));
|
||||
panel.add(checkAutoPackedRadius, "skip, span 2, wrap 5lp");
|
||||
placementPanel.add(checkAutoPackedRadius, "skip, span 2, wrap");
|
||||
order.add(checkAutoPackedRadius);
|
||||
|
||||
//// Deployment
|
||||
panel.add(new StyledLabel(trans.get("ParachuteCfg.lbl.Deployment"), Style.BOLD), "wrap unrel");
|
||||
panel.add(placementPanel, "spanx, growx, wrap");
|
||||
|
||||
|
||||
// ---------------------------- Deployment ----------------------------
|
||||
JPanel deploymentPanel = new JPanel(new MigLayout("gap rel unrel", "[][65lp::][30lp::][]"));
|
||||
deploymentPanel.setBorder(BorderFactory.createTitledBorder(trans.get("ParachuteCfg.lbl.Deployment")));
|
||||
|
||||
//// Deploys at:
|
||||
panel.add(new JLabel(trans.get("ParachuteCfg.lbl.Deploysat") + " " + CommonStrings.dagger), "");
|
||||
deploymentPanel.add(new JLabel(trans.get("ParachuteCfg.lbl.Deploysat") + " " + CommonStrings.dagger), "");
|
||||
|
||||
DeploymentConfiguration deploymentConfig = parachute.getDeploymentConfigurations().getDefault();
|
||||
// this issues a warning because EnumModel ipmlements ComboBoxModel without a parameter...
|
||||
@ -241,43 +253,44 @@ public class ParachuteConfig extends RecoveryDeviceConfig {
|
||||
updateFields();
|
||||
}
|
||||
});
|
||||
panel.add(eventCombo, "spanx 3, growx, wrap");
|
||||
deploymentPanel.add(eventCombo, "spanx 3, growx, wrap");
|
||||
order.add(eventCombo);
|
||||
|
||||
// ... and delay
|
||||
//// plus
|
||||
panel.add(new JLabel(trans.get("ParachuteCfg.lbl.plusdelay")), "right");
|
||||
deploymentPanel.add(new JLabel(trans.get("ParachuteCfg.lbl.plusdelay")), "right");
|
||||
|
||||
m = new DoubleModel(deploymentConfig, "DeployDelay", 0);
|
||||
spin = new JSpinner(m.getSpinnerModel());
|
||||
spin.setEditor(new SpinnerEditor(spin, 3));
|
||||
panel.add(spin, "spanx, split");
|
||||
deploymentPanel.add(spin, "spanx, split");
|
||||
order.add(((SpinnerEditor) spin.getEditor()).getTextField());
|
||||
|
||||
//// seconds
|
||||
panel.add(new JLabel(trans.get("ParachuteCfg.lbl.seconds")), "wrap paragraph");
|
||||
deploymentPanel.add(new JLabel(trans.get("ParachuteCfg.lbl.seconds")), "wrap paragraph");
|
||||
|
||||
//// Altitude:
|
||||
label = new JLabel(trans.get("ParachuteCfg.lbl.Altitude") + CommonStrings.dagger);
|
||||
altitudeComponents.add(label);
|
||||
panel.add(label);
|
||||
deploymentPanel.add(label);
|
||||
|
||||
m = new DoubleModel(deploymentConfig, "DeployAltitude", UnitGroup.UNITS_DISTANCE, 0);
|
||||
|
||||
spin = new JSpinner(m.getSpinnerModel());
|
||||
spin.setEditor(new SpinnerEditor(spin));
|
||||
altitudeComponents.add(spin);
|
||||
panel.add(spin, "growx");
|
||||
deploymentPanel.add(spin, "growx");
|
||||
order.add(((SpinnerEditor) spin.getEditor()).getTextField());
|
||||
UnitSelector unit = new UnitSelector(m);
|
||||
altitudeComponents.add(unit);
|
||||
panel.add(unit, "growx");
|
||||
deploymentPanel.add(unit, "growx");
|
||||
BasicSlider slider = new BasicSlider(m.getSliderModel(100, 1000));
|
||||
altitudeComponents.add(slider);
|
||||
panel.add(slider, "w 150lp, wrap");
|
||||
deploymentPanel.add(slider, "w 150lp, wrap");
|
||||
|
||||
panel.add(new StyledLabel(CommonStrings.override_description, -1), "spanx, wrap para");
|
||||
deploymentPanel.add(new StyledLabel(CommonStrings.override_description, -1), "spanx, wrap");
|
||||
|
||||
panel.add(deploymentPanel, "spanx, growx, wrap para");
|
||||
primary.add(panel, "grow");
|
||||
|
||||
updateFields();
|
||||
|
@ -151,8 +151,8 @@ public class RailButtonConfig extends RocketComponentConfig {
|
||||
"w 100lp, wrap para");
|
||||
|
||||
}
|
||||
//// Instance count
|
||||
panel.add(instanceablePanel(rbc), "span, wrap");
|
||||
//// Instance count/separation
|
||||
panel.add(instanceablePanel(), "span, wrap");
|
||||
|
||||
//// Material
|
||||
MaterialPanel materialPanel = new MaterialPanel(component, document, Material.Type.BULK, order);
|
||||
|
@ -14,7 +14,6 @@ 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.StyledLabel;
|
||||
import net.sf.openrocket.gui.components.UnitSelector;
|
||||
import net.sf.openrocket.l10n.Translator;
|
||||
import net.sf.openrocket.material.Material;
|
||||
@ -40,7 +39,6 @@ public class RingComponentConfig extends RocketComponentConfig {
|
||||
DoubleModel od = null;
|
||||
|
||||
//// Attributes ----
|
||||
panel.add(new StyledLabel(trans.get("ringcompcfg.lbl.Attributes"), StyledLabel.Style.BOLD), "wrap unrel");
|
||||
|
||||
//// Outer diameter
|
||||
if (outer != null) {
|
||||
@ -141,7 +139,6 @@ public class RingComponentConfig extends RocketComponentConfig {
|
||||
|
||||
//// Placement ----
|
||||
JPanel positionPanel = new JPanel(new MigLayout("gap rel unrel, insets 0", "[][65lp::][30lp::]", ""));
|
||||
positionPanel.add(new StyledLabel(trans.get("ringcompcfg.lbl.Placement"), StyledLabel.Style.BOLD), "wrap unrel");
|
||||
|
||||
//// Position relative to:
|
||||
positionPanel.add(new JLabel(trans.get("ringcompcfg.Positionrelativeto")));
|
||||
|
@ -464,7 +464,7 @@ public class RocketComponentConfig extends JPanel {
|
||||
}
|
||||
}
|
||||
|
||||
protected JPanel instanceablePanel( Instanceable inst ){
|
||||
protected JPanel instanceablePanel() {
|
||||
JPanel panel = new JPanel( new MigLayout("fill, insets 0") );
|
||||
{ // Instance Count
|
||||
panel.add(new JLabel(trans.get("RocketCompCfg.lbl.InstanceCount")));
|
||||
|
@ -10,7 +10,6 @@ import net.sf.openrocket.gui.adaptors.CustomFocusTraversalPolicy;
|
||||
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.StyledLabel;
|
||||
import net.sf.openrocket.gui.components.UnitSelector;
|
||||
import net.sf.openrocket.l10n.Translator;
|
||||
import net.sf.openrocket.material.Material;
|
||||
@ -38,8 +37,7 @@ public class ShockCordConfig extends RocketComponentConfig {
|
||||
////// 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");
|
||||
// Attributes
|
||||
|
||||
// Cord length
|
||||
//// Shock cord length
|
||||
@ -68,8 +66,7 @@ public class ShockCordConfig extends RocketComponentConfig {
|
||||
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("ShockCordCfg.lbl.ShockcordPlacement"), StyledLabel.Style.BOLD), "wrap unrel");
|
||||
// Placement
|
||||
|
||||
//// Position relative to:
|
||||
panel2.add(new JLabel(trans.get("ShockCordCfg.lbl.Posrelativeto")));
|
||||
|
@ -6,6 +6,7 @@ import java.awt.event.ActionListener;
|
||||
import java.awt.event.ItemEvent;
|
||||
import java.awt.event.ItemListener;
|
||||
|
||||
import javax.swing.BorderFactory;
|
||||
import javax.swing.JButton;
|
||||
import javax.swing.JCheckBox;
|
||||
import javax.swing.JComboBox;
|
||||
@ -47,67 +48,68 @@ public class StreamerConfig extends RecoveryDeviceConfig {
|
||||
// Left side
|
||||
JPanel primary = new JPanel(new MigLayout());
|
||||
|
||||
JPanel panel = new JPanel(new MigLayout("gap rel unrel", "[][65lp::][30lp::][]", ""));
|
||||
JPanel panel = new JPanel(new MigLayout());
|
||||
|
||||
//// Attributes
|
||||
panel.add(new StyledLabel(trans.get("StreamerCfg.lbl.Attributes"), StyledLabel.Style.BOLD), "wrap unrel");
|
||||
//// ---------------------------- Attributes ----------------------------
|
||||
JPanel attributesPanel = new JPanel(new MigLayout("gap rel unrel", "[][65lp::][30lp::][]"));
|
||||
attributesPanel.setBorder(BorderFactory.createTitledBorder(trans.get("StreamerCfg.lbl.Attributes")));
|
||||
|
||||
//// Strip length:
|
||||
panel.add(new JLabel(trans.get("StreamerCfg.lbl.Striplength")));
|
||||
attributesPanel.add(new JLabel(trans.get("StreamerCfg.lbl.Striplength")));
|
||||
|
||||
DoubleModel m = new DoubleModel(component, "StripLength", UnitGroup.UNITS_LENGTH, 0);
|
||||
|
||||
JSpinner spin = new JSpinner(m.getSpinnerModel());
|
||||
spin.setEditor(new SpinnerEditor(spin));
|
||||
panel.add(spin, "growx");
|
||||
attributesPanel.add(spin, "growx");
|
||||
order.add(((SpinnerEditor) spin.getEditor()).getTextField());
|
||||
panel.add(new UnitSelector(m), "growx");
|
||||
panel.add(new BasicSlider(m.getSliderModel(0, 0.6, 1.5)), "w 150lp, wrap");
|
||||
attributesPanel.add(new UnitSelector(m), "growx");
|
||||
attributesPanel.add(new BasicSlider(m.getSliderModel(0, 0.6, 1.5)), "w 150lp, wrap");
|
||||
|
||||
//// Strip width:
|
||||
panel.add(new JLabel(trans.get("StreamerCfg.lbl.Stripwidth")));
|
||||
attributesPanel.add(new JLabel(trans.get("StreamerCfg.lbl.Stripwidth")));
|
||||
|
||||
m = new DoubleModel(component, "StripWidth", UnitGroup.UNITS_LENGTH, 0);
|
||||
|
||||
spin = new JSpinner(m.getSpinnerModel());
|
||||
spin.setEditor(new SpinnerEditor(spin));
|
||||
panel.add(spin, "growx");
|
||||
attributesPanel.add(spin, "growx");
|
||||
order.add(((SpinnerEditor) spin.getEditor()).getTextField());
|
||||
panel.add(new UnitSelector(m), "growx");
|
||||
panel.add(new BasicSlider(m.getSliderModel(0, 0.2)), "w 150lp, wrap 10lp");
|
||||
attributesPanel.add(new UnitSelector(m), "growx");
|
||||
attributesPanel.add(new BasicSlider(m.getSliderModel(0, 0.2)), "w 150lp, wrap 10lp");
|
||||
|
||||
//// Strip area:
|
||||
panel.add(new JLabel(trans.get("StreamerCfg.lbl.Striparea")));
|
||||
attributesPanel.add(new JLabel(trans.get("StreamerCfg.lbl.Striparea")));
|
||||
|
||||
m = new DoubleModel(component, "Area", UnitGroup.UNITS_AREA, 0);
|
||||
|
||||
spin = new JSpinner(m.getSpinnerModel());
|
||||
spin.setEditor(new SpinnerEditor(spin));
|
||||
panel.add(spin, "growx");
|
||||
attributesPanel.add(spin, "growx");
|
||||
order.add(((SpinnerEditor) spin.getEditor()).getTextField());
|
||||
panel.add(new UnitSelector(m), "growx");
|
||||
panel.add(new BasicSlider(m.getSliderModel(0, 0.04, 0.25)), "w 150lp, wrap");
|
||||
attributesPanel.add(new UnitSelector(m), "growx");
|
||||
attributesPanel.add(new BasicSlider(m.getSliderModel(0, 0.04, 0.25)), "w 150lp, wrap");
|
||||
|
||||
//// Aspect ratio:
|
||||
panel.add(new JLabel(trans.get("StreamerCfg.lbl.Aspectratio")));
|
||||
attributesPanel.add(new JLabel(trans.get("StreamerCfg.lbl.Aspectratio")));
|
||||
|
||||
m = new DoubleModel(component, "AspectRatio", UnitGroup.UNITS_NONE, 0);
|
||||
|
||||
spin = new JSpinner(m.getSpinnerModel());
|
||||
spin.setEditor(new SpinnerEditor(spin));
|
||||
panel.add(spin, "growx");
|
||||
attributesPanel.add(spin, "growx");
|
||||
order.add(((SpinnerEditor) spin.getEditor()).getTextField());
|
||||
// panel.add(new UnitSelector(m),"growx");
|
||||
panel.add(new BasicSlider(m.getSliderModel(2, 15)), "skip, w 150lp, wrap 10lp");
|
||||
attributesPanel.add(new BasicSlider(m.getSliderModel(2, 15)), "skip, w 150lp, wrap 10lp");
|
||||
|
||||
//// Material:
|
||||
panel.add(new JLabel(trans.get("StreamerCfg.lbl.Material")));
|
||||
attributesPanel.add(new JLabel(trans.get("StreamerCfg.lbl.Material")));
|
||||
|
||||
JComboBox<Material> streamerMaterialCombo = new JComboBox<Material>(new MaterialModel(panel, component,
|
||||
JComboBox<Material> streamerMaterialCombo = new JComboBox<Material>(new MaterialModel(attributesPanel, component,
|
||||
Material.Type.SURFACE));
|
||||
//// The component material affects the weight of the component.
|
||||
streamerMaterialCombo.setToolTipText(trans.get("StreamerCfg.combo.ttip.MaterialModel"));
|
||||
panel.add(streamerMaterialCombo, "spanx 3, growx, wrap 15lp");
|
||||
attributesPanel.add(streamerMaterialCombo, "spanx 3, growx, wrap 15lp");
|
||||
order.add(streamerMaterialCombo);
|
||||
|
||||
// CD
|
||||
@ -118,105 +120,108 @@ public class StreamerConfig extends RecoveryDeviceConfig {
|
||||
//// "A larger drag coefficient yields a slowed descent rate.
|
||||
trans.get("StreamerCfg.lbl.longB2");
|
||||
label.setToolTipText(tip);
|
||||
panel.add(label);
|
||||
attributesPanel.add(label);
|
||||
|
||||
m = new DoubleModel(component, "CD", UnitGroup.UNITS_COEFFICIENT, 0);
|
||||
|
||||
spin = new JSpinner(m.getSpinnerModel());
|
||||
spin.setToolTipText(tip);
|
||||
spin.setEditor(new SpinnerEditor(spin));
|
||||
panel.add(spin, "growx");
|
||||
attributesPanel.add(spin, "growx");
|
||||
order.add(((SpinnerEditor) spin.getEditor()).getTextField());
|
||||
|
||||
JCheckBox check = new JCheckBox(m.getAutomaticAction());
|
||||
//// Automatic
|
||||
check.setText(trans.get("StreamerCfg.lbl.AutomaticCd"));
|
||||
check.setToolTipText(trans.get("StreamerCfg.lbl.AutomaticCd.ttip"));
|
||||
panel.add(check, "skip, span, wrap");
|
||||
attributesPanel.add(check, "skip, span, wrap");
|
||||
order.add(check);
|
||||
|
||||
//// The drag coefficient is relative to the area of the streamer.
|
||||
panel.add(new StyledLabel(trans.get("StreamerCfg.lbl.longC1"),
|
||||
attributesPanel.add(new StyledLabel(trans.get("StreamerCfg.lbl.longC1"),
|
||||
-1, StyledLabel.Style.ITALIC), "gapleft para, span, wrap");
|
||||
|
||||
panel.add(attributesPanel, "growx, wrap");
|
||||
|
||||
|
||||
// Right side
|
||||
primary.add(panel, "grow, gapright 20lp");
|
||||
panel = new JPanel(new MigLayout("gap rel unrel", "[][65lp::][30lp::][]", ""));
|
||||
primary.add(panel, "grow");
|
||||
panel = new JPanel(new MigLayout());
|
||||
|
||||
//// Placement
|
||||
panel.add(new StyledLabel(trans.get("StreamerCfg.lbl.Placement"), StyledLabel.Style.BOLD), "wrap unrel");
|
||||
|
||||
//// ---------------------------- Placement ----------------------------
|
||||
JPanel placementPanel = new JPanel(new MigLayout("gap rel unrel", "[][65lp::][30lp::][]"));
|
||||
placementPanel.setBorder(BorderFactory.createTitledBorder(trans.get("StreamerCfg.lbl.Placement")));
|
||||
|
||||
//// Position relative to:
|
||||
panel.add(new JLabel(trans.get("StreamerCfg.lbl.Posrelativeto")));
|
||||
placementPanel.add(new JLabel(trans.get("StreamerCfg.lbl.Posrelativeto")));
|
||||
|
||||
final EnumModel<AxialMethod> methodModel = new EnumModel<AxialMethod>(component, "AxialMethod", AxialMethod.axialOffsetMethods );
|
||||
final JComboBox<AxialMethod> positionCombo = new JComboBox<AxialMethod>( methodModel );
|
||||
panel.add( positionCombo, "spanx, growx, wrap");
|
||||
final EnumModel<AxialMethod> methodModel = new EnumModel<>(component, "AxialMethod", AxialMethod.axialOffsetMethods );
|
||||
final JComboBox<AxialMethod> positionCombo = new JComboBox<>( methodModel );
|
||||
placementPanel.add( positionCombo, "spanx, growx, wrap");
|
||||
order.add(positionCombo);
|
||||
|
||||
//// plus
|
||||
panel.add(new JLabel(trans.get("StreamerCfg.lbl.plus")), "right");
|
||||
placementPanel.add(new JLabel(trans.get("StreamerCfg.lbl.plus")), "right");
|
||||
|
||||
m = new DoubleModel(component, "AxialOffset", UnitGroup.UNITS_LENGTH);
|
||||
spin = new JSpinner(m.getSpinnerModel());
|
||||
spin.setEditor(new SpinnerEditor(spin));
|
||||
focusElement = spin;
|
||||
panel.add(spin, "growx");
|
||||
placementPanel.add(spin, "growx");
|
||||
order.add(((SpinnerEditor) spin.getEditor()).getTextField());
|
||||
|
||||
panel.add(new UnitSelector(m), "growx");
|
||||
panel.add(new BasicSlider(m.getSliderModel(
|
||||
placementPanel.add(new UnitSelector(m), "growx");
|
||||
placementPanel.add(new BasicSlider(m.getSliderModel(
|
||||
new DoubleModel(component.getParent(), "Length", -1.0, UnitGroup.UNITS_NONE),
|
||||
new DoubleModel(component.getParent(), "Length"))),
|
||||
"w 150lp, wrap");
|
||||
|
||||
|
||||
//// Packed length:
|
||||
panel.add(new JLabel(trans.get("StreamerCfg.lbl.Packedlength")));
|
||||
placementPanel.add(new JLabel(trans.get("StreamerCfg.lbl.Packedlength")));
|
||||
|
||||
m = new DoubleModel(component, "Length", UnitGroup.UNITS_LENGTH, 0);
|
||||
|
||||
spin = new JSpinner(m.getSpinnerModel());
|
||||
spin.setEditor(new SpinnerEditor(spin));
|
||||
panel.add(spin, "growx");
|
||||
placementPanel.add(spin, "growx");
|
||||
order.add(((SpinnerEditor) spin.getEditor()).getTextField());
|
||||
|
||||
panel.add(new UnitSelector(m), "growx");
|
||||
panel.add(new BasicSlider(m.getSliderModel(0, 0.1, 0.5)), "w 150lp, wrap");
|
||||
placementPanel.add(new UnitSelector(m), "growx");
|
||||
placementPanel.add(new BasicSlider(m.getSliderModel(0, 0.1, 0.5)), "w 150lp, wrap");
|
||||
|
||||
|
||||
//// Tube diameter
|
||||
//// Packed diameter:
|
||||
panel.add(new JLabel(trans.get("StreamerCfg.lbl.Packeddiam")));
|
||||
placementPanel.add(new JLabel(trans.get("StreamerCfg.lbl.Packeddiam")));
|
||||
|
||||
DoubleModel od = new DoubleModel(component, "Radius", 2, UnitGroup.UNITS_LENGTH, 0);
|
||||
// Diameter = 2*Radius
|
||||
|
||||
spin = new JSpinner(od.getSpinnerModel());
|
||||
spin.setEditor(new SpinnerEditor(spin));
|
||||
panel.add(spin, "growx");
|
||||
placementPanel.add(spin, "growx");
|
||||
order.add(((SpinnerEditor) spin.getEditor()).getTextField());
|
||||
|
||||
panel.add(new UnitSelector(od), "growx");
|
||||
panel.add(new BasicSlider(od.getSliderModel(0, 0.04, 0.2)), "w 150lp, wrap");
|
||||
placementPanel.add(new UnitSelector(od), "growx");
|
||||
placementPanel.add(new BasicSlider(od.getSliderModel(0, 0.04, 0.2)), "w 150lp, wrap");
|
||||
|
||||
////// Automatic
|
||||
JCheckBox checkAutoPackedRadius = new JCheckBox(od.getAutomaticAction());
|
||||
checkAutoPackedRadius.setText(trans.get("ParachuteCfg.checkbox.AutomaticPacked"));
|
||||
checkAutoPackedRadius.setToolTipText(trans.get("ParachuteCfg.checkbox.AutomaticPacked.ttip"));
|
||||
panel.add(checkAutoPackedRadius, "skip, span 2, wrap 5lp");
|
||||
placementPanel.add(checkAutoPackedRadius, "skip, spanx 2");
|
||||
order.add(checkAutoPackedRadius);
|
||||
|
||||
panel.add(placementPanel, "growx, wrap 15lp");
|
||||
|
||||
//// Deployment
|
||||
panel.add(new StyledLabel(trans.get("StreamerCfg.lbl.Deployment"), StyledLabel.Style.BOLD), "wrap unrel");
|
||||
|
||||
//// ---------------------------- Deployment ----------------------------
|
||||
JPanel deploymentPanel = new JPanel(new MigLayout("gap rel unrel", "[][65lp::][30lp::][]"));
|
||||
deploymentPanel.setBorder(BorderFactory.createTitledBorder(trans.get("StreamerCfg.lbl.Deployment")));
|
||||
|
||||
//// Deploys at:
|
||||
panel.add(new JLabel(trans.get("StreamerCfg.lbl.Deploysat") + " " + CommonStrings.dagger), "");
|
||||
deploymentPanel.add(new JLabel(trans.get("StreamerCfg.lbl.Deploysat") + " " + CommonStrings.dagger), "");
|
||||
|
||||
DeploymentConfiguration deploymentConfig = streamer.getDeploymentConfigurations().getDefault();
|
||||
JComboBox<DeploymentConfiguration.DeployEvent> eventCombo = new JComboBox<DeploymentConfiguration.DeployEvent>(new EnumModel<DeploymentConfiguration.DeployEvent>(deploymentConfig, "DeployEvent"));
|
||||
JComboBox<DeploymentConfiguration.DeployEvent> eventCombo = new JComboBox<>(
|
||||
new EnumModel<DeploymentConfiguration.DeployEvent>(deploymentConfig, "DeployEvent"));
|
||||
if( (component.getStageNumber() + 1 ) == d.getRocket().getStageCount() ){
|
||||
// This is the bottom stage. restrict deployment options.
|
||||
eventCombo.removeItem( DeployEvent.LOWER_STAGE_SEPARATION );
|
||||
@ -227,43 +232,44 @@ public class StreamerConfig extends RecoveryDeviceConfig {
|
||||
updateFields();
|
||||
}
|
||||
});
|
||||
panel.add( eventCombo, "spanx 3, growx, wrap");
|
||||
deploymentPanel.add( eventCombo, "spanx 3, growx, wrap");
|
||||
order.add(eventCombo);
|
||||
|
||||
// ... and delay
|
||||
//// plus
|
||||
panel.add(new JLabel(trans.get("StreamerCfg.lbl.plusdelay")), "right");
|
||||
deploymentPanel.add(new JLabel(trans.get("StreamerCfg.lbl.plusdelay")), "right");
|
||||
|
||||
m = new DoubleModel(deploymentConfig, "DeployDelay", 0);
|
||||
spin = new JSpinner(m.getSpinnerModel());
|
||||
spin.setEditor(new SpinnerEditor(spin, 3));
|
||||
panel.add(spin, "spanx, split");
|
||||
deploymentPanel.add(spin, "spanx, split");
|
||||
order.add(((SpinnerEditor) spin.getEditor()).getTextField());
|
||||
|
||||
//// seconds
|
||||
panel.add(new JLabel(trans.get("StreamerCfg.lbl.seconds")), "wrap paragraph");
|
||||
deploymentPanel.add(new JLabel(trans.get("StreamerCfg.lbl.seconds")), "wrap paragraph");
|
||||
|
||||
// Altitude:
|
||||
label = new JLabel(trans.get("StreamerCfg.lbl.Altitude") + CommonStrings.dagger);
|
||||
altitudeComponents.add(label);
|
||||
panel.add(label);
|
||||
deploymentPanel.add(label);
|
||||
|
||||
m = new DoubleModel(deploymentConfig, "DeployAltitude", UnitGroup.UNITS_DISTANCE, 0);
|
||||
|
||||
spin = new JSpinner(m.getSpinnerModel());
|
||||
spin.setEditor(new SpinnerEditor(spin));
|
||||
altitudeComponents.add(spin);
|
||||
panel.add(spin, "growx");
|
||||
deploymentPanel.add(spin, "growx");
|
||||
order.add(((SpinnerEditor) spin.getEditor()).getTextField());
|
||||
UnitSelector unit = new UnitSelector(m);
|
||||
altitudeComponents.add(unit);
|
||||
panel.add(unit, "growx");
|
||||
deploymentPanel.add(unit, "growx");
|
||||
BasicSlider slider = new BasicSlider(m.getSliderModel(100, 1000));
|
||||
altitudeComponents.add(slider);
|
||||
panel.add(slider, "w 150lp, wrap");
|
||||
deploymentPanel.add(slider, "w 150lp, wrap");
|
||||
|
||||
panel.add(new StyledLabel(CommonStrings.override_description, -1), "spanx, wrap para");
|
||||
deploymentPanel.add(new StyledLabel(CommonStrings.override_description, -1), "spanx, wrap");
|
||||
|
||||
panel.add(deploymentPanel, "growx");
|
||||
primary.add(panel, "grow");
|
||||
|
||||
updateFields();
|
||||
|
Loading…
x
Reference in New Issue
Block a user