For anyone not familiar with JRubyFX, check it out. The tl;dr is that JRubyFX allows you to harness the power of 3 things:
Really, JRubyFX is the glue that binds JRuby with JavaFX. And I love it. Love it.
Now what is JavaFX? JavaFX is the GUI toolkit that is meant to entirely replace the old, hideous Java thick client applications. While it doesn’t look entirely native, it really does go a long way (compared to swing). Because we are writing ruby, the code is just so expressive and easy to understand (actual Brakeman Pro code):
So what’s going on here?
text()creates a text element, one of the most basic controls. Guess what it does?
text(), we add a style_class. JavaFX has a CSS-like language to style things as you would a website. The code inside the block is implicitly called on the newly created object.
drawerwhich is just an element that will essentially wrap everything in the end.
textobjects and throw them into a
vboxis just a control that will position it’s children elements in a vertical sequential list.
So that’s the high level overview, hopefully this will serve as a good post for future JRubyFX related posts.