mirror of
https://github.com/Qortal/qortal.git
synced 2025-07-22 20:26:50 +00:00
add setTrayIcon function
This commit is contained in:
@@ -289,6 +289,25 @@ public class SysTray {
|
||||
this.trayIcon.setToolTip(text);
|
||||
}
|
||||
|
||||
public void setTrayIcon(int iconid) {
|
||||
if (trayIcon != null) {
|
||||
switch (iconid) {
|
||||
case 1:
|
||||
this.trayIcon.setImage(Gui.loadImage("icons/icon32c.png"));
|
||||
break;
|
||||
case 2:
|
||||
this.trayIcon.setImage(Gui.loadImage("icons/icon32m.png"));
|
||||
break;
|
||||
case 3:
|
||||
this.trayIcon.setImage(Gui.loadImage("icons/icon32n.png"));
|
||||
break;
|
||||
case 4:
|
||||
this.trayIcon.setImage(Gui.loadImage("icons/icon32.png"));
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public void dispose() {
|
||||
if (trayIcon != null)
|
||||
SystemTray.getSystemTray().remove(this.trayIcon);
|
||||
|
Reference in New Issue
Block a user