Package esmska.gui
Class NotificationIcon
- java.lang.Object
-
- esmska.gui.NotificationIcon
-
public class NotificationIcon extends java.lang.ObjectDisplay icon in the notification area (aka system tray)
-
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static NotificationIcongetInstance()Get instance of NotificationIcon.java.awt.PopupMenugetPopup()Returns the popup menu on notification icon.static voidinstall()Install a new icon in the notification area.static booleanisInstalled()Returns whether the notification icon is currently installedstatic booleanisSupported()Returns whether notification area is supported on this system.static voidtoggleMainFrameVisibility()Show or hide main window.static voiduninstall()Remove an icon from notification area.
-
-
-
Method Detail
-
getInstance
public static NotificationIcon getInstance()
Get instance of NotificationIcon. This class is singleton.- Returns:
- instance if notification area is supported, null otherwise
-
toggleMainFrameVisibility
public static void toggleMainFrameVisibility()
Show or hide main window. Icon must be installed first.
-
install
public static void install()
Install a new icon in the notification area. If an icon is already installed, nothing happens. If notification area is not supported, nothing happens.
-
uninstall
public static void uninstall()
Remove an icon from notification area. If there is no icon installed, nothing happens. If notification area is not supported, nothing happens.
-
isSupported
public static boolean isSupported()
Returns whether notification area is supported on this system.
-
isInstalled
public static boolean isInstalled()
Returns whether the notification icon is currently installed
-
getPopup
public java.awt.PopupMenu getPopup()
Returns the popup menu on notification icon.
-
-