Archives for the month of: December, 2009

With Christmas behind us and new years to look forward to, I’m surprised by the amount of news coming out this week. In the interests of brevity (I’m sure most of us have holidays to enjoy), let’s get straight into it.

Catch you in the new year. Have a great new years party and try to step away from the computer for a bit :-)

As Richard mentioned recently, he had the honor to be the first official speaker at the first JavaFX user group meeting. You can read the slides from this presentation, and now I have decided to post the video here for those of you wanting to watch it but may have missed the live streaming.

Next up on January 13 is Amy Fowler, who will be talking about layout secrets in JavaFX. Note that this presentation is not at Google – this time it is being held at Sun. As with the first talk, you can also watch the presentation live, and participate both in the chat room, and also pose questions that may be answered by Amy at the talk.

Here we go again with another week of the best and most important JavaFX links that we could find on the net. We hope you enjoy, and find them useful.

  • After a successful first presentation with Richard Bair at the Silicon Valley JavaFX users group, next up to bat is Amy Fowler. She’ll be presenting about layout secrets in JavaFX on January 13. Note that the venue has changed – it is now being hosted at Sun. As with the first presentation, you don’t have to be physically in California to attend – video is broadcast live, and there is an associated chat room. You can find me, as well as a number of other JavaFX developers, in there during the presentation.
  • This week a preview release of the JavaFX Composer / Designer plugin was released for NetBeans. Overall peoples reactions are positive, with the only complaints seemingly coming from people expecting this release to be final and / or fix all issues related to JavaFX.
  • If Eclipse is more your scene, check out the early progress on a visual designer for Eclipse, which is being developed by Exadel.
  • Dean Iverson posted a very interesting article investigating how to create custom controls in JavaFX, making use of Caspian code for colors and state transitions  (i.e. subtle animations). The only downside is that we’ve changed how things work for JavaFX 1.3, which should make this kind of thing much easier.
  • Congratulations goes to Jeff Frieson for winning the latest JavaFX coding competition. This months theme was ‘holiday’, and you can see the winning entry at JFXStudio. Next months competition will be announced on new years day.
  • Speaking of Jeff, he has posted an article discussing how to play with perspectives in JavaFX to attain various effects. You can also find a lot more of this kind of material in the ‘Pro JavaFX Platform’ book published a few months ago.
  • If you’re wanting to display PDF’s from within JavaFX, today’s your luck day, as JPedalFX is a LGPL-licensed JavaFX PDF viewer. I’m not sure what is going on under the hood, but I’m guessing it’s probably a wrapper around a Swing-based PDF viewer. Please, correct me if I’m wrong, but just keep in mind that this limits the portability of your JavaFX app (both to mobile/tv devices, as well as to the prism graphics stack).

Catch you all again next week.

Duke SnowGlobe

One of the gratifying things about being involved in building a new platform on top of a new language is discovering new language idioms. As an industry we’d managed to put together quite a long list of patterns and best practices for Java, but since JavaFX introduces some new concepts (such as object literal notation) and makes other things really easy to do (binding, closures) it creates an environment where we need to discover the best practices and patterns that make for effective programming in JavaFX.

One such idiom has to do with encapsulation. I was presented with the following problem in a recent email. The developer wanted to create a chunk of scenegraph which looked differently depending on some flag. There would be 10 such flags with 10 such chunks of scenegraph. (more…)

Dean Iverson has just now blogged about creating custom Caspian controls in JavaFX. As soon as I saw his link run up on Twitter I fired it around my team mates in the JavaFX controls team (yes, we’re still working, and in fact we’re all working precisely on what Dean is talking about). We all like what he is doing, and with JavaFX 1.3 coming up we hope to make this kind of thing far easier.

CaspianColors

From Deans blog post:

Creating custom controls in JavaFX is not difficult. Creating custom controls that fit nicely with the default Caspian theme, with its pervasive use of gradients and animation, is a little trickier. This is only because the utility classes and methods that make it simple lie buried within com.sun packages that are not publicly documented. A little digging reveals a few gems that can be used to make your controls fit right in with the core JavaFX controls.

So, if you’re keen right now to create great looking skins in JavaFX using the Caspian technology that shipped in JavaFX 1.2, give Deans blog post a read.

Welcome back to JavaFX links of the week. There have been a few interesting bits of news this week, so let’s get right into it.

That’s us for another week. If you know of any JavaFX news that you think is worthy of being included here, please email me and let me know. Catch you all in a weeks time!

Some really great news I’ve had to keep under my hat for the past few months is that the Vancouver Olympics website has chosen JavaFX for a really cool visualization. It is an exceptionally well done application with stunning UI and does a terrific job showing off the potential of JavaFX in data visualization scenarios.

Vancouver Olympics JavaFX Application

Vancouver Olympics JavaFX Application

Go and check out the application running live. It has data going back many years showing how many metals were won by different countries over time, which athletes won which metals, and so on. It is built and delivered on the publicly shipping release of JavaFX. Really exciting for JavaFX!

I had the honor to be the first official speaker at the first JavaFX user group meeting (of which I am aware!). The Silicon Valley JavaFX JUG, organized by Stephen Chin (one of the authors of Pro JavaFX, which is an excellent book), met this past Wednesday. Google hosted the event and supplied the evening’s pizza, for which I am personally very grateful!

PDF Version

Stephen had setup a streaming feed so people not in the area could follow along, which I thought was really cool. Its always fun to present about JavaFX as it is something I’m passionately interested in. Yes, working on JavaFX is my day job, but if I didn’t really love it and believe in it I wouldn’t be doing it. The thing that energizes me is knowing both what it is that we have built, and what we are building. It is really a fantastic platform. Its a joy to use when building applications and getting better all the time.

Stuart Marks has written up part II of the three-part series on the scenegraph warning message that you have seen in JavaFX1.2. I covered and linked to the first version previously. It really is a terrific read, and details some of the subtle semantics of bind. Stuart always does such an excellent job describing these subtle issues.

In my earlier post on this topic I hinted that we had found a resolution to the issue surrounding the warning message, I hinted further in some of my replies to comments, and I even left it as sort of a cliffhanger as to what the resolution was. So, here’s the resolution.

We’ve decided that when a node is added to a group, that node is automatically removed from the group that previously owned it, if any. (Let’s call this the “auto-remove” feature.) We’ve also decided to turn off the warning message by default, but to have it be enabled optionally, possibly via a system property, for debugging purposes. Finally, we’ve relaxed the enforcement of some scene graph invariants in cases where the group’s content sequence is bound.

During the development of our current release, we kept running into this issue. A couple of us wrote code that we thought was reasonable, yet it surprised us when the warning message came out! We had a few hallway conversations from time to time, but a clear-cut answer never emerged. Finally, we realized that we had to get the interested parties in a room and have a knock-down, drag-out meeting to resolve the issue. And so on October 7, 2009, Amy Fowler, Kevin Rushforth, Richard Bair, and I got into a conference room to decide the issue. Three hours later — with no breaks! — we had decided. Actually, it was a great meeting, without a lot of conflict. There were just a lot of issues to cover. Each of us came into the meeting with our initial opinions, but the issues were so close that I think each one of us switched sides at least once during the meeting.