Subscribe: Romain Guy's Weblog
http://jroller.com/rss/gfx
Added By: Feedage Forager Feedage Grade B rated
Language: English
Tags:
application  code  demo  disco  extreme gui  java  new  presentation  source code  source  swing  swingx  time  video  web 
Rate this Feed
Rate this feedRate this feedRate this feedRate this feedRate this feed
Rate this feed 1 starRate this feed 2 starRate this feed 3 starRate this feed 4 starRate this feed 5 star

Comments (0)

Feed Details and Statistics Feed Statistics
Preview: Romain Guy's Weblog

Romain Guy's Weblog



Playing with Java, Swing and UI Design.



Last Build Date: Wed, 15 Apr 2015 10:58:10 -0400

Copyright: Copyright 2015
 



Blog Closed, Follow the Sign

Wed, 21 Feb 2007 12:43:25 -0500




This web site is moving!

Sat, 20 Jan 2007 08:20:54 -0500

JRoller has been very helpful for the past two years but I can't cope anymore with all its limitations and bugs. I have decided to move my blog on a new web site that will also host my photos and Java applications. The new web site is called Curious Creature and you can find it at http://www.curious-creature.org.

I imported all the posts from this blog to the new one. It's now easier to read old posts and the search engine works! You will be automatically redirected in 10 seconds.

Do not forget to update your RSS feed!




The Swing team is hiring

Wed, 17 Jan 2007 03:58:46 -0500

I just got an email from the Swing team telling me they have two open positions. They're looking for a Software Engineer and a Staff Engineer to work on Swing.

I have spent one year working with the Swing team in Santa Clara, California, and I can tell you it's a nice place to work at. There's a lot to be done in Swing and with the recent launch of Java SE 7 development process I guess it would be an interesting time to start working on it.

That's the kind of job offer that makes me wish to finish school very quickly ^^




Updated Aperture Loupe in Swing

Tue, 2 Jan 2007 23:58:36 -0500

I recently showed an Aperture-like loupe implemented in Swing. As usual, you guys are way too picky about demos and asked for a couple of fixes :p The following links point to an updated version of the demo. You can now change the magnifying power of the loupe and it will show only the picture that sits directly underneath the mouse cursor. This new version should also fix the bug when the frame was minimized/maximized but I don't know for sure since I haven't tried it on Windows yet.

The source code is available. Keep in mind the goal of this demo is to explain how to use layered panes, not to create a fully functional, bug-free loupe ;-)




Groovy 1.0 is There

Tue, 2 Jan 2007 18:33:45 -0500

I just got the news from Guillaume, Groovy 1.0 has finally been released! I've been waiting for this for a long time and I have now no excuse to read Groovy in Action I promised Guillaume I would read :-)

By the way, I particularly like the Swing Builder provided by Groovy. It lets you create complex layout and UIs in a much cleaner way than usual Java code. It compares to F3 code but I prefer Groovy's approach which seems more natural to me after all those years of Java.

P.S: I also need to learn Grails so maybe I can write web sites with Java technology (after years of PHP, I hate it, Zope is just a joke to me and I never liked the Ruby language.)




iNuron McNucle

Tue, 2 Jan 2007 09:52:57 -0500

The folks at iNuron were kind enough to send me a beta version of their incoming product, McNucle. McNucle is a media management center. In short, it lets you browse, organize and share your media files across your computers.

McNucle is a very interesting application for various reasons. First, despite working on Mac OS X only (as it heavily relies on Spotlight), it's a very nice looking Java/Swing application. It also shows how you can integrate a Java application with the native platform. You should check out the introduction movie to see what it looks like. There is still, in my opinion, a lot of work to do in the user interface, but it's better than usual Metal/Ocean products ;-)




Five little things

Mon, 1 Jan 2007 11:35:58 -0500

After many parties and long meals, I am finally catching up with the rest of the blogosphere and I just discovered that Alexis tagged me. Here are five little known things about me:

  • I can't sleep when my cupboard's door is cracked open ;
  • I once was a Microsoft .NET Most Valuable Student ;
  • I followed German course at school for 6 to 7 hours a week, for seven years and all I can say today is "Ich möchte gern ein bisschen Kuchen essen" (which is more than enough to survive in Germany anyway) ;
  • I learned programming on my 9 years old brother's Vtech Genius when I was 15. It was on new year's eve at some friends of my parents and the evening was so incredibly dull that I preferred to start writing BASIC applications on a 14x3 characters screen ;
  • I once acted in a play written by a friend of mine. That's what happens when you agree to write a web site for a bunch of artists.

