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
@Grab('org.codehaus.groovyfx:groovyfx:0.1') | |
import groovyx.javafx.GroovyFX | |
import groovyx.javafx.SceneGraphBuilder | |
GroovyFX.start { | |
def sg = new SceneGraphBuilder() | |
sg.stage(title: "GroovyFX Hello World", visible: true) { | |
scene(fill: black, width: 530, height: 300) { |
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
apply plugin:'groovy' | |
javafxHome = System.env['JAVAFX_HOME'] | |
repositories { mavenCentral() } | |
dependencies { | |
groovy 'org.codehaus.groovy:groovy-all:1.8.2' | |
compile 'org.codehaus.groovyfx:groovyfx:0.1' | |
compile files("${javafxHome}/rt/lib/jfxrt.jar") |
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 static groovyx.javafx.GroovyFX.start | |
start { | |
stage(title: "GroovyFX Hello World", visible: true) { | |
scene(fill: black, width: 530, height: 300) { | |
hbox(padding: 80) { | |
text(text: "Groovy", style: "-fx-font-size: 80pt") { | |
fill linearGradient(endX: 0, stops: [palegreen, seagreen]) | |
} | |
text(text: "FX", style: "-fx-font-size: 80pt") { |
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
apply plugin:'groovy' | |
javafxHome = System.env['JAVAFX_HOME'] | |
repositories { | |
mavenCentral() | |
maven { | |
url "https://oss.sonatype.org/content/groups/public" | |
} | |
} |
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
repositories { | |
mavenCentral() | |
maven { | |
url "https://oss.sonatype.org/content/groups/public" | |
} | |
} | |
dependencies { | |
groovy 'org.codehaus.groovy:groovy-all:1.8.2' | |
compile 'org.codehaus.groovyfx:groovyfx:0.2-SNAPSHOT' |
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
@GrabResolver(name='groovyfx', root='https://oss.sonatype.org/content/groups/public') | |
@Grab('org.codehaus.groovyfx:groovyfx:0.2-SNAPSHOT') | |
import static groovyx.javafx.GroovyFX.start | |
import javafx.stage.DirectoryChooser | |
start { | |
stage(title: "DirectoryChooser Test", visible: true) { | |
scene(fill: black, width: 530, height: 300) { | |
stackPane { |
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
apply plugin:'groovy' | |
project.ext.set('javafxHome', System.env['JAVAFX_HOME'] | |
repositories { mavenCentral() } | |
dependencies { | |
groovy 'org.codehaus.groovy:groovy-all:1.8.6' | |
compile 'org.codehaus.groovyfx:groovyfx:0.4.0' | |
compile files("${javafxHome}/rt/lib/jfxrt.jar") |