Created
February 12, 2013 01:29
-
-
Save edubkendo/4759296 to your computer and use it in GitHub Desktop.
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
require "jrubyfx" | |
# taken from https://github.com/jruby/jrubyfx/blob/master/samples/javafx/hello_devoxx.rb | |
class Hello < JRubyFX::Application | |
def start(stage) | |
with(stage, title: "Hello JRuby", x: 105, y: 140) do | |
stage.layout_scene(500, 250, :black) do | |
hbox(padding: insets(60)) do | |
text('JRuby', font: font('sanserif', 80)) do | |
fill linear_gradient(0,0,0,1, true, :no_cycle, [stop(0, :pale_green), stop(1, :sea_green)]) | |
end | |
text('FX', font: font('sanserif', 80)) do | |
fill linear_gradient(0,0,0,1, true, :no_cycle, [stop(0, :cyan), stop(1, :dodger_blue)]) | |
set_effect(drop_shadow(color: :dodger_blue, radius: 25,spread: 0.25)) | |
end | |
end | |
end | |
show | |
end | |
end | |
end | |
Hello.launch |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment