Actually, I did the Mac OS X implementation of the TrayIcon API.
I didn't implement the showBalloonMessage on the Mac mainly because
the Mac doesn't normally have that kind of notification balloon like
on Windows. (That's the one where a bubble pops up over an icon in
the windows task bar and tells you that you have mail, or a software
download is ready to be installed, etc.)
Also, you're just looking at a demo. This particular demo runs on all
platforms that JDIC supports, so it has common functionality. The
animated Duke is to show you can (if you want) use an animated GIF
and get it to animate. You have to provide the GIF though, so you'd
want to draw it however appropriate for your application.
As far as what you do with it in a real application, that's up to
you. It allows you to put an icon up in the status bar area, and have
it respond to a single or double click, and allows you to attach a
Swing JMenu as well, and trap selections of menu items, to do with as
your application requires.
Rob Ross, Lead Software Engineer
E! Networks
---------------------------------------------------
"Beware of he who would deny you access to information, for in his
heart he dreams himself your master." -- Commissioner Pravin Lal
On Jul 2, 2007, at 3:36 PM, Michael Hall wrote:
On Jul 1, 2007, at 2:40 PM, Rob Ross wrote:
But, the code for Mac TrayIcon should work fine if you download it
and run it from your desktop.
OK, I'm curious and have too much idle time. I downloaded jdic from
here...
Trying to run the Tray demo from there I get a "Show Baloon
Message" window. Clicking on the obvious OK button gets...
Exception in thread "AWT-EventQueue-0"
java.lang.UnsupportedOperationException: Method showBalloonMessage
is unsupported under Mac!
at
org.jdesktop.jdic.tray.internal.impl.MacTrayIconService.showBalloonMes
sage(Unknown Source)
at org.jdesktop.jdic.tray.TrayIcon.displayMessage(Unknown
Source)
at Tray$3.actionPerformed(Unknown Source)
...
After this I noticed it does successfully add a little waving Duke
animation to the Finder menu bar. I'm ok with that, it's small
enough to be unobtrusive so the repeated and repeated waving won't
drive you crazy real fast. The yellowish background seems a little
out of place considering everything else is a white background.
But given the above it doesn't appear to do too much really useful.
I don't intend to be overly critical here. It appeared that at
least the early work on this was done by the java-dev list's own
Elliot Hughes. But this version of this demo does not seem to work
completely fine.
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Java-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/java-dev/email@hidden