Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

Provides a simple adapter that makes the tray use gtk under linux, providing a native look and feel.

branch: master

Fetching latest commit…

Octocat-spinner-32-eaf2f5

Cannot retrieve the latest commit at this time

Octocat-spinner-32 src-native
Octocat-spinner-32 src
Octocat-spinner-32 .classpath
Octocat-spinner-32 .gitignore
Octocat-spinner-32 .project
Octocat-spinner-32 README
Octocat-spinner-32 pom.xml
README
This small library provides a way to work around the JDK transparency bug under linux by
providing a native GTK implementation of a tray abstraction. The usage is very simple:

 SystemTrayAdapter trayAdapter = SystemTrayProvider.getSystemTray();  
 URL imageUrl = getClass().getResource("myImage.svg");  
 String tooltip = "I'm transparent under linux!";   
 PopupMenu popup = produceMyPopupMenu();  
 TrayIconAdapter trayIconAdapter = trayAdapter.createAndAddTrayIcon(  
    imageUrl,   
    tooltip,  
    popup); 

When running under a system that supports transparency (like windows), the provider will
return a wrapper for the usual awt implementation. Under linux, it will try to use the 
native implementation (that requires GTK 2+). If there's any problem trying to load the native
library (for example, if GTK is not installed), it will fallback to the awt implementation,
graciously degrading.

This project uses maven and the artifacts are available in Maven Central, under the following
ids:
	<groupId>com.github.taksan</groupId>
	<artifactId>native-tray-adapter</artifactId>

Enjoy and, please, feel free to report any bugs =)
Something went wrong with that request. Please try again.