Fix a bunch of small stuff
This commit is contained in:
parent
e2e9635136
commit
0e3f87b73d
@ -810,6 +810,7 @@ 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.
|
||||
@ -817,6 +818,7 @@ 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
|
||||
@ -971,8 +973,8 @@ RocketCompCfg.checkbox.Endcapped.ttip = Caps (closes) the end of the shoulder.
|
||||
RocketCompCfg.title.Aftshoulder = Aft shoulder
|
||||
RocketCompCfg.border.Foreshoulder = Fore shoulder
|
||||
!RocketCompCfg.lbl.Length = Length:
|
||||
RocketCompCfg.lbl.InstanceCount = Instance Count
|
||||
RocketCompCfg.lbl.InstanceSeparation = Instance Separation
|
||||
RocketCompCfg.lbl.InstanceCount = Instance Count:
|
||||
RocketCompCfg.lbl.InstanceSeparation = Instance Separation:
|
||||
RocketCompCfg.tab.Outside = Outside
|
||||
RocketCompCfg.tab.Inside = Inside
|
||||
RocketCompCfg.tab.RightSide = Right Side
|
||||
|
@ -150,7 +150,7 @@ public class EllipticalFinSetConfig extends FinSetConfig {
|
||||
|
||||
|
||||
//// Right portion
|
||||
mainPanel.add(panel, "aligny 20%");
|
||||
mainPanel.add(panel, "aligny 0");
|
||||
|
||||
mainPanel.add(new JSeparator(SwingConstants.VERTICAL), "growy");
|
||||
|
||||
|
@ -161,7 +161,7 @@ public class FreeformFinSetConfig extends FinSetConfig {
|
||||
order.add(((SpinnerEditor) cantAngleSpinner.getEditor()).getTextField());
|
||||
|
||||
panel.add(new UnitSelector(cantAngleModel), "growx");
|
||||
panel.add(new BasicSlider(cantAngleModel.getSliderModel(-FinSet.MAX_CANT_RADIANS, FinSet.MAX_CANT_RADIANS)), "w 150lp, wrap 40lp");
|
||||
panel.add(new BasicSlider(cantAngleModel.getSliderModel(-FinSet.MAX_CANT_RADIANS, FinSet.MAX_CANT_RADIANS)), "w 150lp, wrap 20lp");
|
||||
}
|
||||
|
||||
|
||||
@ -195,7 +195,7 @@ public class FreeformFinSetConfig extends FinSetConfig {
|
||||
});
|
||||
}
|
||||
|
||||
mainPanel.add(panel, "aligny 20%");
|
||||
mainPanel.add(panel, "aligny 0");
|
||||
mainPanel.add(new JSeparator(SwingConstants.VERTICAL), "growy, height 150lp");
|
||||
|
||||
|
||||
|
@ -154,8 +154,8 @@ public class InnerTubeConfig extends RocketComponentConfig {
|
||||
|
||||
|
||||
//// Right side of panel ----
|
||||
JPanel panel2 = new JPanel(new MigLayout("gap rel unrel", "[][65lp::][30lp::][15lp]", ""));
|
||||
panel.add(panel2, "cell 4 0, gapleft paragraph, aligny 0%, spany");
|
||||
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");
|
||||
|
@ -51,7 +51,7 @@ public class LaunchLugConfig extends RocketComponentConfig {
|
||||
order.add(((SpinnerEditor) spin.getEditor()).getTextField());
|
||||
|
||||
panel.add(new UnitSelector(m), "growx");
|
||||
panel.add(new BasicSlider(m.getSliderModel(0, 0.02, 0.1)), "w 100lp, wrap para");
|
||||
panel.add(new BasicSlider(m.getSliderModel(0, 0.02, 0.1)), "w 100lp, wrap 20lp");
|
||||
|
||||
|
||||
//// Body tube diameter
|
||||
|
@ -36,7 +36,7 @@ public class MotorConfig extends JPanel {
|
||||
private static final Translator trans = Application.getTranslator();
|
||||
|
||||
public MotorConfig(MotorMount motorMount, List<Component> order) {
|
||||
super(new MigLayout("fill"));
|
||||
super(new MigLayout("fillx"));
|
||||
|
||||
this.mount = motorMount;
|
||||
|
||||
@ -76,7 +76,7 @@ public class MotorConfig extends JPanel {
|
||||
|
||||
final EnumModel<IgnitionEvent> igEvModel = new EnumModel<IgnitionEvent>(motorInstance, "IgnitionEvent", IgnitionEvent.values());
|
||||
final JComboBox<IgnitionEvent> eventBox = new JComboBox<IgnitionEvent>( igEvModel);
|
||||
panel.add(eventBox , "growx, wrap");
|
||||
panel.add(eventBox , "wrap");
|
||||
order.add(eventBox);
|
||||
|
||||
// ... and delay
|
||||
|
@ -69,7 +69,7 @@ public class NoseConeConfig extends RocketComponentConfig {
|
||||
updateEnabled();
|
||||
}
|
||||
});
|
||||
panel.add(typeBox, "span, wrap rel");
|
||||
panel.add(typeBox, "spanx 3, growx, wrap rel");
|
||||
order.add(typeBox);
|
||||
|
||||
//// Shape parameter:
|
||||
|
@ -46,7 +46,7 @@ public class RailButtonConfig extends RocketComponentConfig {
|
||||
|
||||
JPanel primary = new JPanel(new MigLayout("fill"));
|
||||
|
||||
JPanel panel = new JPanel( new MigLayout());
|
||||
JPanel panel = new JPanel( new MigLayout("gap rel unrel"));
|
||||
|
||||
|
||||
{ //// Outer Diameter
|
||||
@ -67,7 +67,7 @@ public class RailButtonConfig extends RocketComponentConfig {
|
||||
panel.add(IDSpinner, "growx");
|
||||
order.add(((SpinnerEditor) IDSpinner.getEditor()).getTextField());
|
||||
panel.add(new UnitSelector(IDModel), "growx");
|
||||
panel.add(new BasicSlider(IDModel.getSliderModel(0, 0.02)), "w 100lp, wrap para");
|
||||
panel.add(new BasicSlider(IDModel.getSliderModel(0, 0.02)), "w 100lp, wrap 20lp");
|
||||
}
|
||||
{ //// Base Height
|
||||
panel.add(new JLabel(trans.get("RailBtnCfg.lbl.BaseHeight")));
|
||||
@ -100,7 +100,7 @@ public class RailButtonConfig extends RocketComponentConfig {
|
||||
order.add(((SpinnerEditor) heightSpinner.getEditor()).getTextField());
|
||||
panel.add(new UnitSelector(heightModel), "growx");
|
||||
panel.add(new BasicSlider(heightModel.getSliderModel(new DoubleModel(component, "MinTotalHeight", UnitGroup.UNITS_LENGTH), 0.02)),
|
||||
"w 100lp, wrap para");
|
||||
"w 100lp, wrap 20lp");
|
||||
}
|
||||
{ //// Screw height
|
||||
panel.add(new JLabel(trans.get("RailBtnCfg.lbl.ScrewHeight")));
|
||||
@ -110,10 +110,10 @@ public class RailButtonConfig extends RocketComponentConfig {
|
||||
panel.add(heightSpinner, "growx");
|
||||
order.add(((SpinnerEditor) heightSpinner.getEditor()).getTextField());
|
||||
panel.add(new UnitSelector(heightModel), "growx");
|
||||
panel.add(new BasicSlider(heightModel.getSliderModel(0, 0.02)), "w 100lp, wrap para");
|
||||
panel.add(new BasicSlider(heightModel.getSliderModel(0, 0.02)), "w 100lp, wrap 20lp");
|
||||
}
|
||||
|
||||
{ //// Angular Position:
|
||||
{ //// Rotation:
|
||||
panel.add(new JLabel(trans.get("RailBtnCfg.lbl.Angle")));
|
||||
DoubleModel angleModel = new DoubleModel(component, "AngleOffset", UnitGroup.UNITS_ANGLE, -180, +180);
|
||||
JSpinner angleSpinner = new JSpinner( angleModel.getSpinnerModel());
|
||||
|
@ -14,6 +14,7 @@ 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;
|
||||
@ -37,7 +38,9 @@ public class RingComponentConfig extends RocketComponentConfig {
|
||||
DoubleModel m;
|
||||
JSpinner spin;
|
||||
DoubleModel od = null;
|
||||
|
||||
|
||||
//// Attributes ----
|
||||
panel.add(new StyledLabel(trans.get("ringcompcfg.lbl.Attributes"), StyledLabel.Style.BOLD), "wrap unrel");
|
||||
|
||||
//// Outer diameter
|
||||
if (outer != null) {
|
||||
@ -131,20 +134,25 @@ public class RingComponentConfig extends RocketComponentConfig {
|
||||
panel.add(new UnitSelector(m), "growx");
|
||||
panel.add(new BasicSlider(m.getSliderModel(0, 0.1, 1.0)), "w 100lp, wrap");
|
||||
}
|
||||
|
||||
|
||||
//// Position
|
||||
|
||||
|
||||
//// Material
|
||||
MaterialPanel materialPanel = new MaterialPanel(component, document, Material.Type.BULK, order);
|
||||
panel.add(materialPanel, "gaptop 20lp, spanx 4, growx, wrap");
|
||||
|
||||
//// 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:
|
||||
panel.add(new JLabel(trans.get("ringcompcfg.Positionrelativeto")));
|
||||
positionPanel.add(new JLabel(trans.get("ringcompcfg.Positionrelativeto")));
|
||||
|
||||
final EnumModel<AxialMethod> methodModel = new EnumModel<AxialMethod>(component, "AxialMethod", AxialMethod.axialOffsetMethods );
|
||||
final JComboBox<AxialMethod> positionCombo = new JComboBox<AxialMethod>( methodModel );
|
||||
panel.add( positionCombo, "spanx 3, growx, wrap");
|
||||
positionPanel.add(positionCombo, "spanx 3, growx, wrap");
|
||||
order.add(positionCombo);
|
||||
|
||||
//// plus
|
||||
panel.add(new JLabel(trans.get("ringcompcfg.plus")), "right");
|
||||
positionPanel.add(new JLabel(trans.get("ringcompcfg.plus")), "right");
|
||||
|
||||
//// PositionValue
|
||||
m = new DoubleModel(component, "AxialOffset", UnitGroup.UNITS_LENGTH);
|
||||
@ -153,19 +161,16 @@ public class RingComponentConfig extends RocketComponentConfig {
|
||||
if (!(component instanceof ThicknessRingComponent)) {
|
||||
focusElement = spin;
|
||||
}
|
||||
panel.add(spin, "growx");
|
||||
positionPanel.add(spin, "growx");
|
||||
order.add(((SpinnerEditor) spin.getEditor()).getTextField());
|
||||
|
||||
panel.add(new UnitSelector(m), "growx");
|
||||
panel.add(new BasicSlider(m.getSliderModel(
|
||||
|
||||
positionPanel.add(new UnitSelector(m), "growx");
|
||||
positionPanel.add(new BasicSlider(m.getSliderModel(
|
||||
new DoubleModel(component.getParent(), "Length", -1.0, UnitGroup.UNITS_NONE),
|
||||
new DoubleModel(component.getParent(), "Length"))),
|
||||
"w 100lp, wrap");
|
||||
|
||||
|
||||
//// Material
|
||||
MaterialPanel materialPanel = new MaterialPanel(component, document, Material.Type.BULK, order);
|
||||
panel.add(materialPanel, "cell 4 0, gapleft paragraph, aligny 0%, spany");
|
||||
|
||||
panel.add(positionPanel, "cell 4 0, gapleft paragraph, aligny 0%, spany");
|
||||
|
||||
return panel;
|
||||
}
|
||||
|
@ -137,7 +137,7 @@ public class StreamerConfig extends RecoveryDeviceConfig {
|
||||
|
||||
//// The drag coefficient is relative to the area of the streamer.
|
||||
panel.add(new StyledLabel(trans.get("StreamerCfg.lbl.longC1"),
|
||||
-1), "span, wrap");
|
||||
-1, StyledLabel.Style.ITALIC), "gapleft para, span, wrap");
|
||||
|
||||
|
||||
// Right side
|
||||
|
@ -203,7 +203,7 @@ public class TrapezoidFinSetConfig extends FinSetConfig {
|
||||
"w 150lp, wrap para");
|
||||
|
||||
|
||||
mainPanel.add(panel, "aligny 20%");
|
||||
mainPanel.add(panel, "aligny 0");
|
||||
|
||||
mainPanel.add(new JSeparator(SwingConstants.VERTICAL), "growy");
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user