|
@@ -49,7 +49,7 @@ public class TimePanel extends JPanel {
|
|
public void actionPerformed(ActionEvent ae) {
|
|
public void actionPerformed(ActionEvent ae) {
|
|
timeSlider.setValue(timeSlider.getValue() + 1);
|
|
timeSlider.setValue(timeSlider.getValue() + 1);
|
|
controller.setCurIteration(timeSlider.getValue());
|
|
controller.setCurIteration(timeSlider.getValue());
|
|
- if (timeSlider.getValue() == model.getIterations()-1) {
|
|
|
|
|
|
+ if (timeSlider.getValue() == model.getIterations() - 1) {
|
|
running = false;
|
|
running = false;
|
|
playBtn.setIcon(new ImageIcon(new ImageIcon(this.getClass().getResource("/Button_Images/play.png"))
|
|
playBtn.setIcon(new ImageIcon(new ImageIcon(this.getClass().getResource("/Button_Images/play.png"))
|
|
.getImage().getScaledInstance(30, 30, Image.SCALE_SMOOTH)));
|
|
.getImage().getScaledInstance(30, 30, Image.SCALE_SMOOTH)));
|
|
@@ -67,7 +67,7 @@ public class TimePanel extends JPanel {
|
|
timeSlider.setMinorTickSpacing(1);
|
|
timeSlider.setMinorTickSpacing(1);
|
|
timeSlider.setMajorTickSpacing(5);
|
|
timeSlider.setMajorTickSpacing(5);
|
|
timeSlider.setToolTipText("Time Slider");
|
|
timeSlider.setToolTipText("Time Slider");
|
|
- timeSlider.setMaximum(model.getIterations()-1);
|
|
|
|
|
|
+ timeSlider.setMaximum(model.getIterations() - 1);
|
|
timeSlider.setValue(0);
|
|
timeSlider.setValue(0);
|
|
timeSlider.setBackground(Color.WHITE);
|
|
timeSlider.setBackground(Color.WHITE);
|
|
timeSlider.addChangeListener(new ChangeListener() {
|
|
timeSlider.addChangeListener(new ChangeListener() {
|
|
@@ -80,9 +80,9 @@ public class TimePanel extends JPanel {
|
|
// Panel
|
|
// Panel
|
|
timeBtnPanel.setBorder(null);
|
|
timeBtnPanel.setBorder(null);
|
|
timeBtnPanel.setBackground(Color.WHITE);
|
|
timeBtnPanel.setBackground(Color.WHITE);
|
|
|
|
+ timeBtnPanel.setLayout(new FlowLayout(FlowLayout.CENTER, 0, 0));
|
|
|
|
|
|
// Buttons
|
|
// Buttons
|
|
- timeBtnPanel.setLayout(new FlowLayout(FlowLayout.CENTER, 0, 0));
|
|
|
|
playBtn.setToolTipText("Play");
|
|
playBtn.setToolTipText("Play");
|
|
|
|
|
|
playBtn.setBackground(Color.WHITE);
|
|
playBtn.setBackground(Color.WHITE);
|