We closed this forum 18 June 2010. It has served us well since 2005 as the ALPHA forum did before it from 2002 to 2005. New discussions are ongoing at the new URL http://forum.processing.org. You'll need to sign up and get a new user account. We're sorry about that inconvenience, but we think it's better in the long run. The content on this forum will remain online.
Page Index Toggle Pages: 1
TrayIcon lib (Read 845 times)
TrayIcon lib
Apr 12th, 2008, 10:28pm
 
Folks,

because I wanted to be able to render to an icon in the systemtray, I wrote another library for doing that.
It implements a renderer like P2D or OPENGL that draws to an icon in the tray and is a subclass of P3D, so you can use all the familiar functions.
It uses the new TrayIcon class in Java6 so be sure to use Java 1.6!
It can be found here: http://web.mac.com/derDoc/pub/tray.zip

There are two drawbacks though: The current preview of Java6 in MAC OSX draws to the SystemStatusBar only in b/w, and in Windows transparency only works the first time.
Read the included readme for everything else.
-V
TrayIcon lib [Update]
Reply #1 - May 9th, 2008, 12:10am
 
According to http://developer.apple.com/releasenotes/Java/JavaLeopardUpdate1RN/ResolvedIssues/chapter_3_section_5.html#//apple_ref/doc/uid/TP40007619-CH3-SW21
it is not a bug but a 'feature' because the Apple UI guidelines state that icons in the systray are to be rendered in grayscale. I do not understand the reasoning behind that and neither seem any of the non-OSX icons in my tray.
It looks like I am just gonna have to write a JNI lib myself again, which shouldn't be too hard with the experiences of the DockTile lib.
On a side note the same Release notes state that there is a new API in the com.apple.eawt.Application class that allows setting the app's docktile icon. Unfortunately since the docs for the apple extensions to Java 1.6 are not online yet, I'd have to class dump them. Once I do that I will test their implementation.
Apart from the fact that the Java Update 1 for 10.5.2 very ApplePolicy-esque only installs on 10.5.2 (and do not try force-installing on an older versions - I tried it once.. was'nt pretty).
Page Index Toggle Pages: 1