expose as a singleton so we can .show() and .hide()

This commit is contained in:
jrandom
2004-08-23 21:27:23 +00:00
committed by zzz
parent 4f787ddb03
commit 0fe70b660a

View File

@ -34,7 +34,11 @@ public class SysTray implements SysTrayMenuListener {
private SysTrayMenu _sysTrayMenu = new SysTrayMenu(_sysTrayMenuIcon, "I2P Control");
private UrlLauncher _urlLauncher = new UrlLauncher();
private static SysTray _instance;
public static synchronized SysTray instance() { return _instance; }
public SysTray() {
_instance = this;
if (!_configFile.init("systray.config"))
_configFile.setProperty("browser", "default");
@ -49,6 +53,9 @@ public class SysTray implements SysTrayMenuListener {
new SysTray();
}
public void show() { _sysTrayMenu.showIcon(); }
public void hide() { _sysTrayMenu.hideIcon(); }
public void iconLeftClicked(SysTrayMenuEvent e) {}
public void iconLeftDoubleClicked(SysTrayMenuEvent e) {