summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPaul Buetow <paul@buetow.org>2008-05-22 18:54:45 +0000
committerPaul Buetow <paul@buetow.org>2008-05-22 18:54:45 +0000
commit9d1923656dffb2110a600b2b3e8514c291736f62 (patch)
tree29e2fb42b5e2e02155dbda1763794f62baa939fb
parente008e166e795de282e245feda31ba9cca6de7c9a (diff)
Now using png icons
-rw-r--r--icons/exit.gifbin608 -> 0 bytes
-rw-r--r--icons/pause.gifbin583 -> 0 bytes
-rw-r--r--icons/pause.pngbin0 -> 2467 bytes
-rw-r--r--icons/replay.gifbin563 -> 0 bytes
-rw-r--r--icons/replay.pngbin0 -> 2467 bytes
-rw-r--r--icons/reset.gifbin599 -> 0 bytes
-rw-r--r--icons/reset.pngbin0 -> 2467 bytes
-rw-r--r--icons/save.gifbin1084 -> 0 bytes
-rw-r--r--icons/start.gifbin553 -> 0 bytes
-rw-r--r--icons/start.pngbin0 -> 2467 bytes
-rw-r--r--sources/simulator/VSSimulatorFrame.java18
11 files changed, 14 insertions, 4 deletions
diff --git a/icons/exit.gif b/icons/exit.gif
deleted file mode 100644
index 5ba0791..0000000
--- a/icons/exit.gif
+++ /dev/null
Binary files differ
diff --git a/icons/pause.gif b/icons/pause.gif
deleted file mode 100644
index 4cbcd2c..0000000
--- a/icons/pause.gif
+++ /dev/null
Binary files differ
diff --git a/icons/pause.png b/icons/pause.png
new file mode 100644
index 0000000..7976413
--- /dev/null
+++ b/icons/pause.png
Binary files differ
diff --git a/icons/replay.gif b/icons/replay.gif
deleted file mode 100644
index 1728ba4..0000000
--- a/icons/replay.gif
+++ /dev/null
Binary files differ
diff --git a/icons/replay.png b/icons/replay.png
new file mode 100644
index 0000000..416a3b3
--- /dev/null
+++ b/icons/replay.png
Binary files differ
diff --git a/icons/reset.gif b/icons/reset.gif
deleted file mode 100644
index b7dcd08..0000000
--- a/icons/reset.gif
+++ /dev/null
Binary files differ
diff --git a/icons/reset.png b/icons/reset.png
new file mode 100644
index 0000000..bca89e3
--- /dev/null
+++ b/icons/reset.png
Binary files differ
diff --git a/icons/save.gif b/icons/save.gif
deleted file mode 100644
index 50b34b7..0000000
--- a/icons/save.gif
+++ /dev/null
Binary files differ
diff --git a/icons/start.gif b/icons/start.gif
deleted file mode 100644
index 9e7da7c..0000000
--- a/icons/start.gif
+++ /dev/null
Binary files differ
diff --git a/icons/start.png b/icons/start.png
new file mode 100644
index 0000000..63f6798
--- /dev/null
+++ b/icons/start.png
Binary files differ
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);
+ }
}