As part of my Java Builders project (in particular the Java SwingBuilder) I am introducing powerful declarative UI building to pure Java using a separate YAML file to define all the layout, data binding, event wiring, layout management, etc., thus saving the Java programmer countless lines of boring, repetitive code.
As part of this effort I would also like to integrate Project Scenegraph:
https://scenegraph.dev.java.net/
which is the underlying engine behind most of JavaFX's power, but available in pure Java.
Unfortunately, Scenegraph is one of the most poorly documented OSS projects out there, despite its importance. It has some minimal FAQ, some slides with API examples that are out of date compared to the latest download, etc, etc. In short it's really hard to understand all the functionality this engine provides without spending countless hours trying every little piece.
Hours, which unfortunately, I do not have. But, if someone were willing to chip in and do the Scenegraph research and document clearly:
- how do I add components to a scene?
- how do you handle effects? how do you chain them together?
- how do you handle animations? how do you define them? how do you transition from one state to another?
- how do you do layout management for components within a scene?
then armed with that documentation I could integrate it into the Java SwingBuilder.
Thus we would have a tool that would have all the power of JavaFX (and more), but available to pure Java...actually available to any VM language that generates Java-compatible classes. We could do RIAs without being forced to go to a different language, especially one such as JavaFX with some very questionable design choices.
Please use the thread on our discussion group to post any findings:
http://groups.google.com/group/javabuilders/browse_thread/thread/f5b006b83dee6431?hl=en
Thank you very much in advance to anyone who is willing to contribute and participate (and maybe submit some working code samples). It will be very much appreciated.
Cheers, Jacek
LICENSE
P.S. Danno Ferrin has brought up the interesting issue of Scenegraph licensing, which right now is GPL v2 only (the license is pretty hidden, not mentioned on the site, youhave to open the actual source code to see it). This means it is illegal to use it in any non-GPL project (including mine, since I use Apache 2.0)
I started a thread on this in the Scenegraph forum, let's see what the Sun guys have to say:
http://forums.java.net/jive/thread.jspa?threadID=41965&tstart=0
Wednesday, June 04, 2008
Subscribe to:
Post Comments (Atom)

4 comments:
I'de make sure you can stomach the license first. It's straight GPL v2, no classpath exception, no exemptions. Not even LGPL, you cannot just isolate it to a Jar like the MPL would let you. So if you write glue code, you will have to release the glue code under GPL, and anything you write that uses that glue code, must be released uner a GPL license, etc. etc. (Assuming Sun chooses to sue you over it). Open JDK is GPL, but they have the classpath exception, which firewalls changes to the source code and is not commutable via jar files.
This is why I haven't looked into doing it for the Groovy SwingBuilder. I am hoping that they add a more friendly license when they release the SDK, such as adding the classpath exception.
Interesting. I will look into that
Just gave scenegraph a really quick spin. Are you still interested in this?
I used the scenegraph.jar that came with javafx sdk, not the 0.6 one which is the last version currently published in the project page.
Here's what I came up with. It's a pretty basic example of how to add a node to a scene.
import java.awt.geom.Point2D;
import javax.swing.JFrame;
import javax.swing.SwingUtilities;
import com.sun.scenario.scenegraph.JSGPanel;
import com.sun.scenario.scenegraph.SGGroup;
import com.sun.scenario.scenegraph.fx.FXText;
public class Scenario101 implements Runnable {
/**
* @param args
*/
public static void main(String[] args) {
SwingUtilities.invokeLater(new Scenario101());
}
public Scenario101() {
//
}
@Override
public void run() {
this.frame = new JFrame();
this.panel = new JSGPanel();
this.text = new FXText();
frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
frame.setTitle("Olá mundo");
frame.add(this.panel);
frame.setContentPane(this.panel);
scene = new SGGroup();
this.text.setText("Olá mundo");
this.text.setLocation(new Point2D.Float(10, 10));
this.scene.add(this.text);
this.panel.setScene(scene);
frame.pack();
frame.setLocationByPlatform(true);
frame.setVisible(true);
}
private JFrame frame;
private JSGPanel panel;
private SGGroup scene;
private FXText text;
}
You will get a beautiful cloth which in the game if we want to need the beautiful cloth, we can use our own Scions Of Fate gold to buy. The one I owned on my character is one of my friends sent to me the necessary SOF gold. Sometimes we can share the trophy as the necessary Scions Of Fate money together, and we do quest together. I do not have enough confidence and cheap SOF gold about my weak memory. First I have to buy sof gold to improve my pet which I have a lovely leopard in this game.
Post a Comment