java.lang.Object
net.i2p.desktopgui.TrayManager
net.i2p.desktopgui.InternalTrayManager

class InternalTrayManagerextends TrayManager
Tray manager for internal use with full router context access. Provides comprehensive I2P management through system tray including restart, shutdown, browser launch, and configuration options. Requires router.jar for complete functionality.
  • Field Details

    • _context

      private final RouterContext _context
      The router context.
    • log

      private final Log log
      Logger for the tray menu.
    • _main

      private final Main _main
      The main application object.
    • _browserItem

      private MenuItem _browserItem
      Menu items of the tray popup.
    • _configItem

      private MenuItem _configItem
      Menu items of the tray popup.
    • _restartItem

      private MenuItem _restartItem
      Menu items of the tray popup.
    • _stopItem

      private MenuItem _stopItem
      Menu items of the tray popup.
    • _restartHardItem

      private MenuItem _restartHardItem
      Menu items of the tray popup.
    • _stopHardItem

      private MenuItem _stopHardItem
      Menu items of the tray popup.
    • _cancelItem

      private MenuItem _cancelItem
      Menu items of the tray popup.
    • _jstatusItem

      private JMenuItem _jstatusItem
      Menu items of the Java menu bar.
    • _jbrowserItem

      private JMenuItem _jbrowserItem
      Menu items of the Java menu bar.
    • _jconfigItem

      private JMenuItem _jconfigItem
      Menu items of the Java menu bar.
    • _jrestartItem

      private JMenuItem _jrestartItem
      Menu items of the Java menu bar.
    • _jstopItem

      private JMenuItem _jstopItem
      Menu items of the Java menu bar.
    • _jrestartHardItem

      private JMenuItem _jrestartHardItem
      Menu items of the Java menu bar.
    • _jstopHardItem

      private JMenuItem _jstopHardItem
      Menu items of the Java menu bar.
    • _jcancelItem

      private JMenuItem _jcancelItem
      Menu items of the Java menu bar.
    • CONSOLE_ENABLED

      private static final boolean CONSOLE_ENABLED
      True if the desktop console can be opened.
    • CONSOLE_BUNDLE_NAME

      private static final String CONSOLE_BUNDLE_NAME
      Bundle holding the translated console strings.
      See Also:
  • Constructor Details

    • InternalTrayManager

      public InternalTrayManager(RouterContext ctx, Main main, boolean useSwing)
      Create a new InternalTrayManager with full router context access.
      Parameters:
      ctx - the router context
      main - the main application instance
      useSwing - true to use Swing components, false for AWT
  • Method Details

    • startManager

      public void startManager() throws AWTException
      Create the system tray icon and menu.
      Overrides:
      startManager in class TrayManager
      Throws:
      AWTException - if the system tray is not supported
    • getMainMenu

      public PopupMenu getMainMenu()
      Build an AWT popup menu with router management controls.
      Specified by:
      getMainMenu in class TrayManager
      Returns:
      the AWT popup menu
    • getSwingMainMenu

      public JPopupMenu getSwingMainMenu()
      Build a Swing popup menu with router management controls.
      Specified by:
      getSwingMainMenu in class TrayManager
      Returns:
      the Swing popup menu
    • updateMenu

      protected void updateMenu()
      Update the menu.
      Specified by:
      updateMenu in class TrayManager
    • configureDesktopgui

      private void configureDesktopgui(boolean enable)
      Configure whether the desktop GUI is enabled.
      Parameters:
      enable - true to enable, false to disable
    • configureNotifications

      protected void configureNotifications(boolean enable)
      Configure notification settings and save to router config.
      Overrides:
      configureNotifications in class TrayManager
      Parameters:
      enable - true to enable notifications, false to disable
    • launchBrowser

      private void launchBrowser()
      Build the console URL with info from the port mapper, and launch the browser at it. Modified from I2PTunnelHTTPClientBase.