|
@@ -138,27 +138,22 @@ public class TimePanel extends JPanel {
|
|
|
playBtn.setContentAreaFilled(false);
|
|
|
playBtn.setBorderPainted(false);
|
|
|
playBtn.setBorder(null);
|
|
|
- //playBtn.setIcon(new ImageIcon(new ImageIcon(this.getClass().getResource("/Button_Images/play.png")).getImage()
|
|
|
- // .getScaledInstance(30, 30, Image.SCALE_SMOOTH)));//TODO:Fix here
|
|
|
- playBtn.setIcon(new ImageIcon(Util.loadImage(this, "/Button_Images/play.png",30,30, Image.SCALE_SMOOTH)));
|
|
|
+ playBtn.setIcon(new ImageIcon(Util.loadImage(this, "/Button_Images/play.png",30,30)));
|
|
|
playBtn.addActionListener(new ActionListener() {
|
|
|
@Override
|
|
|
public void actionPerformed(ActionEvent e) {
|
|
|
running = !running;
|
|
|
+ playBtn.setIcon(new ImageIcon(Util.loadImage(this,"/Button_Images/pause.png",30,30)));//relocated this here. as it was duplicate before.
|
|
|
if (running) {
|
|
|
if (!model.getIsSimRunning()) {
|
|
|
controller.setIsSimRunning(true);
|
|
|
}
|
|
|
timer.start();
|
|
|
timer.setDelay(model.getTimerSpeed());
|
|
|
- //playBtn.setIcon(new ImageIcon(new ImageIcon(this.getClass().getResource("/Button_Images/pause.png"))
|
|
|
- // .getImage().getScaledInstance(30, 30, Image.SCALE_SMOOTH)));//TODO: Soon...
|
|
|
- playBtn.setIcon(new ImageIcon(Util.loadImage(this,"/Button_Images/pause.png",30,30,Image.SCALE_SMOOTH)));
|
|
|
+ //playBtn.setIcon(new ImageIcon(Util.loadImage(this,"/Button_Images/pause.png",30,30)));
|
|
|
} else {
|
|
|
timer.stop();
|
|
|
- //playBtn.setIcon(new ImageIcon(new ImageIcon(this.getClass().getResource("/Button_Images/play.png"))
|
|
|
- // .getImage().getScaledInstance(30, 30, Image.SCALE_SMOOTH)));//TODO: this is the exact same as above. why
|
|
|
- playBtn.setIcon(new ImageIcon(Util.loadImage(this,"/Button_Images/pause.png",30,30,Image.SCALE_SMOOTH)));
|
|
|
+ //playBtn.setIcon(new ImageIcon(Util.loadImage(this,"/Button_Images/pause.png",30,30)));
|
|
|
}
|
|
|
}
|
|
|
});
|
|
@@ -166,9 +161,7 @@ public class TimePanel extends JPanel {
|
|
|
|
|
|
timeResetBtn.setContentAreaFilled(false);
|
|
|
timeResetBtn.setBorder(null);
|
|
|
- //timeResetBtn.setIcon(new ImageIcon(new ImageIcon(this.getClass().getResource("/Button_Images/reset.png"))
|
|
|
- // .getImage().getScaledInstance(30, 30, Image.SCALE_SMOOTH)));//TODO: fix here
|
|
|
- timeResetBtn.setIcon(new ImageIcon(Util.loadImage(this, "/Button_Images/reset.png", 30, 30, Image.SCALE_SMOOTH)));
|
|
|
+ timeResetBtn.setIcon(new ImageIcon(Util.loadImage(this, "/Button_Images/reset.png", 30, 30)));
|
|
|
timeResetBtn.addActionListener(new ActionListener() {
|
|
|
public void actionPerformed(ActionEvent ae) {
|
|
|
timeSlider.setValue(timeSlider.getMinimum());
|
|
@@ -184,9 +177,7 @@ public class TimePanel extends JPanel {
|
|
|
|
|
|
timeForwardBtn.setContentAreaFilled(false);
|
|
|
timeForwardBtn.setBorder(null);
|
|
|
- //timeForwardBtn.setIcon(new ImageIcon(new ImageIcon(this.getClass().getResource("/Button_Images/forward.png"))
|
|
|
- // .getImage().getScaledInstance(30, 30, Image.SCALE_SMOOTH)));//TODO: fix here
|
|
|
- timeForwardBtn.setIcon(new ImageIcon(Util.loadImage(this,"/Button_Images/forward.png",30,30,Image.SCALE_SMOOTH)));//TODO: fix here
|
|
|
+ timeForwardBtn.setIcon(new ImageIcon(Util.loadImage(this,"/Button_Images/forward.png",30,30)));
|
|
|
timeForwardBtn.addActionListener(new ActionListener() {
|
|
|
public void actionPerformed(ActionEvent ae) {
|
|
|
if (!model.getIsSimRunning()) {
|
|
@@ -199,9 +190,7 @@ public class TimePanel extends JPanel {
|
|
|
timeBackwardBtn.setToolTipText(Languages.getLanguage()[92]);
|
|
|
|
|
|
timeBackwardBtn.setBorder(null);
|
|
|
- //timeBackwardBtn.setIcon(new ImageIcon(new ImageIcon(this.getClass().getResource("/Button_Images/backward.png"))
|
|
|
- // .getImage().getScaledInstance(30, 30, Image.SCALE_SMOOTH)));//TODO: fix here
|
|
|
- timeBackwardBtn.setIcon(new ImageIcon(Util.loadImage(this, "/Button_Images/backward.png", 30,30, Image.SCALE_SMOOTH)));
|
|
|
+ timeBackwardBtn.setIcon(new ImageIcon(Util.loadImage(this, "/Button_Images/backward.png", 30,30)));
|
|
|
timeBackwardBtn.addActionListener(new ActionListener() {
|
|
|
public void actionPerformed(ActionEvent ae) {
|
|
|
timeSlider.setValue(timeSlider.getValue() - 1);
|