abstract class TrayManager extends Object
| Modifier and Type | Field and Description |
|---|---|
protected I2PAppContext |
_appContext |
protected JMenuItem |
_jnotificationItem1 |
protected JMenuItem |
_jnotificationItem2 |
protected MenuItem |
_notificationItem1 |
protected MenuItem |
_notificationItem2 |
protected boolean |
_showNotifications |
protected boolean |
_useSwing |
protected static String |
PROP_NOTIFICATIONS |
protected SystemTray |
tray |
protected TrayIcon |
trayIcon |
| Modifier | Constructor and Description |
|---|---|
protected |
TrayManager(I2PAppContext ctx,
boolean useSwing)
Instantiate tray manager.
|
| Modifier and Type | Method and Description |
|---|---|
protected String |
_t(String s) |
protected String |
_t(String s,
Object o) |
protected void |
configureNotifications(boolean enable)
Does not save.
|
int |
displayMessage(int priority,
String title,
String message,
String path)
Send a notification to the user.
|
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.
|
protected void |
initializeJNotificationItems()
Initializes _jnotificationItem 1 and 2
|
protected void |
initializeNotificationItems()
Initializes _notificationItem 1 and 2
|
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 tray
|
protected abstract void |
updateMenu()
Update the menu
|
protected final I2PAppContext _appContext
protected JMenuItem _jnotificationItem1
protected JMenuItem _jnotificationItem2
protected MenuItem _notificationItem1
protected MenuItem _notificationItem2
protected volatile boolean _showNotifications
protected final boolean _useSwing
protected static final String PROP_NOTIFICATIONS
protected SystemTray tray
protected TrayIcon trayIcon
protected TrayManager(I2PAppContext ctx, boolean useSwing)
protected void configureNotifications(boolean enable)
public int displayMessage(int priority,
String title,
String message,
String path)
title - for the popup, translatedmessage - translatedpath - unsupportedprotected abstract PopupMenu getMainMenu()
protected abstract JPopupMenu getSwingMainMenu()
protected void initializeJNotificationItems()
protected void initializeNotificationItems()
public void languageChanged()
public void startManager()
throws AWTException
AWTExceptionpublic void stopManager()
protected abstract void updateMenu()