I'm now tagging Richard, Chet, Joshua, Scott and Hans.




Aperture's Loupe in Swing

Thu, 28 Dec 2006 19:23:16 -0500

I am a huge fan of Apple's Aperture. This application lets you organize and process your pictures in a very elegant fashion. One of the coolest features of this application is its loupe, and most notably the new centered loupe, added in Aperture 1.5. As I was writing another chapter for the book Chet Haase and I are co-authoring, I had the idea of implementing the centered loupe in Java. I came up with a simple demo that I quite like. (Its role is to demonstrate the use of layouts with JLayeredPane but that's a different story but this means this demo does not use the glass pane; how's that for a change?) It's nothing impressive really, but I thought some of you might enjoy it.

When you start the application, select a higher layer number, for instance "Layer 4," and move the mouse over the pictures. If you don't have Java SE 6 installed, I have uploaded a video of the demo (QuickTime, 26 MB.)

You can also download the source code.




Eerie

Thu, 28 Dec 2006 11:46:45 -0500




IntelliJ IDEA 6

Thu, 21 Dec 2006 15:15:52 -0500

I've finally, thanks to the JetBrains guys, updated to IntelliJ IDEA 6. I am very pleased with the new features and most notably with the improved CVS support. The dialogs are much easier to use now. I also really like all the new "profiles" you can use in your project (for settings, views, and so on.) I need to spend more time with this version 6 to discover all the changes but I have ran into several problems on Mac OS X. Using the Aqua or Quaqua look and feel, the editor tabs sometimes do not appear after startup or the editor won't even show up. Nothing really serious though.




Special Effects in Swing with SwingX

Wed, 20 Dec 2006 18:38:13 -0500

Matt Nathan has just posted about his new component called JXEffectPanel. It's a really cool component that can apply real-time effects to any Swing components hierarchy. The current example shows how to use the component to make Swing components translucent or how to add reflections. Using a custom RepaintManager, this component applies the effect every time the components are updated. Thus, it works on animations! This is something I wanted to write for months and I'm definitely gonna use it for a really cool/good-looking demo.




Extreme GUI Makeover 2007

Mon, 18 Dec 2006 16:16:32 -0500

Extreme GUI Makeover talks in 2005 and 2006 were very successful and ranked amongst the top 10 JavaOne talks both times. Scott, Shannon and I have submitted this talk again for JavaOne 2007. If our submission is selected, we will need an application to work on. In 2005, we wrote a chat client. In 2006, we wrote an email client. What application would you like us to "make over" this year? Go ahead, we are listening.

Your proposal can be a generic idea (like "an email client") or a very specific application (for instance, "Thunderbird".) We will not, however, write a fully functional version of the application. We do not have the time required for such an endeavor.




Source Code for Extreme GUI Makeover 2006

Mon, 18 Dec 2006 11:51:15 -0500

We promised it, and here it is: the source code of Extreme GUI Makeover 2006, a demo we showed at JavaOne 2006.




JavaPolis 2006

Fri, 15 Dec 2006 09:42:57 -0500

I'm just back from JavaPolis 2006 and I must say I had a blast. I already enjoyed it last year and it was even better this year. Thanks a lot to every person responsible for this event and to all the speakers. If you couldn't attend, check out their new web site, Parleys, that will host some (all?) of the talks within a few months. Also, watch out for the DVD with all the recorded talks.




By the way...

Tue, 5 Dec 2006 13:39:54 -0500

Sorry for the lack of updates but my school is keeping well too busy. Anyway, I just wanted to keep a promise. I'll be in California this summer, working as an intern at Google, Mountain View. Don't even ask me what I'll be working on because I don't even know myself ;-)




Conférence ISIMA

Thu, 30 Nov 2006 16:19:09 -0500

Voici comme promis les slides des présentations que j'ai donné à l'ISIMA cet après-midi :

Vous pouvez aussi télécharger des vidéos de la démo avec les photos, des vidéos d'une autre démo intéressante et la vidéo d'une interface intéressante. Le code source de la première démo est disponible sur le net.




More details about F3

Sun, 12 Nov 2006 13:43:27 -0500

