WidgetFX 1.2 Beta Announcement

17 06 2009

Update: I have added in some references to WidgetFX 1.2 tutorials below.

We are proud to announce the 1.2 beta release of the WidgetFX framework.

Here are some of the new and noteworthy features and changes:

  1. JavaFX 1.2 Support – You can finally take advantage of all the new features of JavaFX 1.2, such as Controls, Layouts, and Charts in your desktop widgets!
  2. Built-in Layout – Widgets now have an onLayout() function that can be used to layout the top-level nodes.
  3. Improved Performance – The widget dock, as well as all widgets will benefit from performance improvements in the framework.
  4. Signed Widgets – Widgets can now be signed with certificates to get out of the sandbox and gain access to system resources. 
WidgetFX Info Dialog

WidgetFX Info Dialog

We will be adding more goodness before the official release, but wanted to get the major features implemented that would have API impacts on widget authors.  Any changes from this point will be API compatible with the final 1.2 release.

The beta version of the WidgetFX dock can be launched via the following URL:
http://widgetfx.org/beta/launch.jnlp

IMPORTANT: If you are an existing WidgetFX user, please delete your widget configuration prior to launching the new dock. This will ensure that the 1.2 versions of the built-in widgets will be loaded.  Your widget configuration directory is under $USER_HOME/.WidgetFX.

We will release the final WidgetFX 1.2 version at 11:59PM PST on June 28th.  If you have widgets that are available to the general public, please upgrade and test them in advance of this date, and push your 1.2 compatible widget out at approximately this time.  This is required, because the 1.2 release is not binary compatible with 1.1…  *sigh*

Upgrading an Existing Widget

So, you have a Widget that you would like to upgrade to 1.2 and don’t know where to start…  Here are the basics:

1. Upgrade to the latest beta version of the SDK.
You can pick up the beta SDK here: http://code.google.com/p/widgetfx/downloads/list

The SDK is setup to automatically launch the widget runner against the beta URL if you test your widget by running it as a Web Start application.  You can also use the following URL to directly invoke the beta widget runner:
http://widgetfx.org/beta/runner.jnlp?arg=http://url/to/your/widget.jnlp

In addition, if you use any JFXtras components in your project, make sure that you use the 0.5 beta JFXtras version that comes with the SDK.

2. Modify your widget to use the new content sequence.
The Widget base class now extends Panel rather than Skin. This was necessary to take advantage of layouts in JavaFX 1.2, but introduced a small API change. As an example, if you had the following code:

Widget {
    ...
    skin: Skin {
        scene: Group {
            content: xxx
        }
    }
}

This becomes:

Widget {
    ...
    content: xxx
}

Pretty nice, eh?

If you want to get adventurous, check out the Javafxdoc for Panel and make use of the layout features to improve your Widget code.

3. Upgrade the rest of your code to be JavaFX 1.2 compatible.
This is beyond the scope of this article, but I happen to know an excellent migration guide: http://steveonjava.com/2009/05/31/javafx-1-2-top-10/

4. Sign your widget.
If your widget invokes any operations that require access to resources outside the sandbox, you will need to sign it.  The easiest way to do this is to self-sign your widget, which the javafxpackager will automatically take care of for you.  The disadvantage is that since your widget can not be verified, you will get the mean yellow warning box:

WidgetFX Warning Dialog

WidgetFX Warning Dialog

If you put a little more effort in and sign up for a free trusted certificate service, such as Thawte Freemail, you can get a friendly blue information box instead (as shown at the top of this post).

Here are some very good instructions on how to sign your code using Thawte Freemail:
http://www.dallaway.com/acad/webstart/

I have also updated the Calendar tutorial to be WidgetFX 1.2 compatible:

http://steveonjava.com/2009/01/27/widgetfx-calendar-tutorial/

And Henry Zhang has updated his Pac-Man widget tutorial, which is an excellent example of how to convert a JavaFX 1.2 application into a widget with lots of details on the JNLP file format:

http://www.javafxgame.com/pac-man-widget-for-widgetfx-12/

Good luck developing on the WidgetFX 1.2 beta release, and don’t forget to enter the WidgetFX Developer Contest!

About these ads

Actions

Information

5 responses

17 06 2009
enthusiast

Would love to participate in the contest, but can’t find any tutorials/samples for 1.2. Where do you suggest I get started?

17 06 2009
Pär Dahlberg

I’m not sure since I’ve not have time to look into the 1.2 yet, but since the beta is released the included widgets are probably updated:

http://code.google.com/p/widgetfx/source/browse/#svn/trunk/widgets

17 06 2009
steveonjava

Like Pär said, all the built-in widgets have been updated (Clock, SlideShow, and WebFeed). In addition, I just finished updating the Calendar Widget Tutorial: http://steveonjava.com/2009/01/27/widgetfx-calendar-tutorial/

23 06 2009
enthusiast

Thanks. Will try out the samples.

16 07 2009
Java desktop links of the week, June 22 | Jonathan Giles

[…] Chin posts about the latest WidgetFX 1.2 beta, and how to go about updating a widget developed against an older […]

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s




Follow

Get every new post delivered to your Inbox.

%d bloggers like this: