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 Details

    • _appContext

      protected final I2PAppContext _appContext
    • _useSwing

      protected final boolean _useSwing
    • tray

      protected SystemTray tray
    • trayIcon

      protected TrayIcon trayIcon
    • _showNotifications

      protected volatile boolean _showNotifications
    • PROP_NOTIFICATIONS

      protected static final String PROP_NOTIFICATIONS
      See Also:
  • Constructor Details

    • TrayManager

      protected TrayManager(I2PAppContext ctx, boolean useSwing)
      Instantiate tray manager.
  • Method Details

    • startManager

      public void startManager() throws AWTException
      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

      protected abstract PopupMenu getMainMenu()
      Build a popup menu, adding callbacks to the different items.
      Returns:
      popup menu
    • getSwingMainMenu

      protected abstract JPopupMenu 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

      public int displayMessage(int priority, String title, String message, String path)
      Send a notification to the user.
      Parameters:
      title - for the popup, translated
      message - translated
      path - unsupported
      Returns:
      0, or -1 on failure
    • _t

      protected String _t(String s)
    • _t

      protected String _t(String s, Object o)
      Since:
      0.9.26