 |
New AWT Features in Mustang.
Posted by bino_george on June 01, 2005 at 12:54 PM | Comments (6)
Modality improvements
In Mustang build 38, the AWT team integrated a major improvement to the Modality system in AWT/Swing. This was a set of RFEs that had about 475 total votes on the Bug Parade. The Modality improvements are significant in that they provide for new modes that were previously not possible from Java Apps, providing more flexibility and improved architecture.
Here are the related RFEs that are part of this work :
4167266 Modal dialogs should be modal per AppContext
4080029 Modal Dialog block input to all frame windows not just its parent.
4813288 Need a way to exempt some windows from disablement when a modal dialog is shown
Motivation
The new AWT modality spec can be seen here :
http://www.java.net/download/jdk6/docs/api/java/awt/doc-files/Modality.html
The Tray API :
This API was developed initially in JDIC and severely refined prior to incorporation into Mustang. There were some deficiencies in the original API that have been fixed in the JDK version.
http://www.java.net/download/jdk6/docs/api/java/awt/SystemTray.html
http://www.java.net/download/jdk6/docs/api/java/awt/TrayIcon.html
You can check out these features and test them out with the latest
Mustang build :
http://www.java.net/download/jdk6/binaries/
More to come.. Stay tuned, there are more new AWT features that will be coming in the next few builds. One of them is native Splash screen support in AWT.
Success of Mustang project
Your evaluation of the Mustang build has enabled us to catch problems in the implementation very quickly. We have had several bugs reported in the Mustang Forums shortly after the features were advertised in various blogs. We were then able to turn around and fix these problems right away. So please help us evaluate these new features by downloading the latest mustang builds.
Bookmark blog post: del.icio.us Digg DZone Furl Reddit
Comments
Comments are listed in date ascending order (oldest first) | Post Comment
-
I have posted a review of the new System Tray API at http://joust.kano.net/weblog/archive/2005/06/01/poorly-designed-api-for-mustang-systemtray/. I hope you at the AWT team will address these concerns before Mustang ships.
Posted by: keithkml on June 02, 2005 at 08:25 AM
-
What about if we want to use a Swing JPopupMenu so that we can use menu item icons, etc? This could be done by registering a mouse listener that shows the JPopupMenu in a new window above the icon, but wouldn't it be better if this was handled automatically?
Or what about if there was a JTrayIcon that subclassed TrayIcon that added additional constructors to take in a JPopupMenu and perhaps even a custom component for rendering a status message?
Posted by: prunge on June 02, 2005 at 04:14 PM
-
Regarding Swing JPopupMenu usage :
As you suggested, you can so this with your own MouseListener, but another nicer way would be to have a JTrayIcon in Swing. We have talked about this, and if there is sufficient demand for one, I think the Swing team would do it.
Posted by: bino_george on June 02, 2005 at 05:35 PM
-
Just downloaded build 39 today to try out the TrayIcon.
In as little as 4 lines of code I can get a basic one working and that is an awesome thing!
I've been using a package from here: http://jeans.studentenweb.org/java/trayicon/trayicon.html that works great, but requires alot of coding for the return investment.
I am very pleased with the simplicity of the Tray API!
Posted by: dblair on June 09, 2005 at 12:59 PM
-
I understand that the System Tray API will be supported on Gnome and KDE only when running on a *nix platform. Any chance that XFCE might be included in the supported platforms? It is based on the same toolkit as Gnome, I believe, so it should at least be possible.
Thanks
Posted by: sasdav on July 28, 2005 at 05:47 AM
-
I agree, XFCE in the supported list would be great.
Posted by: zero on September 28, 2005 at 03:15 AM
|