import net.sf.openrocket.gui.components.UnitSelector;
import net.sf.openrocket.gui.plot.Axis;
import net.sf.openrocket.gui.plot.PlotConfiguration;
-import net.sf.openrocket.gui.plot.PlotPanel;
+import net.sf.openrocket.gui.plot.SimulationPlotPanel;
import net.sf.openrocket.rocketcomponent.Configuration;
import net.sf.openrocket.simulation.FlightData;
import net.sf.openrocket.simulation.FlightDataBranch;
import net.sf.openrocket.simulation.listeners.CSVSaveListener;
import net.sf.openrocket.unit.Unit;
import net.sf.openrocket.unit.UnitGroup;
+import net.sf.openrocket.util.Chars;
import net.sf.openrocket.util.GUIUtil;
import net.sf.openrocket.util.Icons;
import net.sf.openrocket.util.Prefs;
spin.setToolTipText(tip);
sub.add(spin,"w 65lp!");
- label = new JLabel("\u00b0 N");
+ label = new JLabel(Chars.DEGREE + " N");
label.setToolTipText(tip);
sub.add(label,"growx");
slider = new BasicSlider(m.getSliderModel(-90, 90));
button.setToolTipText("Reset the time step to its default value (" +
UnitGroup.UNITS_SHORT_TIME.toStringUnit(RK4Simulator.RECOMMENDED_TIME_STEP) +
").");
+ button.addActionListener(new ActionListener() {
+ @Override
+ public void actionPerformed(ActionEvent e) {
+ conditions.setTimeStep(RK4Simulator.RECOMMENDED_TIME_STEP);
+ }
+ });
// button.setToolTipText("<html>Reset the step value to its default:<br>" +
// "Time step " +
return noDataPanel();
}
-
- if (true)
- return new PlotPanel(simulation);
-
- JPanel panel = new JPanel(new MigLayout("fill"));
-
-
-
-
- JButton button = new JButton("test");
-
- button.addActionListener(new ActionListener() {
- @Override
- public void actionPerformed(ActionEvent e) {
- PlotConfiguration config = new PlotConfiguration();
- config.addPlotDataType(FlightDataBranch.TYPE_ALTITUDE);
- config.addPlotDataType(FlightDataBranch.TYPE_VELOCITY_Z);
- config.addPlotDataType(FlightDataBranch.TYPE_ACCELERATION_Z);
- config.addPlotDataType(FlightDataBranch.TYPE_ACCELERATION_TOTAL);
-
- config.setDomainAxisType(FlightDataBranch.TYPE_TIME);
-
- performPlot(config);
- }
- });
- panel.add(button);
-
- return panel;
+ return new SimulationPlotPanel(simulation);
}