SystemTray/README.md

38 lines
1.4 KiB
Markdown
Raw Normal View History

2014-11-03 02:10:18 +01:00
SystemTray
==========
2014-11-04 12:32:04 +01:00
Cross-platform **SystemTray** and **AppIndicator** support for java applications.
2014-11-03 02:10:18 +01:00
2014-11-03 02:18:28 +01:00
This libraries only purpose is to show *reasonably* decent system-tray icons and app-indicators with a simple popup-menu.
2014-11-03 02:10:18 +01:00
2014-11-04 12:32:04 +01:00
There are a number of problems on Linux with the Swing (and SWT) system-tray icons, namely that:
1. Swing system-tray icons on linux **do not** support transparent backgrounds (they have a white background)
2. Swing/SWT **do not** support app-indicators, which are necessary on more recent versions of linux
3. Swing popup menus look like crap
2014-11-04 12:32:04 +01:00
- system-tray icons use a JMenuPopup, which looks nicer than the java 'regular' one.
- app-indicators use native popups.
2014-11-03 02:10:18 +01:00
2014-11-04 12:32:04 +01:00
This is for cross-platform use, specifically - linux 32/64, mac 32/64, and windows 32/64. Java 6+
2014-11-03 02:10:18 +01:00
```
2014-11-04 12:33:14 +01:00
Note: This library does NOT use SWT for system-tray support, only for the purpose
2014-11-04 12:01:37 +01:00
of lessening the jar dependencies. Changing it to be SWT-based is not be
2014-11-04 12:33:14 +01:00
difficult, just remember that SWT on linux *already* starts up the GTK main
2014-11-04 12:01:37 +01:00
event loop.
2014-11-03 02:10:18 +01:00
```
```
Note: If you use the attached JNA libraries, you **MUST** load the respective
native libraries yourself, especially with JNA (as the loading logic has
been removed from the jar)
```
```
Note: This project was heavily influence by the excellent Lantern project,
*Many* thanks to them for figuring out AppIndicators via JNA.
https://github.com/getlantern/lantern
```
2014-11-04 12:32:04 +01:00