Adjusted alignment of time step controls.
This commit is contained in:
parent
7d95a36907
commit
1f84c89006
@ -34,7 +34,7 @@ public class SimulationPreferencesPanel extends PreferencesPanel {
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
public SimulationPreferencesPanel() {
|
public SimulationPreferencesPanel() {
|
||||||
super(new MigLayout("fillx, ins 30lp n n n"));
|
super(new MigLayout("fill"));
|
||||||
|
|
||||||
// Confirm deletion of simulations:
|
// Confirm deletion of simulations:
|
||||||
final JCheckBox confirmDelete = new JCheckBox(
|
final JCheckBox confirmDelete = new JCheckBox(
|
||||||
@ -73,8 +73,7 @@ public class SimulationPreferencesPanel extends PreferencesPanel {
|
|||||||
BasicSlider slider;
|
BasicSlider slider;
|
||||||
|
|
||||||
// // Simulation options
|
// // Simulation options
|
||||||
sub = new JPanel(new MigLayout("fill, gap rel unrel",
|
sub = new JPanel(new MigLayout("fill"));
|
||||||
"[grow][65lp!][30lp!][75lp!]", ""));
|
|
||||||
// // Simulator options
|
// // Simulator options
|
||||||
sub.setBorder(BorderFactory.createTitledBorder(trans
|
sub.setBorder(BorderFactory.createTitledBorder(trans
|
||||||
.get("simedtdlg.border.Simopt")));
|
.get("simedtdlg.border.Simopt")));
|
||||||
@ -82,7 +81,7 @@ public class SimulationPreferencesPanel extends PreferencesPanel {
|
|||||||
|
|
||||||
// Separate panel for computation methods, as they use a different
|
// Separate panel for computation methods, as they use a different
|
||||||
// layout
|
// layout
|
||||||
subsub = new JPanel(new MigLayout("insets 0, fill"));
|
subsub = new JPanel(new MigLayout("insets 0, fill", "[grow][min!][min!][]"));
|
||||||
|
|
||||||
// // Calculation method:
|
// // Calculation method:
|
||||||
tip = trans.get("simedtdlg.lbl.ttip.Calcmethod");
|
tip = trans.get("simedtdlg.lbl.ttip.Calcmethod");
|
||||||
@ -93,7 +92,7 @@ public class SimulationPreferencesPanel extends PreferencesPanel {
|
|||||||
// // Extended Barrowman
|
// // Extended Barrowman
|
||||||
label = new JLabel(trans.get("simedtdlg.lbl.ExtBarrowman"));
|
label = new JLabel(trans.get("simedtdlg.lbl.ExtBarrowman"));
|
||||||
label.setToolTipText(tip);
|
label.setToolTipText(tip);
|
||||||
subsub.add(label, "growx, wrap para");
|
subsub.add(label, "growx, span 3, wrap");
|
||||||
|
|
||||||
// Simulation method
|
// Simulation method
|
||||||
tip = trans.get("simedtdlg.lbl.ttip.Simmethod1")
|
tip = trans.get("simedtdlg.lbl.ttip.Simmethod1")
|
||||||
@ -104,7 +103,7 @@ public class SimulationPreferencesPanel extends PreferencesPanel {
|
|||||||
|
|
||||||
label = new JLabel("6-DOF Runge-Kutta 4");
|
label = new JLabel("6-DOF Runge-Kutta 4");
|
||||||
label.setToolTipText(tip);
|
label.setToolTipText(tip);
|
||||||
subsub.add(label, "growx, wrap para");
|
subsub.add(label, "growx, span 3, wrap");
|
||||||
|
|
||||||
// // Geodetic calculation method:
|
// // Geodetic calculation method:
|
||||||
label = new JLabel(trans.get("simedtdlg.lbl.GeodeticMethod"));
|
label = new JLabel(trans.get("simedtdlg.lbl.GeodeticMethod"));
|
||||||
@ -124,9 +123,8 @@ public class SimulationPreferencesPanel extends PreferencesPanel {
|
|||||||
};
|
};
|
||||||
gcsCombo.addActionListener(gcsTTipListener);
|
gcsCombo.addActionListener(gcsTTipListener);
|
||||||
gcsTTipListener.actionPerformed(null);
|
gcsTTipListener.actionPerformed(null);
|
||||||
subsub.add(gcsCombo, "growx, wrap para");
|
subsub.add(gcsCombo, "span 3, wrap");
|
||||||
|
|
||||||
sub.add(subsub, "spanx, wrap para");
|
|
||||||
|
|
||||||
// // Time step:
|
// // Time step:
|
||||||
label = new JLabel(trans.get("simedtdlg.lbl.Timestep"));
|
label = new JLabel(trans.get("simedtdlg.lbl.Timestep"));
|
||||||
@ -137,7 +135,7 @@ public class SimulationPreferencesPanel extends PreferencesPanel {
|
|||||||
.toStringUnit(RK4SimulationStepper.RECOMMENDED_TIME_STEP)
|
.toStringUnit(RK4SimulationStepper.RECOMMENDED_TIME_STEP)
|
||||||
+ ".";
|
+ ".";
|
||||||
label.setToolTipText(tip);
|
label.setToolTipText(tip);
|
||||||
sub.add(label);
|
subsub.add(label, "gapright para");
|
||||||
|
|
||||||
m = new DoubleModel(preferences, "TimeStep", UnitGroup.UNITS_TIME_STEP,
|
m = new DoubleModel(preferences, "TimeStep", UnitGroup.UNITS_TIME_STEP,
|
||||||
0, 1);
|
0, 1);
|
||||||
@ -145,21 +143,20 @@ public class SimulationPreferencesPanel extends PreferencesPanel {
|
|||||||
spin = new JSpinner(m.getSpinnerModel());
|
spin = new JSpinner(m.getSpinnerModel());
|
||||||
spin.setEditor(new SpinnerEditor(spin));
|
spin.setEditor(new SpinnerEditor(spin));
|
||||||
spin.setToolTipText(tip);
|
spin.setToolTipText(tip);
|
||||||
sub.add(spin, "w 65lp!");
|
subsub.add(spin, "");
|
||||||
// sub.add(spin, "nogrid");
|
|
||||||
|
|
||||||
unit = new UnitSelector(m);
|
unit = new UnitSelector(m);
|
||||||
unit.setToolTipText(tip);
|
unit.setToolTipText(tip);
|
||||||
sub.add(unit, "w 25");
|
subsub.add(unit, "");
|
||||||
// sub.add(unit, "nogrid");
|
|
||||||
slider = new BasicSlider(m.getSliderModel(0, 0.2));
|
slider = new BasicSlider(m.getSliderModel(0, 0.2));
|
||||||
slider.setToolTipText(tip);
|
slider.setToolTipText(tip);
|
||||||
sub.add(slider, "w 75lp, wrap");
|
subsub.add(slider, "w 100");
|
||||||
// sub.add(slider,"wrap");
|
|
||||||
|
|
||||||
// // Reset to default button
|
sub.add(subsub, "spanx, wrap para");
|
||||||
|
|
||||||
|
// Reset to default button
|
||||||
JButton button = new JButton(trans.get("simedtdlg.but.resettodefault"));
|
JButton button = new JButton(trans.get("simedtdlg.but.resettodefault"));
|
||||||
// // Reset the time step to its default value (
|
// Reset the time step to its default value (
|
||||||
button.setToolTipText(trans.get("simedtdlg.but.ttip.resettodefault")
|
button.setToolTipText(trans.get("simedtdlg.but.ttip.resettodefault")
|
||||||
+ UnitGroup.UNITS_SHORT_TIME
|
+ UnitGroup.UNITS_SHORT_TIME
|
||||||
.toStringUnit(RK4SimulationStepper.RECOMMENDED_TIME_STEP)
|
.toStringUnit(RK4SimulationStepper.RECOMMENDED_TIME_STEP)
|
||||||
|
@ -67,7 +67,7 @@ class SimulationOptionsPanel extends JPanel {
|
|||||||
|
|
||||||
// Separate panel for computation methods, as they use a different
|
// Separate panel for computation methods, as they use a different
|
||||||
// layout
|
// layout
|
||||||
subsub = new JPanel(new MigLayout("insets 0, fill"));
|
subsub = new JPanel(new MigLayout("insets 0, fill", "[grow][min!][min!][]"));
|
||||||
|
|
||||||
// // Calculation method:
|
// // Calculation method:
|
||||||
tip = trans.get("simedtdlg.lbl.ttip.Calcmethod");
|
tip = trans.get("simedtdlg.lbl.ttip.Calcmethod");
|
||||||
@ -78,7 +78,7 @@ class SimulationOptionsPanel extends JPanel {
|
|||||||
// // Extended Barrowman
|
// // Extended Barrowman
|
||||||
label = new JLabel(trans.get("simedtdlg.lbl.ExtBarrowman"));
|
label = new JLabel(trans.get("simedtdlg.lbl.ExtBarrowman"));
|
||||||
label.setToolTipText(tip);
|
label.setToolTipText(tip);
|
||||||
subsub.add(label, "growx, wrap para");
|
subsub.add(label, "growx, span 3, wrap");
|
||||||
|
|
||||||
// Simulation method
|
// Simulation method
|
||||||
tip = trans.get("simedtdlg.lbl.ttip.Simmethod1")
|
tip = trans.get("simedtdlg.lbl.ttip.Simmethod1")
|
||||||
@ -89,7 +89,7 @@ class SimulationOptionsPanel extends JPanel {
|
|||||||
|
|
||||||
label = new JLabel("6-DOF Runge-Kutta 4");
|
label = new JLabel("6-DOF Runge-Kutta 4");
|
||||||
label.setToolTipText(tip);
|
label.setToolTipText(tip);
|
||||||
subsub.add(label, "growx, wrap para");
|
subsub.add(label, "growx, span 3, wrap");
|
||||||
|
|
||||||
// // Geodetic calculation method:
|
// // Geodetic calculation method:
|
||||||
label = new JLabel(trans.get("simedtdlg.lbl.GeodeticMethod"));
|
label = new JLabel(trans.get("simedtdlg.lbl.GeodeticMethod"));
|
||||||
@ -109,10 +109,9 @@ class SimulationOptionsPanel extends JPanel {
|
|||||||
};
|
};
|
||||||
gcsCombo.addActionListener(gcsTTipListener);
|
gcsCombo.addActionListener(gcsTTipListener);
|
||||||
gcsTTipListener.actionPerformed(null);
|
gcsTTipListener.actionPerformed(null);
|
||||||
subsub.add(gcsCombo, "growx, wrap para");
|
subsub.add(gcsCombo, "span 3, wrap para");
|
||||||
|
|
||||||
sub.add(subsub, "spanx, wrap para");
|
|
||||||
|
|
||||||
|
|
||||||
// // Time step:
|
// // Time step:
|
||||||
label = new JLabel(trans.get("simedtdlg.lbl.Timestep"));
|
label = new JLabel(trans.get("simedtdlg.lbl.Timestep"));
|
||||||
tip = trans.get("simedtdlg.lbl.ttip.Timestep1")
|
tip = trans.get("simedtdlg.lbl.ttip.Timestep1")
|
||||||
@ -122,7 +121,7 @@ class SimulationOptionsPanel extends JPanel {
|
|||||||
.toStringUnit(RK4SimulationStepper.RECOMMENDED_TIME_STEP)
|
.toStringUnit(RK4SimulationStepper.RECOMMENDED_TIME_STEP)
|
||||||
+ ".";
|
+ ".";
|
||||||
label.setToolTipText(tip);
|
label.setToolTipText(tip);
|
||||||
sub.add(label);
|
subsub.add(label,"gapright para");
|
||||||
|
|
||||||
m = new DoubleModel(conditions, "TimeStep", UnitGroup.UNITS_TIME_STEP,
|
m = new DoubleModel(conditions, "TimeStep", UnitGroup.UNITS_TIME_STEP,
|
||||||
0, 1);
|
0, 1);
|
||||||
@ -130,21 +129,20 @@ class SimulationOptionsPanel extends JPanel {
|
|||||||
spin = new JSpinner(m.getSpinnerModel());
|
spin = new JSpinner(m.getSpinnerModel());
|
||||||
spin.setEditor(new SpinnerEditor(spin));
|
spin.setEditor(new SpinnerEditor(spin));
|
||||||
spin.setToolTipText(tip);
|
spin.setToolTipText(tip);
|
||||||
sub.add(spin, "w 65lp!");
|
subsub.add(spin, "");
|
||||||
// sub.add(spin, "nogrid");
|
|
||||||
|
|
||||||
unit = new UnitSelector(m);
|
unit = new UnitSelector(m);
|
||||||
unit.setToolTipText(tip);
|
unit.setToolTipText(tip);
|
||||||
sub.add(unit, "w 25");
|
subsub.add(unit, "");
|
||||||
// sub.add(unit, "nogrid");
|
|
||||||
slider = new BasicSlider(m.getSliderModel(0, 0.2));
|
slider = new BasicSlider(m.getSliderModel(0, 0.2));
|
||||||
slider.setToolTipText(tip);
|
slider.setToolTipText(tip);
|
||||||
sub.add(slider, "w 75lp, wrap");
|
subsub.add(slider, "w 100");
|
||||||
// sub.add(slider,"wrap");
|
|
||||||
|
|
||||||
// // Reset to default button
|
sub.add(subsub, "spanx, wrap para");
|
||||||
|
|
||||||
|
// Reset to default button
|
||||||
JButton button = new JButton(trans.get("simedtdlg.but.resettodefault"));
|
JButton button = new JButton(trans.get("simedtdlg.but.resettodefault"));
|
||||||
// // Reset the time step to its default value (
|
// Reset the time step to its default value (
|
||||||
button.setToolTipText(trans.get("simedtdlg.but.ttip.resettodefault")
|
button.setToolTipText(trans.get("simedtdlg.but.ttip.resettodefault")
|
||||||
+ UnitGroup.UNITS_SHORT_TIME
|
+ UnitGroup.UNITS_SHORT_TIME
|
||||||
.toStringUnit(RK4SimulationStepper.RECOMMENDED_TIME_STEP)
|
.toStringUnit(RK4SimulationStepper.RECOMMENDED_TIME_STEP)
|
||||||
@ -164,15 +162,15 @@ class SimulationOptionsPanel extends JPanel {
|
|||||||
|
|
||||||
sub.add(button, "align left");
|
sub.add(button, "align left");
|
||||||
|
|
||||||
// // Simulation listeners
|
// Simulation listeners
|
||||||
sub = new JPanel(new MigLayout("fill, gap 0 0"));
|
sub = new JPanel(new MigLayout("fill, gap 0 0"));
|
||||||
// // Simulator listeners
|
// Simulator listeners
|
||||||
sub.setBorder(BorderFactory.createTitledBorder(trans
|
sub.setBorder(BorderFactory.createTitledBorder(trans
|
||||||
.get("simedtdlg.border.Simlist")));
|
.get("simedtdlg.border.Simlist")));
|
||||||
this.add(sub, "growx, growy");
|
this.add(sub, "growx, growy");
|
||||||
|
|
||||||
DescriptionArea desc = new DescriptionArea(5);
|
DescriptionArea desc = new DescriptionArea(5);
|
||||||
// // <html><i>Simulation listeners</i> is an advanced feature that
|
// <html><i>Simulation listeners</i> is an advanced feature that
|
||||||
// allows user-written code to listen to and interact with the
|
// allows user-written code to listen to and interact with the
|
||||||
// simulation.
|
// simulation.
|
||||||
// // For details on writing simulation listeners, see the OpenRocket
|
// // For details on writing simulation listeners, see the OpenRocket
|
||||||
|
Loading…
x
Reference in New Issue
Block a user