Package net.i2p.desktopgui
Class TrayManager
java.lang.Object
net.i2p.desktopgui.TrayManager
- Direct Known Subclasses:
ExternalTrayManager
,InternalTrayManager
Manages the tray icon life.
-
Field Summary
Modifier and TypeFieldDescriptionprotected final I2PAppContext
protected boolean
protected final boolean
protected static final String
protected SystemTray
protected TrayIcon
-
Constructor Summary
ModifierConstructorDescriptionprotected
TrayManager
(I2PAppContext ctx, boolean useSwing) Instantiate tray manager. -
Method Summary
Modifier and TypeMethodDescriptionprotected String
protected String
int
displayMessage
(int priority, String title, String message, String path) Send a notification to the user.protected abstract PopupMenu
Build a popup menu, adding callbacks to the different items.protected abstract JPopupMenu
Build a popup menu, adding callbacks to the different items.void
void
Add the tray icon to the system tray and start everything up.void
Remove the tray icon from the system trayprotected abstract void
Update the menu
-
Field Details
-
_appContext
-
_useSwing
protected final boolean _useSwing -
tray
-
trayIcon
-
_showNotifications
protected volatile boolean _showNotifications -
PROP_NOTIFICATIONS
- See Also:
-
-
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
-
displayMessage
Send a notification to the user.- Parameters:
title
- for the popup, translatedmessage
- translatedpath
- unsupported- Returns:
- 0, or -1 on failure
-
_t
-
_t
- Since:
- 0.9.26
-