Some of you voiced a number of very conservative arguments against F3 in my previous blog entry. I encourage you to go read the F3 language description to get a better idea of F3's capabilities. There are a few things I just love in this language, like bound attributes or triggers. Tell me what you like in F3.




Swing made easier?

Fri, 10 Nov 2006 12:34:43 -0500

Chris Oliver, who works at SeeBeyond, that is now Sun Microsystems, showed us, while I was at Sun, F3 a programming language he was working on. Apparently F3 will soon be open sourced on java.net. That is great news!

F3 is a declarative language that makes the creation of Swing UIs a lot easier. Take a look at the examples Chris has posted on his blog to get a better idea of what you can do with it. If I remember correctly the other examples Chris showed me like a year ago, you can also put real Java code in there. I know that Chris has writtent many impressive demos that showcase the power of his tool, that's why I really advise you to keep a eye on java.net and F3.







My Favorite RSS Readers

Tue, 7 Nov 2006 18:42:52 -0500

RSS readers are today's text code editor. Every programmer in the world has written at least one and beginners about 7 each. I know that because I wrote at least one text editor and more RSS readers than I can dare to recall. To be honest I wrote those RSS readers only to illustrate programming articles, but still, I did more than my share. But enough about my ramblings

A long, long time ago, I talked about NewsFire the RSS reader I use on Mac OS X. It's a very neat application, beautiful and simple, which covers all my needs to constantly feed me with fresh news. No surprise I have about 200 feeds that I do read every day (this is the skill I am the proudest of, apart from liking desserts, I can read very quickly.)

Oddly enough, I can't seem to recall that I ever introduced you to BlogBridge. BlogBridge is my RSS reader of choice on both Windows and Linux. It looks rather good, with a sufficiently customizable UI, provides a clean layout to browse your feeds and it's available everywhere. BlogBridge is not only a Java/Swing application, it's also a WebStart Java application. That means I can launch it from pretty much anywhere I am, that is school. That feature would be utterly useless if there was no easy way to recall your feeds and the BlogBridge guys did think about that too. They offer a cool online service to backup and restore all your feeds, guides (sorts of feeds groups) and other settings. All your feeds are one click away, and so is the end of my boredom at school.

I know I could simply used online RSS aggregators, like Google Reader, but after having tried several of them, I just stopped bothering and went back to my beloved rich clients. If found the online readers either too slow or too inconvenient to use. Besides, I can't help closing my web browser when I'm done reading web sites, and I always end up having to go back to the RSS reader web site. A matter of taste I guess.




It's All About Java

Mon, 6 Nov 2006 13:21:44 -0500

Aside from photos this blog has been pretty quiet lately and that's why I would like to tell you what I've been up to recently. Jeez I don't even know where to begin.

The most important thing to me, because it's also the most time-consuming, is the book Chet Haase and I are currently writing. It's surprisingly entitled Filthy Rich Clients and should hopefully be released in time for JavaOne 2007. Those of you who took the time to read the slides of our Filthy Rich Clients presentation already know about it but I'm sure many missed that :-) Anyway, you are welcome to come discuss with us about this topic on the Yahoo! Group dedicated to the book. Hopefully we might be able to post some drafts there to get early feedback.

Regular readers of this blog know I gave talks at several Java related conferences over the past 18 months. It seems I'll be doing that quite a lot in a near future. Here is a summary of the incoming events:

  • My friend Julien Ponge (who wrote the wonderful IzPack) invited me to speak at his university in France at the end of the month,
  • Chet Haase, Richard Bair and I will give a lengthy 6 hours presentation at JavaPolis 2006 in Antwerp, Belgium early December. Chet and I will also give another run of Filthy Rich Clients, updated to match the latest changes in the TimingFramework,
  • Ben Galbraith's new desktop conference, Desktop Matters will be held in February in California and I will be there,
  • The Server Side Java Symposium offered me to give a speech at their incoming event in March, in Las Vegas. Given the usual target of TSS audience, I am thrilled to go there,
  • And hopefully I'll get a slot at JavaOne 2007 :-)

As usual, if you are planing on going to any of these events, I would be glad to meet you. Speaking of JavaOne, I will be in the US again in time for this conference. I will be in California, doing Java stuff for a very well known company... which is not Sun Microsystems. I'll keep you posted on that as soon as possible.

Last but not least, I've recently been elected as a Java Champion. I've met several other Java Champions and I'm thrilled to become part of this friendly community.

