Package net.i2p.desktopgui
Class TrayManager
java.lang.Object
net.i2p.desktopgui.TrayManager
- Direct Known Subclasses:
ExternalTrayManager
,InternalTrayManager
abstract class TrayManager extends Object
Manages the tray icon life.
-
Field Summary
Fields Modifier and Type Field Description protected I2PAppContext
_appContext
protected Main
_main
protected boolean
_useSwing
protected SystemTray
tray
protected TrayIcon
trayIcon
-
Constructor Summary
Constructors Modifier Constructor Description protected
TrayManager(I2PAppContext ctx, Main main, boolean useSwing)
Instantiate tray manager. -
Method Summary
Modifier and Type Method Description protected String
_t(String s)
protected String
_t(String s, Object o)
protected abstract PopupMenu
getMainMenu()
Build a popup menu, adding callbacks to the different items.protected abstract JPopupMenu
getSwingMainMenu()
Build a popup menu, adding callbacks to the different items.void
languageChanged()
void
startManager()
Add the tray icon to the system tray and start everything up.void
stopManager()
Remove the tray icon from the system trayprotected abstract void
updateMenu()
Update the menu
-
Field Details
-
_appContext
-
_main
-
_useSwing
protected final boolean _useSwing -
tray
-
trayIcon
-
-
Constructor Details
-
TrayManager
Instantiate tray manager.
-
-
Method Details
-
startManager
Add the tray icon to the system tray and start everything up.- Throws:
AWTException
-
stopManager
public void stopManager()Remove the tray icon from the system tray- Since:
- 0.9.26
-
languageChanged
public void languageChanged() -
getMainMenu
Build a popup menu, adding callbacks to the different items.- Returns:
- popup menu
-
getSwingMainMenu
Build a popup menu, adding callbacks to the different items.- Returns:
- popup menu
- Since:
- 0.9.26
-
updateMenu
protected abstract void updateMenu()Update the menu- Since:
- 0.9.26
-
_t
-
_t
- Since:
- 0.9.26
-