Merge remote-tracking branch 'origin' into fix-1258
This commit is contained in:
commit
27b1380a45
@ -1535,6 +1535,9 @@ BodyTube.BodyTube = Body Tube
|
||||
TubeCoupler.TubeCoupler = Tube Coupler
|
||||
!InnerTube
|
||||
InnerTube.InnerTube = Inner Tube
|
||||
InnerTubeCfg.lbl.Attributes = Attributes
|
||||
InnerTubeCfg.lbl.Placement = Placement
|
||||
InnerTubeCfg.lbl.Material = Material:
|
||||
! TrapezoidFinSet
|
||||
TrapezoidFinSet.TrapezoidFinSet = Trapezoidal Fin Set
|
||||
! FreeformFinSet
|
||||
|
@ -35,6 +35,7 @@ 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;
|
||||
@ -62,11 +63,16 @@ public class InnerTubeConfig extends RocketComponentConfig {
|
||||
super(d, c);
|
||||
|
||||
//// General and General properties
|
||||
JPanel rightPanel = new JPanel(new MigLayout());
|
||||
JPanel panel = new JPanel(new MigLayout("gap rel unrel", "[][65lp::][30lp::][]", ""));
|
||||
|
||||
DoubleModel m;
|
||||
JSpinner spin;
|
||||
DoubleModel od = null;
|
||||
|
||||
//// Attributes ----
|
||||
panel.add(new StyledLabel(trans.get("InnerTubeCfg.lbl.Attributes"), StyledLabel.Style.BOLD), "wrap unrel");
|
||||
|
||||
//// Outer diameter
|
||||
panel.add(new JLabel(trans.get("ThicknessRingCompCfg.tab.Outerdiam")));
|
||||
|
||||
@ -136,33 +142,41 @@ public class InnerTubeConfig extends RocketComponentConfig {
|
||||
panel.add(new UnitSelector(m), "growx");
|
||||
panel.add(new BasicSlider(m.getSliderModel(0, 0.1, 1.0)), "w 100lp, wrap");
|
||||
|
||||
//// Material
|
||||
panel.add(materialPanel(Material.Type.BULK),
|
||||
"spanx 3, growx, wrap 15lp");
|
||||
|
||||
//// Position
|
||||
|
||||
//// Right side of panel ----
|
||||
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("InnerTubeCfg.lbl.Placement"), StyledLabel.Style.BOLD), "wrap unrel");
|
||||
|
||||
//// Position relative to:
|
||||
panel.add(new JLabel(trans.get("ringcompcfg.Positionrelativeto")));
|
||||
panel2.add(new JLabel(trans.get("ringcompcfg.Positionrelativeto")));
|
||||
|
||||
JComboBox<?> combo = new JComboBox<AxialMethod>( new EnumModel<AxialMethod>(component, "AxialMethod", AxialMethod.axialOffsetMethods ));
|
||||
panel.add(combo, "spanx 3, growx, wrap");
|
||||
panel2.add(combo, "spanx 3, growx, wrap");
|
||||
|
||||
//// plus
|
||||
panel.add(new JLabel(trans.get("ringcompcfg.plus")), "right");
|
||||
panel2.add(new JLabel(trans.get("ringcompcfg.plus")), "right");
|
||||
|
||||
//// PositionValue
|
||||
m = new DoubleModel(component, "AxialOffset", UnitGroup.UNITS_LENGTH);
|
||||
spin = new JSpinner(m.getSpinnerModel());
|
||||
spin.setEditor(new SpinnerEditor(spin));
|
||||
panel.add(spin, "growx");
|
||||
panel2.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"))),
|
||||
panel2.add(new UnitSelector(m), "growx");
|
||||
panel2.add(new BasicSlider(m.getSliderModel(
|
||||
new DoubleModel(component.getParent(), "Length", -1.0, UnitGroup.UNITS_NONE),
|
||||
new DoubleModel(component.getParent(), "Length"))),
|
||||
"w 100lp, wrap");
|
||||
|
||||
//// Material
|
||||
panel.add(materialPanel(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);
|
||||
@ -246,7 +260,7 @@ public class InnerTubeConfig extends RocketComponentConfig {
|
||||
|
||||
|
||||
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: An inner tube will not affect the aerodynamics of the rocket even if located outside the body tube.
|
||||
note.setText(trans.get("ringcompcfg.note.desc"));
|
||||
panel.add(note, "spanx, growx");
|
||||
|
||||
|
@ -290,7 +290,8 @@ public class SimulationEditDialog extends JDialog {
|
||||
@Override
|
||||
public void actionPerformed(ActionEvent e) {
|
||||
// If the simulation is out of date, run the simulation.
|
||||
if (simulationList[0].getStatus() != Simulation.Status.UPTODATE) {
|
||||
if (simulationList[0].getStatus() != Simulation.Status.UPTODATE &&
|
||||
simulationList[0].getStatus() != Simulation.Status.LOADED) {
|
||||
new SimulationRunDialog(SimulationEditDialog.this.parentWindow, document, simulationList[0]).setVisible(true);
|
||||
}
|
||||
|
||||
|
@ -38,6 +38,10 @@ public class SelectColorButton extends JButton {
|
||||
if (UIManager.getColor("Button.selectForeground") == null
|
||||
|| UIManager.getColor("Button.foreground") == null)
|
||||
return;
|
||||
|
||||
// Fixes the issue of the background of the button not being blue when selected on macOS
|
||||
putClientProperty("JButton.buttonType", "segmented-only");
|
||||
|
||||
addChangeListener(new ChangeListener() {
|
||||
@Override
|
||||
public void stateChanged(ChangeEvent e) {
|
||||
|
@ -64,6 +64,9 @@ public class SelectColorToggleButton extends JToggleButton {
|
||||
|| UIManager.getColor("ToggleButton.foreground") == null)
|
||||
return;
|
||||
|
||||
// Fixes the issue of the background of the button not being blue when selected on macOS
|
||||
putClientProperty("JButton.buttonType", "segmented-only");
|
||||
|
||||
// Case: frame goes out of focus
|
||||
addPropertyChangeListener("Frame.active", new PropertyChangeListener() {
|
||||
@Override
|
||||
|
Loading…
x
Reference in New Issue
Block a user