diff options
| author | Paul Buetow <paul@buetow.org> | 2008-05-22 18:54:45 +0000 |
|---|---|---|
| committer | Paul Buetow <paul@buetow.org> | 2008-05-22 18:54:45 +0000 |
| commit | 9d1923656dffb2110a600b2b3e8514c291736f62 (patch) | |
| tree | 29e2fb42b5e2e02155dbda1763794f62baa939fb | |
| parent | e008e166e795de282e245feda31ba9cca6de7c9a (diff) | |
Now using png icons
| -rw-r--r-- | icons/exit.gif | bin | 608 -> 0 bytes | |||
| -rw-r--r-- | icons/pause.gif | bin | 583 -> 0 bytes | |||
| -rw-r--r-- | icons/pause.png | bin | 0 -> 2467 bytes | |||
| -rw-r--r-- | icons/replay.gif | bin | 563 -> 0 bytes | |||
| -rw-r--r-- | icons/replay.png | bin | 0 -> 2467 bytes | |||
| -rw-r--r-- | icons/reset.gif | bin | 599 -> 0 bytes | |||
| -rw-r--r-- | icons/reset.png | bin | 0 -> 2467 bytes | |||
| -rw-r--r-- | icons/save.gif | bin | 1084 -> 0 bytes | |||
| -rw-r--r-- | icons/start.gif | bin | 553 -> 0 bytes | |||
| -rw-r--r-- | icons/start.png | bin | 0 -> 2467 bytes | |||
| -rw-r--r-- | sources/simulator/VSSimulatorFrame.java | 18 |
11 files changed, 14 insertions, 4 deletions
diff --git a/icons/exit.gif b/icons/exit.gif Binary files differdeleted file mode 100644 index 5ba0791..0000000 --- a/icons/exit.gif +++ /dev/null diff --git a/icons/pause.gif b/icons/pause.gif Binary files differdeleted file mode 100644 index 4cbcd2c..0000000 --- a/icons/pause.gif +++ /dev/null diff --git a/icons/pause.png b/icons/pause.png Binary files differnew file mode 100644 index 0000000..7976413 --- /dev/null +++ b/icons/pause.png diff --git a/icons/replay.gif b/icons/replay.gif Binary files differdeleted file mode 100644 index 1728ba4..0000000 --- a/icons/replay.gif +++ /dev/null diff --git a/icons/replay.png b/icons/replay.png Binary files differnew file mode 100644 index 0000000..416a3b3 --- /dev/null +++ b/icons/replay.png diff --git a/icons/reset.gif b/icons/reset.gif Binary files differdeleted file mode 100644 index b7dcd08..0000000 --- a/icons/reset.gif +++ /dev/null diff --git a/icons/reset.png b/icons/reset.png Binary files differnew file mode 100644 index 0000000..bca89e3 --- /dev/null +++ b/icons/reset.png diff --git a/icons/save.gif b/icons/save.gif Binary files differdeleted file mode 100644 index 50b34b7..0000000 --- a/icons/save.gif +++ /dev/null diff --git a/icons/start.gif b/icons/start.gif Binary files differdeleted file mode 100644 index 9e7da7c..0000000 --- a/icons/start.gif +++ /dev/null diff --git a/icons/start.png b/icons/start.png Binary files differnew file mode 100644 index 0000000..63f6798 --- /dev/null +++ b/icons/start.png diff --git a/sources/simulator/VSSimulatorFrame.java b/sources/simulator/VSSimulatorFrame.java index 15e1105..8483aaf 100644 --- a/sources/simulator/VSSimulatorFrame.java +++ b/sources/simulator/VSSimulatorFrame.java @@ -110,7 +110,7 @@ public class VSSimulatorFrame extends VSFrame implements ActionListener { resetItem.addActionListener(this); resetItem.setEnabled(false); menuSimulation.add(resetItem); - resetButton = new JButton(new ImageIcon("icons/reset.gif", prefs.getString("lang.reset"))); + resetButton = new JButton(getImageIcon("reset.png", prefs.getString("lang.reset"))); resetButton.addActionListener(this); toolBar.add(resetButton); @@ -122,7 +122,7 @@ public class VSSimulatorFrame extends VSFrame implements ActionListener { replayItem.addActionListener(this); replayItem.setEnabled(false); menuSimulation.add(replayItem); - replayButton = new JButton(new ImageIcon("icons/replay.gif", prefs.getString("lang.replay"))); + replayButton = new JButton(getImageIcon("replay.png", prefs.getString("lang.replay"))); replayButton.addActionListener(this); toolBar.add(replayButton); @@ -133,7 +133,7 @@ public class VSSimulatorFrame extends VSFrame implements ActionListener { pauseItem.addActionListener(this); menuSimulation.add(pauseItem); pauseItem.setEnabled(false); - pauseButton = new JButton(new ImageIcon("icons/pause.gif", prefs.getString("lang.pause"))); + pauseButton = new JButton(getImageIcon("pause.png", prefs.getString("lang.pause"))); pauseButton.addActionListener(this); toolBar.add(pauseButton); @@ -143,7 +143,7 @@ public class VSSimulatorFrame extends VSFrame implements ActionListener { ActionEvent.ALT_MASK)); startItem.addActionListener(this); menuSimulation.add(startItem); - startButton = new JButton(new ImageIcon("icons/start.gif", prefs.getString("lang.start"))); + startButton = new JButton(getImageIcon("start.png", prefs.getString("lang.start"))); startButton.addActionListener(this); toolBar.add(startButton); @@ -324,4 +324,14 @@ public class VSSimulatorFrame extends VSFrame implements ActionListener { public VSSimulation getCurrentSimulation() { return currentSimulation; } + + private ImageIcon getImageIcon(String name, String descr) { + java.net.URL imageURL = getClass().getResource("/icons/"+name); + + if (imageURL == null) + return new ImageIcon("icons/"+name, descr); + + + return new ImageIcon(imageURL, descr); + } } |
