Last active
December 10, 2015 15:08
-
-
Save timyates/4452122 to your computer and use it in GitHub Desktop.
GroovyFX code I got running on the Raspberry PI
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
export JAVA_HOME=/usr/local/java | |
export JAVAFX_HOME=$JAVA_HOME/jre/lib | |
export PATH=$JAVA_HOME/bin:$PATH |
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
git clone git://github.com/groovyfx-project/groovyfx.git | |
cd groovyfx |
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
groovy -cp groovyfx-0.4.0-SNAPSHOT.jar:$JAVAFX_HOME/jfxrt.jar:. -Djavafx.platform=eglfb text.groovy |
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
framebuffer_width=1280 | |
framebuffer_height=720 |
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
./gradlew assemble |
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
# unpack java | |
tar vxfz jdk-8-ea-b36e-linux-arm-hflt-29_nov_2012.tar.gz | |
# move it to /usr/local | |
sudo mv jdk1.8.0 /usr/local | |
cd /usr/local | |
# create a link to it | |
sudo ln -s jdk1.8.0 java |
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 groovyx.javafx.GroovyFX | |
import javafx.scene.input.KeyCode | |
import javafx.application.Platform | |
GroovyFX.start { | |
stage(title: "GroovyFX Hello World", visible: true) { | |
scene(fill: black, width: 1280, height: 720) { | |
onKeyPressed { event -> | |
if (event.getCode() == KeyCode.ESCAPE) { | |
Platform.exit(); | |
} | |
} | |
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") { | |
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