java.lang.Object
io.github.astrapi69.awt.system.SystemTrayFactory

public class SystemTrayFactory extends Object
The class SystemTrayFactory provides factory methods for create system tray Menu
  • Method Details

    • newSystemTray

      public static SystemTray newSystemTray(@NonNull @NonNull TrayIcon trayIcon, @NonNull @NonNull PopupMenu popupMenu) throws AWTException
      Factory method for create a SystemTray from the given TrayIcon object and the given PopupMenu object
      Parameters:
      trayIcon - the tray icon of the SystemTray
      popupMenu - the tray popup menu of the SystemTray
      Returns:
      the new SystemTray object
      Throws:
      AWTException - is thrown if the desktop system tray is missing
    • newTrayIcon

      public static TrayIcon newTrayIcon(String imgFilename, String appName, PopupMenu systemTrayPopupMenu, Map<String,ActionListener> actionListeners)
      Factory method for create a TrayIcon object
      Parameters:
      imgFilename - the img filename
      appName - the app name
      systemTrayPopupMenu - the system tray popup menu
      actionListeners - the action listeners
      Returns:
      the new TrayIcon