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
FieldsModifier and TypeFieldDescriptionprotected final I2PAppContextprotected booleanprotected final booleanprotected static final Stringprotected SystemTrayprotected TrayIcon -
Constructor Summary
ConstructorsModifierConstructorDescriptionprotectedTrayManager(I2PAppContext ctx, boolean useSwing) Instantiate tray manager. -
Method Summary
Modifier and TypeMethodDescriptionprotected Stringprotected StringintdisplayMessage(int priority, String title, String message, String path) Send a notification to the user.protected abstract PopupMenuBuild a popup menu, adding callbacks to the different items.protected abstract JPopupMenuBuild a popup menu, adding callbacks to the different items.voidvoidAdd the tray icon to the system tray and start everything up.voidRemove the tray icon from the system trayprotected abstract voidUpdate 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
-