Jim has posted 66 posts at DZone. You can read more from them at their website. View Full User Profile

Radar Love: JavaFX Animation Examples by Sven

07.11.2008
| 6851 views |
  • submit to reddit

You may recall that I've featured some of Sven Drieling's work previously in this blog, for example in the JavaFX Animation - Some of Sven's Canvas Tricks post. Well, Sven has updated his animation examples and added to the collection to help us prepare for the JavaFX SDK. Here's a screenshot of Sven's AnimationRadar example, in which he animates an arc-shaped clip of an image to look like the sweep of a radar. Because it's an animation, the running program looks cooler than the static screenshot. :-)

Animationradar

In another example, Sven uses nested Timelines to progressively start three blocks animating. Here's a screenshot:

Nestedtimelines

Take a look at the page in which Sven stashes his many animation examples, and try out the examples via Java Web Start links on that page while studying his great code.

Thanks Sven!
Jim Weaver

Published at DZone with permission of its author, Jim Weaver.

(Note: Opinions expressed in this article and its replies are the opinions of their respective authors and not those of DZone, Inc.)

Comments

Jacek Furmankiewicz replied on Fri, 2008/07/11 - 7:26am

Jim, quick question: how big is the JavaFX SDK? How much of it will be rolled into the basic JDK?

Considering the basic Flash install is < .5 MB or so (if I recall correctly), does it mean any JavaFX applet will have to first download a 5MB? 10MB? 20MB? runtime? (besides the initial Java runtime (or kernel) to begin with)?

Also, what is the status of Project Scenegraph? When is JavaFX switching from the current scenegraph to the new one?

 

Jim Weaver replied on Fri, 2008/07/11 - 1:04pm in response to: Jacek Furmankiewicz

Jacek,

The JavaFX runtime files and sizes are the following in Pack200 format which, if you're running Java SE 6 update 10, will be used if available:

  • javafxgui.jar.pack.gz 594 KB (signed)
  • javafxrt.jar.pack.gz 124 KB (signed)
  • Scenario.jar.pack.gz 122 KB (signed)
  • javafx-swing.jar.pack.gz 54 KB (signed)

This is a total of roughly 894 KB

If you're *not* running Java SE 6 update 10 (but rather just JRE 6), the JAR files will be downloaded instead:

  • javafxgui.jar 3280 KB (signed)
  • javafxrt.jar 524 KB (signed)
  • Scenario.jar 473 KB (signed)
  • javafx-swing.jar 339 KB (signed)

This is a total of roughly 4615 KB

To try this out, click this Java Web Start link for the very simple StageExample program, which by the way is 4 KB in Pack200 format and signed.  This example is described in the Setting the "Stage" for the JavaFX SDK post.

By the way, if I understand correctly, the JavaFX runtime libraries will eventually be part of the JRE distribution, which will be automatically updated on the client machine as the libraries are updated.  HTH, Jacek!

Jim Weaver

Jacek Furmankiewicz replied on Fri, 2008/07/11 - 1:13pm in response to: Jim Weaver

Now that is pretty good, I have to admit 900KB is pretty impressive.

BTW, Scenario.jar refers to Project Scenegraph, correct?

Are you aware of the fact that currently that project is under a GPL-only license (no classpath exception) which makes it impossible to use on any commercial project, see here:

http://forums.java.net/jive/thread.jspa?threadID=41965&tstart=0

I really would appreciate if you guys made the effort to post the same samples in non-JavaFX languages (Java for starters of course, but I am sure some Groovy or JRuby guys would be also happy to see they can use this API in their apps). 

I tried using Project Scenegraph in pure Java a while ago, but without hardly any up-to-date docs or higher level APIs, it was quite a daunting task.

Jim Weaver replied on Fri, 2008/07/11 - 2:10pm in response to: Jacek Furmankiewicz

Are you aware of the fact that currently that project is under a GPL-only license (no classpath exception)  ...

On the Scenario license question, per Jonathan Schwartz' blog entry on the subjects of JavaFX and open software, I have to believe that the licensing issues will be in that spirit by the time Sun releases a version of JavaFX that they deem ready for production applications.

I really would appreciate if you guys made the effort to post the same samples in non-JavaFX languages (Java for starters of course, but I am sure some Groovy or JRuby guys would be also happy to see they can use this API in their apps). 

Yes, that would be nice.  I wonder if Andres Almiray (Groovy DZone leader, and Groovy graphics guru) has posted or moderated posts like that on Groovy Zone?  Focusing on JavaFX has been a pretty consuming thing for me, and I unfortunately haven't taken the time to explore Groovy or JRuby in-depth, other than what I've gleaned from listening to presentations by their respective luminaries.

Thanks again, Jacek, for all of your input and questions!

Jim Weaver

Jacek Furmankiewicz replied on Fri, 2008/07/11 - 2:16pm in response to: Jim Weaver

I'd be happy just for pure Java samples :-)

Comment viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.