By the way this year is my last year at school! Going back to the class room is kind of a pain after having spent a wonderful year at Sun Microsystems but I guess it's worth it. Only a few more months and I will be free! (Well, in September 2007.)













Disco Available

Mon, 30 Oct 2006 07:00:18 -0500

Disco, the CD-burning tool for Mac OS X, is finally available as a public beta. I just tried it and it's the perfect example of what kind of applications I would like to use every day. Not only does it look great, Disco is also very easy to use. Sure, it might not do everything large applications like Toast or Nero Burning ROM do, but it does everything I need to do with a burning application.

You can also take a look at Disco in action. In this video, I erase a DVD+RW, then burn a bunch of pictures on it.

Last but not least, I have another video that takes a closer look at the smoke, generated during the burning process.

Great stuff! Congratulation to the Disco team!




New .Mac Webmail [Updated]

Fri, 27 Oct 2006 04:08:53 -0400

It just rocks! Thanks Apple for finally improving .Mac. Here is a screenshot of the new webmail:

You can do pretty much everything you can do with Mail.app. Moving mails around is a breeze and the look has definitely improved a lot. I have one big issue though: I can't use it from my cell phone, with Opera Mini, anymore! And that sucks. Big time.







Smoke and Fire

Tue, 24 Oct 2006 17:48:11 -0400

A rather strange and unusual spectacle at the bottom of the hill where I live, in Lyon, Frace. This refinery is usually very discreet but they somehow decided to black out the sky tonight. As a bonus, you can see the Alps in the background, something that happens very very rarely (they are 2 hours away by car.)




China, More Photos

Mon, 23 Oct 2006 13:41:34 -0400

[...]



Cool Utility Classes For SwingX

Sat, 21 Oct 2006 23:59:45 -0400

If you liked the user interface of Artemis, you might probably want to be able to produce the same result at no cost. I have good news for you then because I have just added a set of cool classes to SwingX that will help you generate nice-looking graphical effects. The new classes are available in three packages: org.jdesktop.swingx.geom Morphing2D: Morphes a Java2D shape into another (written by Jim Graham from Sun Microsystems) Star2D: A star shape that can be used to create Web 2.0-like badges and icons org.jdesktop.swingx.graphics BlendComposite: A set of 30+ blending modes for Java2D painting (as found in Photoshop or The GIMP) ColorUtilities: A set of utility methods to manipulate colors GraphicsUtilities: A set of utility methods to create and load compatible images and create thumbnails ReflectionRenderer: Generates reflections from pictures ShadowRenderer: Generates shadows from pictures org.jdesktop.swingx.image AbstractFilter: A basic implementation of BufferedImageOp to easily create new image filters ColorTintFilter: This filters applies a color to an image to tint it FastBlurFilter: A box blur filter StackBlurFilter: This filter approximates the result of a gaussian blur by applying several FastBlurFilter to an image All these classes come from the SwingLabs incubator. Some of them have been available for quite a while now (ShadowRenderer used to be called ShadowFactory) but have been vastly improved. I have written the javadoc of all those classes but I have also created demos for the most important features. The demos source code is available in the incubator, in the fx/ sub-project but I have some WebStart versions for you! Blending Blur Morphing Reflections Shadows Go grab the latest source code from SwingX's CVS and tell me what you think of those tools! [...]



Simple Tools For Simple Tasks... With Cool UIs

Fri, 20 Oct 2006 19:50:25 -0400

My mom is real estate agent and she often takes pictures of the properties she's trying to sell. Unfortunately, those modern digital cameras create files that are a tad too large to send by email or to upload on their internal enterprise portal. While she knows how to use a computer (and even a PDA), I just can't get her to remember how to quickly resize a photo. That's why I decided to write her a very small tool that she would be able to use.

The result is a very simple application called Artemis. It does nothing but accept a file, let the user choose a resizing resolution (large, medium or small) and save the result. You can watch a video of the application in action:

I am sorry for the french message in the video, I just forgot to translate that particular string and found out only when the video was done. By the way, this video shows Artemis running on Windows XP in Parallels on my MacBook Pro. I'm always amazed by the speed of Parallels + Java SE 6.

Anyways, the application is still a bit crude (no transitions, no way to go back to the first screen when you save a picture... after all, I started this app. tonight) but I like its simple UI. To be truly honest I really like the effects. You can notice that I have improved reflections by adding a slight blur to them.

