mirror of
https://github.com/Qortal/qortal.git
synced 2025-06-02 06:26:59 +00:00
add setTrayIcon function
This commit is contained in:
parent
ceb3969c8b
commit
a78ff08202
@ -289,6 +289,25 @@ public class SysTray {
|
|||||||
this.trayIcon.setToolTip(text);
|
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() {
|
public void dispose() {
|
||||||
if (trayIcon != null)
|
if (trayIcon != null)
|
||||||
SystemTray.getSystemTray().remove(this.trayIcon);
|
SystemTray.getSystemTray().remove(this.trayIcon);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user