Created
April 2, 2017 10:09
-
-
Save jagedn/3ebc5a11f16743c7362b836827ffe3ce to your computer and use it in GitHub Desktop.
groovyfx as script
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import groovy.grape.Grape | |
new javafx.embed.swing.JFXPanel(); | |
Grape.grab(group:'org.groovyfx',module:'groovyfx',version:'8.0.0',transitive:false) | |
Class.forName('groovyx.javafx.GroovyFX').start { | |
stage(title: 'GroovyFX Hello World', visible: true) { | |
scene(fill: BLACK, width: 500, height: 250) { | |
hbox() { | |
text(text: 'Groovy', font: '80pt sanserif') { | |
fill linearGradient(endX: 0, stops: [PALEGREEN, SEAGREEN]) | |
} | |
text(text: 'FX', font: '80pt sanserif') { | |
fill linearGradient(endX: 0, stops: [CYAN, DODGERBLUE]) | |
effect dropShadow(color: DODGERBLUE, radius: 25, spread: 0.25) | |
} | |
} | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment