jrubyfx
jrubyfx copied to clipboard
JavaFX JRuby binding
```ruby java_import Java::javafx.beans.binding.StringBinding class RubyStringBinding < StringBinding def initialize(property:, method:) super() @property, @method = property, method bind @property end def computeValue property_value = @property.get return unless property_value property_value.__send__ @method end...
gridPane=build(GridPane, hgap: GAP, vgap: GAP, alignment: Pos::CENTER, gridLinesVisible: false) gridPane.add(node, columnIndex: 0, rowIndex: 0, colspan: 2, rowspan: 1) # assigning a value to colspan dont change anything
Depending on where the jrubyfx gem is installed, common_converters.rb gets loaded twice. When the gem is installed in GEM_HOME along side the ruby installation, no warnings are issues. When installed...
In dsl.rb, the dsl_load method uses a glob to find the dsl files to load. This causes the load order to be somewhat random. If precompiled.rb is loaded after grid_pane.rb,...
``` @FXMLChart.axis_sorting_policy = :x_axis ``` fails with "can't convert symbol" as described in the wiki This workaround works: ``` @FXMLChart.axis_sorting_policy = LineChart::SortingPolicy::X_AXIS ```
I have a custom control for charts in https://github.com/pilhuhn/hawkfx which displays and works nicely on the first invocation. When I stop and restart the program, a part of the custom...
I add support for add for TabPane in exts.yml: `````` yml "Java::JavafxSceneControl::TabPane": logical_children: tabs method_missing: "Java::JavafxSceneControl::Tab" add: get_tabs `` Then if I call a program like this: ```ruby #!/usr/bin/env jruby...
``` ruby class Java::JavafxSceneControl::ScrollPane include JRubyFX::DSL def hbar_policy=(rbenum) java_send "setHbarPolicy", [Java::JavafxSceneControl::ScrollBarPolicy], JRubyFX::Utils::CommonConverters.parse_ruby_symbols(rbenum, Java::JavafxSceneControl::ScrollBarPolicy) end ``` is wrong, Java::JavafxSceneControl::ScrollBarPolicy => Java::JavafxSceneControl::ScrollPane::ScrollBarPolicy
https://bitbucket.org/byteit101/sfx/src/2c438b7d240b73ae9a4aad0de0d964983059393a/lib/designer.rb?at=default#cl-32 parsing https://bitbucket.org/byteit101/sfx/src/2c438b7d240b73ae9a4aad0de0d964983059393a/lib/res/SFX.fxml?at=default
I cannot seem to run either of the fxml sample programs in my environment. Having difficulty determining if this is environmental (developing on Linux Mint on an AMD64), Jave related...