JGUIraffe JavaFX Integration

This module implements the builder interfaces defined by the Core project using the Java FX platform. For this to work, the JavaFX library must be present on the class path.

In Maven projects this module can be added using the following dependencies:

  ...
  <!-- Import JGUIraffe BOM -->
  <dependencyManagement>
    <dependencies>
      <dependency>
        <groupId>net.sf.jguiraffe</groupId>
        <artifactId>jguiraffe-bom</artifactId>
        <version>1.3.1</version>
        <type>pom</type>
        <scope>import</scope>
      </dependency>
    </dependencies>
  </dependencyManagement>

  <dependencies>

    <dependency>
      <groupId>net.sf.jguiraffe</groupId>
      <artifactId>jguiraffe-java-fx</artifactId>
    </dependency>
    ...

Limitations

With Swing being the most popular UI platform for Java, the programming model of JGUIraffe has been mainly inspired by this library. JavaFX is in principle similar to Swing; therefore, in most cases, it was not too dificult to implement the abstractions of JGUIraffe on top of JavaFX. There is only one feature which is not available on JavaFX: desktop panes. A desktop pane was used in Swing to simulate application-level windows which could be dragged only within the limits of the application's desktop. JavaFX does not have a corresponding concept. Therefore, the method createDesktopPane() of the JavaFX-specific implementation of ComponentManager only throws an UnsupportedOperationException exception. Note that it is still possible to create internal frames; they are represented by plain JavaFX Stage objects.

JavaFX has rich support for special graphical effects. These are currently not supported by JGUIraffe. (They are special to JavaFX, and JGUIraffe aims to be a common denominator for UI platforms.) However, it is intended that later versions will provide specialized tags allowing to add effects to JavaFX UI elements in a declarative way.