I built this demo using a set of utility classes I should soon released in the SwingX CVS repository. Those classes range from simple image related utilities (load/convert compatible images, create thumbnails) to shadows and reflections generation. If you can't watch the video, here are some screenshots of the application:




Another Great Gradient Performance Trick

Tue, 17 Oct 2006 16:51:33 -0400

Shannon Hickey, from the Swing team, just posted a comment on my java.net blog about gradients performance. He delivers another excellent trick to improve gradients performance. By just setting a parameter to true in the constructor, you can turn your gradient into a cyclic gradient, thus yielding to 2x speed boost! Check out Shannon's comment for all the details.




Screenshots and Video of Extreme GUI Makeover 2006

Mon, 16 Oct 2006 19:46:19 -0400

After I posted the slides of Extreme GUI Makeover, many people asked for screenshots and/or videos of the application described in the presentation. I listened to you. Here is everything you wanted. By the way, this presentation is not only mine as it's been said in several place. Scott Violet and Shannon Hickey, both from the Swing Team, also worked very hard on this demo. Anyways, here is the video (shot with Snapz Pro X on Mac OS X while the demo was running in Parallels... how about that for a cool benchmark?) All the effects and changes shown in the video should follow, more or less, the order of the slides. I have also shown a couple of effects that we did implement but never showed nor explained during our talks. QuickTime (24 MB) Now onto the screenshots. First, here is the basic UI we decided to revamp. It's a clone of Thunderbird on Windows XP: Here is the fully pimped version of the UI, with all our effects enabled. Some of them can be seen only in the video (drag and drop animations for instance.) You just got to watch the video to understand what the colored label on top of the email message are for. This should be in every single mail client. A Vista-like search dialog, with animated fade-in and fade out (huge thanks to Sébastien Petrucci who gave me the idea!) Last but not least, the mail sending animation. Too long and too complex to be used in a real application, it was added to show how far you can go. Incidently, there is absolutely no picture used in this animation. Everything you see is pure Java2D code. The background wooden texture and drop shadows are drawn by SwingX Painters. I hope you will enjoy it. Due to the numerous requests, the source code of the whole demo should soon be released. I don't know the current status but I'm pretty sure it will happen. We did release Aerith after all ;-)I do know the status of the source code and it's basically my fault it's not been released yet. I'll fix that asap! P.S: Maybe some day we'll release the code of the 2005 installement of Extreme GUI Makevoer... at least I hope so.[...]



Disco Special Effects

Sun, 15 Oct 2006 07:21:41 -0400

I recently talked about Disco, an incoming Mac OS X CD burning application. Disco offers a really good-looking user interface aimed at ease of use. Given the screenshots and movies I have seen so far, I must say those guys seemed to have reached their goals.

For weeks now, the development team was touting some cool, gratuitous special effects. They finally unveiled them. Disco is burning CDs right? Well, since there's no smoke without fire, there might as well be no fire without smoke. Check out this video of Disco in the process of burning a CD:

(object)

(object)

Not only does this effect look really nice, it's also interactive. If you move the mouse across the smoke, you can change its direction. You can even blow in your computer's microphone to blow the smoke away.

I know this is just eye-candy but since the application as a whole seems great, it does not hurt a bit :-)




China, Datong and Pingyao

Fri, 13 Oct 2006 19:26:08 -0400

[...]



Rich Internet Applications with SwingX-WS

Thu, 12 Oct 2006 09:32:05 -0400

You might already be familiar with the SwingLabs and SwingX projects, which provide new sets of tools and components for Swing. Richard Bair, leader of those projects, just published an excellent article about SwingX-WS.

SwingX-WS attempts to simply the use of web services (in the broad sense) by providing APIs that site on top of existing libraries. Those APIs let you, for instance, easily parse DOM documents, create and send HTTP requests in a few lines of code or even parsing HTTP form data. I really encourage you to read the SwingX-WS introductory article to see what cool new tools you can now use. I am particularly fond of the XmlHttpRequest and the SimpleDocument (which lets you execute and parse the result of an XPath expression very easily compared to J2SE core API.) It is also worth noting that these tools give you nice ways to perform operations in the background without blocking the GUI.

