Commit 487c457b authored by Julian Zobel's avatar Julian Zobel
Browse files

Increased the range of the simulation skew slider

parent c7688bc1
......@@ -166,10 +166,10 @@ public class SimControlPanel extends JMenuBar implements ActionListener, ChangeL
}
protected JSlider getSpeedSlider() {
if (speedslider == null) {
speedslider = new JSlider(SwingConstants.HORIZONTAL, 1, 30, 5);
speedslider.addChangeListener(this);
// speedslider.setValue(speedslider.getMaximum());
if (speedslider == null) {
int simskew = (int)Simulator.getScheduler().getTimeSkew() + 4;
speedslider = new JSlider(SwingConstants.HORIZONTAL, 1, 50, simskew);
speedslider.addChangeListener(this);
}
return speedslider;
}
......@@ -223,7 +223,7 @@ public class SimControlPanel extends JMenuBar implements ActionListener, ChangeL
protected JLabel getSpeedLabel() {
if (speedlabel == null) {
speedlabel = new JLabel("max");
speedlabel = new JLabel(Simulator.getScheduler().getTimeSkew() + "x");
}
return speedlabel;
}
......@@ -275,7 +275,7 @@ public class SimControlPanel extends JMenuBar implements ActionListener, ChangeL
}
protected void changeSimulationSkew(double skew) {
if (skew == 30) {
if (skew == 50) {
getSpeedLabel().setText("max");
Simulator.getScheduler().setTimeSkew(0);
} else {
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment