Skip to content
A plugin for creating JavaFX applications with the Griffon framework.
Java Groovy Shell
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Failed to load latest commit information.
.gitignore Update JavaFXApplication and editors with latest changes from Griffon… Mar 25, 2013
JavafxGriffonPlugin.groovy GRIFFON-670 initial arguments were not sent to the application instance Jun 24, 2014

Griffon JavaFX Plugin

Plugin page:

Allows writing Griffon JavaFX applications using GroovyFX for the views.

This plugin assumes the existence of JavaFX on the developer's computer. The environment variable JAVAFX_HOME should point to the root directory of the JavaFX SDK installation.


Once installed, you can use any of the nodes provided by GroovyFX in your views. GroovyFX documentation can be found here and JavaFX documentation can be found here. In addition, you will be able to use the @FXBindable annotation on your models.

Property Editors

This plugin contributes the following property editors

Type Format
javafx.scene.paint.Color #RGB ; #RGBA ; #RRGGBB; #RRGGBBAA ; Color constant
javafx.geometry.Dimension2D width, height
javafx.scene.image.Image path/to/image_file
javafx.geometry.Insets top, left, bottom, right
javafx.geometry.Point2D x, y
javafx.geometry.Rectangle2D x, y , width, height


  • Color supports all color constants defined by javafx.scene.paint.Color.

Default Imports

This plugin enables additional imports to be used in Groovy based artifacts. Here's the full list per type

  • Controller
    • javafx.collections
    • javafx.application
    • javafx.util
  • Model
    • javafx.collections
    • javafx.beans
    • javafx.beans.binding
    • javafx.util.
    • groovyx.javafx.beans.
  • View
    • javafx.collections
    • javafx.concurrent
    • javafx.event
    • javafx.geometry
    • javafx.scene
    • javafx.scene.chart
    • javafx.scene.control
    • javafx.scene.control.cell
    • javafx.scene.effect
    • javafx.scene.image
    • javafx.scene.input
    • javafx.scene.layout
    • javafx.scene.paint
    • javafx.scene.shape
    • javafx.scene.text
    • javafx.scene.transform
    • javafx.scene.web
    • javafx.stage
    • javafx.util


Your main application's view might look like this (in fact it will look very similar if you create your application with the JavaFX archetype):

application(title: 'Cool App', sizeToScene: true, centerOnScreen: true) {
    scene(fill: black, width: 400, height: 300) {
        hbox(padding: 80) {
            text(text: "Java", font: "80pt sanserif") {
                fill linearGradient(endX: 0, stops: [[0, orange], [1, chocolate]])
            text(text: "FX", font: "80pt sanserif") {
                fill linearGradient(endX: 0, stops: [[0, cyan], [1, dodgerblue]])
                effect dropShadow(color: dodgerblue, radius: 25, spread: 0.25)
Something went wrong with that request. Please try again.