Richard's article did not talk about a very interesting component that sits in the source repository, JXForm. This component can be compared to the form tag in XHTML pages as it sends an HTTP request which parameters are obtained from the form's children. This means that in Swing, you can simply put text fields in your GUI and JXForm will take care of creating an HTTP request for you and hand you back the result.




Swing, its past, present and future

Fri, 6 Oct 2006 12:13:17 -0400

The Java Developer's Journal has an excellent interview of some Swing members throughout the ages. You'll learn some nice things about its early days among other stuff. Well worth the read.




Aerith HD videos

Sun, 1 Oct 2006 16:16:19 -0400

Aerith videos (156 MB). I have finally shot some videos of Aerith running. Those are full 1024x768 videos that show 3 of Aerith features. The last one, the full screen applet, was not working when capturing the video on Mac OS X. I'll see what I can do about that. Enjoy.




No Fluff Just Stuff: Extreme GUI Makeover slides

Sun, 1 Oct 2006 10:49:48 -0400

As promised during the session, here are the slides for Extreme GUI Makeoverin various file formats:




Java SE 6 anti-hack feature

Fri, 29 Sep 2006 09:31:00 -0400

I just installed a fresh weekly of the JDK 6 (b100) and I discovered something unusual. While compiling a demo, here is the message I got:

C:\Documents and Settings\gfx\Desktop\mailman2\mailman\src\com\sun\javaone\mailman\ui\MessagePane.java:133: warning: com.sun.java.swing.plaf.windows.WindowsLookAndFeel is Sun proprietary API and may be removed in a future release

It seems that Sun is really trying to tell us not to rely on their private API too much. I guess it makes sense with the incoming Open Source version of the JDK.




Java2D Gradients Performance

Wed, 27 Sep 2006 11:10:53 -0400

I have done some quick performance testing with Java2D gradients and exposed my results on java.net. I also explain the three ways you can paint gradients: regular GradientPaint, buffer image and stretched buffer image. Read the comments for very interesting follow-ups by other java.net members. One of them describes a fourth way of painting gradients, using a TexturePaint.




China, Datong and the Yungang caves

Sat, 23 Sep 2006 21:19:08 -0400

[...]



Audio track for Filthy Rich Clients presentation

Fri, 22 Sep 2006 21:00:09 -0400

I recently uploaded the slides of my presentation called Filthy Rich Clients but the audio was missing to fully understand all of them. Fortunately, JavaZone has set up a podcast with the audio track for every session. If you read my presentation and think you missed something, just download the audio track (MP3). There was a problem with the demo so you can skip from 5' to 9' :-)

I will run this presentation again at the No Fluff Just Stuff in Boston, on Sunday October 1st. If you plan to attend, I'll be glad to meet you there and I promise you that the demo will work this time (I now know how to work around the Apple VM's bug.)




China, Beijing and its zoo, the Great Wall

Thu, 21 Sep 2006 20:31:11 -0400

[...]



JavaDay 2006 (bonus: a video of Aerith you can watch)

Wed, 20 Sep 2006 22:10:23 -0400

developpez.com, a french web site, just released the videos of JavaDay 2006, an event organized by Sun France that took place in Paris. There are many interesting videos available, among which 4 of mine.

The first one shows Aerith. It's a DivX file so everyone should be able to finally see Aerith animations and music live (just ignore my babbling in french ;-)

The second one is a live tour of Aerith source code. If you want to get introduced to Aerith source files, this is for you. Well, at least if you speak french.

The third one is a re-run of Extreme GUI Makeover, a session Scott Violet, Shannon Hickey and I presented at JavaOne 2006.

The last one is a presentation of NetBeans 6.0 with the modules for the beans bindings and the Swing applications container (JSR 295 & 296).

