summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authororbiter <mc@yacy.net>2014-09-08 00:21:29 +0200
committerorbiter <mc@yacy.net>2014-09-08 00:21:29 +0200
commit5b5635e187dc33177285ea5c958120b48d38fee5 (patch)
treeae968159a4274cffc36caa5f6aafc29c55d1c368
parentaa6cdc4ab5978ca1ac813903108e5a8a3d8cbafe (diff)
replaced font for boot tray icon with image and added some more images
for further tray icon displays
-rw-r--r--addon/progress_booting.pngbin0 -> 3097 bytes
-rw-r--r--addon/progress_peertopeer.pngbin0 -> 2194 bytes
-rw-r--r--addon/progress_search.pngbin0 -> 2866 bytes
-rw-r--r--addon/progress_shutdown.pngbin0 -> 3154 bytes
-rw-r--r--addon/searchicon.pngbin0 -> 3057 bytes
-rw-r--r--source/net/yacy/gui/Tray.java10
6 files changed, 4 insertions, 6 deletions
diff --git a/addon/progress_booting.png b/addon/progress_booting.png
new file mode 100644
index 000000000..8ea89b51e
--- /dev/null
+++ b/addon/progress_booting.png
Binary files differ
diff --git a/addon/progress_peertopeer.png b/addon/progress_peertopeer.png
new file mode 100644
index 000000000..c4de6aa58
--- /dev/null
+++ b/addon/progress_peertopeer.png
Binary files differ
diff --git a/addon/progress_search.png b/addon/progress_search.png
new file mode 100644
index 000000000..118c1c327
--- /dev/null
+++ b/addon/progress_search.png
Binary files differ
diff --git a/addon/progress_shutdown.png b/addon/progress_shutdown.png
new file mode 100644
index 000000000..79ec9c1bc
--- /dev/null
+++ b/addon/progress_shutdown.png
Binary files differ
diff --git a/addon/searchicon.png b/addon/searchicon.png
new file mode 100644
index 000000000..e9fde2fd3
--- /dev/null
+++ b/addon/searchicon.png
Binary files differ
diff --git a/source/net/yacy/gui/Tray.java b/source/net/yacy/gui/Tray.java
index 8dfefeb38..5d1e5b099 100644
--- a/source/net/yacy/gui/Tray.java
+++ b/source/net/yacy/gui/Tray.java
@@ -30,7 +30,6 @@ package net.yacy.gui;
import java.awt.Image;
import java.awt.image.BufferedImage;
import java.awt.Color;
-import java.awt.Font;
import java.awt.Graphics2D;
import java.awt.MenuItem;
import java.awt.PopupMenu;
@@ -77,6 +76,7 @@ public final class Tray {
if (SystemTray.isSupported()) {
final String iconPath = sb.getAppPath().toString() + "/addon/YaCy_TrayIcon.png".replace("/", File.separator);
final String progressPath = sb.getAppPath().toString() + "/addon/progressbar.png".replace("/", File.separator);
+ final String progressBootingPath = sb.getAppPath().toString() + "/addon/progress_booting.png".replace("/", File.separator);
ActionListener al = new ActionListener() {
@Override
public void actionPerformed(final ActionEvent e) {
@@ -84,13 +84,13 @@ public final class Tray {
}
};
this.trayIcon = ImageIO.read(new File(iconPath)); // 128x128
- Image progress_raw = ImageIO.read(new File(progressPath)); // 280x56
+ Image progress_raw = ImageIO.read(new File(progressPath)); // 149x56
+ Image progressBooting = ImageIO.read(new File(progressBootingPath)); // 128x28
BufferedImage progress = new BufferedImage(280, 56, BufferedImage.TYPE_INT_ARGB);
Graphics2D progressg = progress.createGraphics();
progressg.drawImage(progress_raw, 0, 0, null);
progressg.dispose();
this.progressIcons = new BufferedImage[4];
- Font font = new Font(Font.SANS_SERIF, Font.PLAIN, 30);
for (int i = 0; i < 4; i++) {
this.progressIcons[i] = new BufferedImage(128, 128, BufferedImage.TYPE_INT_ARGB);
Graphics2D h = this.progressIcons[i].createGraphics();
@@ -98,9 +98,7 @@ public final class Tray {
h.clearRect(0, 0, 128, 128);
h.drawImage(this.trayIcon, 0, 0, 128, 128 - progress.getHeight(), null);
h.drawImage(progress.getSubimage(i * 7, 0, 128, progress.getHeight() / 2), 0, 128 - progress.getHeight() / 2, null);
- h.setColor(Color.WHITE);
- h.setFont(font);
- h.drawString("booting...", 2, 128 - progress.getHeight() + 24);
+ h.drawImage(progressBooting, 0, 128 - progress.getHeight(), null);
h.dispose();
}
final PopupMenu menu = (menuEnabled) ? getPopupMenu() : null;