Posted by shahbazc
on January 4, 2009 at 2:46 AM PST
In the scenario library, I'm not quite sure of the difference between *.scenegraph and *.scenegraph.fx packages. Each of them seem to share similar classes: SGNode, FXNode, etc.
According to this message: http://forums.java.net/jive/thread.jspa?threadID=39488 , java developers should probably use the FX classes. However, the fx packages doesn't include lines, circles, rectangles (which are in the sg package)...and FXShape, java.awt.Shape, and SGCircle (and other primitives in sg package) are not in a linear hierarchy. FXShape seems to work with java.awt.Shape, but SGShape doesn't derive from java.awt's Line2D. The api looks a little confused.
Also, looks like SG based primitives, such as SGLine don't have constructors which take relevant arguments. It looks like I have to instantiate it, then use setter methods. Is there a reason for this?
The scenario library delivered with JavaFX 1.0 seems quite different from the one at https://scenegraph.dev.java.net . Since JavaFX is already at 1.0, doesn't it make sense to update scenegraph.dev...?
In fact, it looks like there is little reason for a developer to work with java.awt.* for java 2d related programs. JavaFX's java based infrastructure provides a cleaner starting point. Any plans to do a blog on doing java 2d, the new way?