Hope you will enjoy (at least the first one if you don't speak french.)




New Blendings Modes for Java2D

Wed, 20 Sep 2006 14:13:04 -0400

Java2D contains one of my favorite Java SE classes, java.awt.AlphaComposite. You can set an alpha composite on a Graphics2D context to blend a draw primitive with the current graphics. I have written a small tool that helps you understand how these composites work: You can also download the source of this tool. AlphaComposite is very useful, and I have used it quite a lot in Aerith for instance, but it does not do everything I want. I spend a lot of time in Photoshop creating mockups of my UIs and I often use the various blending modes you can set on layers. Those blending modes are great to create advanced lighting effects for instance. And if you ever work with a graphics designer, you might have to implement a Photoshop mockup that uses these blending modes. Tired of always having to find work arounds, I finally wrote a Java implementation of those blending modes and a small tool to test them: You can also download the source of this tool. The source contains a classe called BlendComposite that contains 32 new Composite implementations for Java2D (even though Normal is the equivalent of AlphaComposite.Src): Normal Average Multiply Screen Darken Lighten Overlay HardLight SoftLight Difference Negation Exclusion ColorDodge InverseColorDodge SoftDodge ColorBurn InverseColorBurn SoftBurn Reflect Glow Freeze Heat Add Subtract Stamp Red Green Blue Hue Saturation Color Luminosity BlendComposite works exactly as AlphaComposite. I simply duplicated the API. Here is an example of blending two pictures with the Overlay mode: g2.drawImage(imageA, 0, 0, null); g2.setComposite(BlendComposite.Overlay.derive(0.75f); g2.drawImage(imageB, 0, 0, null); There are a few caveats though. First, I only implemented the operations for primites stored as integers. That means you have to make sure you draw images that store their pixels as INT_RGB or INT_ARGB (making your pictures compatible will work.) Next, these implementations are not very fast, do not try real-time drawing with them. Finally, the SoftLight blending is not implemented yet and the HSL modes are not perfect when you blend a grayscale primitive. If you want to help, feel free to send me patches. Those composites work much better with Java SE 6; I have noticed speed improvements of x3 to x4 when compared to J2SE 5.0. A while ago, the JVM team announced they improved HotSpot's management for arrays and from what I have seen with this example, they did a great job! The source code is released under BSD license.[...]



Disco, Hype or Reality?

Sat, 16 Sep 2006 11:41:31 -0400

It's been a while since I've talked about a Mac OS X application in this blog. For the past few weeks, I have followed with interest the hype surrounding Disco. One of this authors has also an interesting blog where he gives clues about the application but also about icon design. Incidentally, those guys also brought us AppZapper, one of the most beautiful and simplest app I have ever used:

(image)

Given the name and the various clues given by the Disco team, it seems clear it is a tool to, at least, burn CDs and DVDs. I have to admit this is not something I do a lot, mostly because I am too lazy, but I am really curious to see what they found to make this process easier and, according to them, fun. Here is an interesting quote from the Disco blog:

People start using AppZapper to uninstall apps, but after discovering how satisfying it is to press the zap button, they begin uninstalling apps to use AppZapper.

When I first read this I thought "yeah, sure" but thinking more about it, I have to admit they are right. I do, from time to time, try to find "useless" apps on my hard drive just to zap them. I guess I am in need of more video games :) The thing is, if those guys manage to create an application as pretty, as easy and as fun to use as AppZapper, I might really well start burning optical discs more often. Maybe I will even start backing up my photos somewhere than on hard drives.

The other really interesting thing about Disco is the hype its authors created around it. In association with MacZOT, they are trying really hard to catch our attention and needless to say they succeeded, quite easily with that. I am amazed by the number of products that choose this path nowadays (remember the flawed Origami by Microsoft and their new "ah ok yet another MP3 player" Zune?) One thing is for certain: I want to see their UI, right now!

(image)




Filthy Rich Clients presentation slides (JavaZone 2006)

Thu, 14 Sep 2006 08:38:14 -0400

I gave a presentation entitled Filthy Rich Clients this morning at JavaZone 2006. This presentation explains how to create good looking Swing applications by using Java2D, animations and 3D. It also contains some performance tips. You can download or view the presentation in one of the following formats:

The demos source code can be found on the Timing Framework project site and on Aerith web page.

NOTE: If you were at my presentation, you haven't seen all the demo because of that @!# bug with Apple's VM and dual screen displays. You can take a look at the screenshots and videos to discover what you have missed. I am deeply sorry for this inconvenience (and thanks to Joshua Marinacci I know now the work around to avoid that bug :) Just come to JavaPolis in december and I'll show it to you again ;-)

Enjoy!




JavaPolis guys rock!

Wed, 13 Sep 2006 19:34:15 -0400

JavaPolis is an excellent Belgian Java conference. Even better, the organizers have a wonderful sense of humor. I can only encourage you to watch this year's video advertisement. Beware, it's not for the faint of heart! Oh, and digg it!




JavaZone 2006

Wed, 13 Sep 2006 19:20:25 -0400

It's great :)