Some Perspective in JavaFX
I've been asked to post the slides for the JavaFX presentation that I delivered at JavaZone 2008. Because the presentation itself was written in JavaFX, I've bundled it up so that you can run it from a Java Web Start link. First, however, I'd like to show you some screenshots and provide an explanation of what you'll be looking at:
As shown above, the presentation (entitled Vikings and Wizards in JavaFX) is shown on the faces of a rotating cube. The Norwegian Java Users Group, named javaBin, does a great job in organizing the JavaZone conference, which also explains the graphics on the first "slide".
To view the next or previous slide, you can click the image buttons that have a right or left pointing triangle, respectively. This will rotate the cube, which is accomplished using the PerspectiveTransform effect, located in the javafx.scene.effect package.
Some of the slides are "live" (running JavaFX functionality within them). For example, you can interact with the TetrixJFX game, the "Are You A Viking" wizard, the custom node examples (MenuNode and DeckNode), and the morphing example. For the latter, just click on the yellow circle and watch the morphing begin! To see more information about these applications, visit the blog posts for TetrisJFX, Vikings and Wizards, Rolling Your Own Custom Nodes, and Getting Decked
By the way, the presentation runs in an undecorated Frame, which means that there is no border, Close box, etc. I make my desktop background black and minimize any open windows before presenting so that the cube appears to be rotating in a big dark space. As soon as the graphics designer (Mark Dingman of Malden Labs) gets a chance to create a cool looking graphical Close box, I'll put it in the application. For now, however, you'll have to end the application manually. You'll need JRE 6 to run this, and Java SE 6 update 10 will give you a faster deployment experience. Go ahead and give it a whirl by clicking the Java Web Start button below!
Note: Please keep in mind that this is running with the JavaFX Preview SDK which has not been optimized for performance. Behavior and performance of the PerspectiveTransform on Vista, for example, are definitely sub-optimal at the moment. These are known issues that the JavaFX GUI team is confident have already been corrected in the upcoming JavaFX SDK 1.0 release.
Regards,
Jim Weaver
JavaFXpert.com
- Login or register to post comments
- 3430 reads
- Printer-friendly version
(Note: Opinions expressed in this article and its replies are the opinions of their respective authors and not those of DZone, Inc.)




Comments
Mike P(Okidoky) replied on Tue, 2008/10/07 - 10:44am
How *DO* you work with your graphic designer? In my opinion all this JavaFX code was, is, and always will be useless to a graphic designer.
As for JavaFX scripting language, Sun is trying to shove a new language under our noses, and I think it's not going to work.
ff aaa replied on Tue, 2008/10/07 - 1:14pm
in response to: okidoky
Mike P(Okidoky) replied on Tue, 2008/10/07 - 1:34pm
in response to: afsina
ff aaa replied on Tue, 2008/10/07 - 1:45pm
in response to: okidoky
Mike P(Okidoky) replied on Tue, 2008/10/07 - 2:33pm
in response to: afsina
I doubt that bridge will ever be made. The wysiwyg tools in JavaFX won't ever happen, because JavaFX is too code oriented. The design flaw I believe is that it doesn't seperate design from implementation. Same mistake as most other technologies, like jsp, php, etc
I also don't see how any "plugin" for Illustrator can work.
The worry-about-it-later attitude will be fatal, mark my words.
ff aaa replied on Tue, 2008/10/07 - 3:05pm
in response to: okidoky
Mike P(Okidoky) replied on Tue, 2008/10/07 - 4:12pm
in response to: afsina
Separation between design and content. What a designer delivers, should not need any code injections.
Ideally, we (programmers) should load the Illustrator (or SVG) file, and our code should look for id's and places in the hierarchy and programmatically make changes to it. They key is that designers should never ever see proprietary code. Most certainly not ever JavaFX code intermingled with code that expresses shapes.
Martin Brehovsky replied on Tue, 2008/10/07 - 6:56pm
in response to: okidoky
Please take a look at Project Nile. This project tries to achive exactly what you are talking about - a collaboration between a designer and a developer by defining files belonging to the designer (the graphics assets in form of FXD fiels) and files belonging to the developer (FX source code) and an interface connecting them together (an FX class).
You can take a look at this simple tutorial to get more information http://java.sun.com/javafx/tutorials/project_nile_integrating_graphics/