Skip to end of metadata
Go to start of metadata

FxBuilder is a Groovy builder that wraps the JavaFX Script API

Description

Warning

Icon

This project is no longer supported as JavaFX Script has been abandoned by Oracle since 2010.

FxBuilder is a Groovy builder that wraps the JavaFX Script API, allowing you to embed JavaFX content into a Swing application. You can mix & match it with other SwingBuilder based builders.

Download

fxbuilder-0.2

Installing

Drop fxbuilder-0.2 into $GROOVY_HOME/lib along with its dependencies

All these dependencies (except the JavaFX SDK) can be downloaded from this directory too.

Warning

Icon

FxBuilder requires that you have a working installation of JavaFX SDK 1.2.1, you need to be responsible for setting up the classpath properly. Make sure to skip $JAVAFX_HOME/lib/desktop/rt15.jar if working with jdk6.

Pre-requisites

Groovy 1.6.0 is the required minimum version to run FxBuilder 0.2
It is recommended that you upgrade to the 1.6.x series in order to take advantage of

  • @Bindable and ASTTransformations
  • short binding syntax
  • numerous enhancements made to SwingBuilder and FactoryBuilderSupport

Documentation

Most of the JavaFX Script 1.2 code you see out there can be reimplemented in Groovy using FxBuilder, with some minor adjustments. The following JavaFX Script application

can be rewritten with FxBuilder like this

Notice the following changes:

  • FxBuilder uses map notation instead of object literals
  • the scene instance is automatically attached to it's parent: the stage
  • the scene's content is automatically attached to it's parent, no need to define a content: property or node.

Additionally you can:

  • set a Groovy closure anywhere a JavaFX Script function can be set
  • set a Groovy List anywhere a JavaFX Script Sequence can be set
  • content: property is automatically assumed given the build context, works on group() too.
  • any Swing component will be automatically wrapped via SwingComponent.wrap()
  • you can embed a JavaFX Scene in a JPanel (or any other Swing component) using the swingScene() node.

Developers

Andres Almiray

Source Control

http://svn.codehaus.org/griffon/builders/fxbuilder

Building

FxBuilder uses Ant as its build tool, which means that if you want to
build your own version of FxBuilder from source you'll need to have it
installed. Follow the instructions at http://ant.apache.org

Contributing

Please contact the Griffon team members by e-mail.

Community

Mailing List(s)

http://griffon.codehaus.org/Mailing+Lists

Issue tracker

http://jira.codehaus.org/browse/GRIFFON

  • No labels