Class: JRubyFX::Application
- Inherits:
-
Object
- Object
- JRubyFX::Application
- Defined in:
- lib/jrubyfx/application.rb
Overview
Inherit from this class for FXML Applications. You must use this class for both raw JavaFX and FXML as it contains the launch method.
Direct Known Subclasses
Constant Summary
Constants included from DSL
DSL::NAME_TO_CLASSES, DSL::NAME_TO_CLASS_NAME
Constants included from FXImports
FXImports::JFX_CLASS_HIERARCHY, FXImports::LOCAL_NAME_MAP
Constants included from JRubyFX
Class Method Summary collapse
-
.in_jar? ⇒ Boolean
Are we packaged in a jar? This does some comparison, and may get false positives and, if jruby changes, false negatives.
-
.launch(*args) ⇒ Object
call-seq: launch().
Methods included from DSL
compile_dsl, included, load_dsl, #logical_lookup, #method_missing, #self_test_lookup, write_color_method_converter, write_enum_converter, write_enum_method_converter, write_event_method
Methods included from FXImports
Methods included from JRubyFX
#build, included, load_fx, #run_later, #with
Methods included from Utils::CommonUtils
#attempt_conversion, #populate_properties, #split_args_from_properties
Dynamic Method Handling
This class handles dynamic methods through the method_missing method in the class JRubyFX::DSL
Class Method Details
.in_jar? ⇒ Boolean
Are we packaged in a jar? This does some comparison, and may get false positives and, if jruby changes, false negatives. If you are using this, it might be a very bad idea… (though it is handy)
29 30 31 |
# File 'lib/jrubyfx/application.rb', line 29 def self.in_jar?() $LOAD_PATH.inject(false) { |res,i| res || i.include?("/META-INF/jruby.home/lib/ruby/")} end |
.launch(*args) ⇒ Object
call-seq:
launch()
When called on a subclass, this is effectively our main method.
38 39 40 41 |
# File 'lib/jrubyfx/application.rb', line 38 def self.launch(*args) #call our custom launcher to avoid a java shim JavaFXImpl::Launcher.launch_app(self, *args) end |