jrubyfx-master 1.1.1.8.19-java → 1.1.1.8.19.1-java
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/jrubyfx/core_ext/precompiled.rb +1883 -0
- data/lib/jrubyfx/dsl_map.rb +273 -0
- data/lib/jrubyfx/imports.rb +316 -0
- metadata +22 -19
@@ -0,0 +1,273 @@
|
|
1
|
+
=begin
|
2
|
+
JRubyFX - Write JavaFX and FXML in Ruby
|
3
|
+
Copyright (C) 2013 The JRubyFX Team
|
4
|
+
|
5
|
+
Licensed under the Apache License, Version 2.0 (the "License");
|
6
|
+
you may not use this file except in compliance with the License.
|
7
|
+
You may obtain a copy of the License at
|
8
|
+
|
9
|
+
http://www.apache.org/licenses/LICENSE-2.0
|
10
|
+
|
11
|
+
Unless required by applicable law or agreed to in writing, software
|
12
|
+
distributed under the License is distributed on an "AS IS" BASIS,
|
13
|
+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
14
|
+
See the License for the specific language governing permissions and
|
15
|
+
limitations under the License.
|
16
|
+
=end
|
17
|
+
|
18
|
+
# DO NOT MODIFY THIS FILE!
|
19
|
+
# This file is generated by the `rake reflect` task.
|
20
|
+
|
21
|
+
module JRubyFX
|
22
|
+
module DSL
|
23
|
+
NAME_TO_CLASSES = {
|
24
|
+
# Manual overrides
|
25
|
+
'observable_array_list' => proc { |*args| FXCollections.observable_array_list(*args) },
|
26
|
+
'double_property' => Java::JavafxBeansProperty::SimpleDoubleProperty,
|
27
|
+
'xy_chart_series' => Java::javafx.scene.chart.XYChart::Series,
|
28
|
+
'xy_chart_data' => Java::javafx.scene.chart.XYChart::Data,
|
29
|
+
# Automatically generated
|
30
|
+
}
|
31
|
+
NAME_TO_CLASS_NAME = {
|
32
|
+
'animation' => "Java::JavafxAnimation::Animation",
|
33
|
+
'animation_timer' => "Java::JavafxAnimation::AnimationTimer",
|
34
|
+
'fade_transition' => "Java::JavafxAnimation::FadeTransition",
|
35
|
+
'fill_transition' => "Java::JavafxAnimation::FillTransition",
|
36
|
+
'interpolator' => "Java::JavafxAnimation::Interpolator",
|
37
|
+
'key_frame' => "Java::JavafxAnimation::KeyFrame",
|
38
|
+
'key_value' => "Java::JavafxAnimation::KeyValue",
|
39
|
+
'parallel_transition' => "Java::JavafxAnimation::ParallelTransition",
|
40
|
+
'path_transition' => "Java::JavafxAnimation::PathTransition",
|
41
|
+
'pause_transition' => "Java::JavafxAnimation::PauseTransition",
|
42
|
+
'rotate_transition' => "Java::JavafxAnimation::RotateTransition",
|
43
|
+
'scale_transition' => "Java::JavafxAnimation::ScaleTransition",
|
44
|
+
'sequential_transition' => "Java::JavafxAnimation::SequentialTransition",
|
45
|
+
'stroke_transition' => "Java::JavafxAnimation::StrokeTransition",
|
46
|
+
'timeline' => "Java::JavafxAnimation::Timeline",
|
47
|
+
'transition' => "Java::JavafxAnimation::Transition",
|
48
|
+
'translate_transition' => "Java::JavafxAnimation::TranslateTransition",
|
49
|
+
'platform' => "Java::JavafxApplication::Platform",
|
50
|
+
'simple_boolean_property' => "Java::JavafxBeansProperty::SimpleBooleanProperty",
|
51
|
+
'simple_double_property' => "Java::JavafxBeansProperty::SimpleDoubleProperty",
|
52
|
+
'simple_float_property' => "Java::JavafxBeansProperty::SimpleFloatProperty",
|
53
|
+
'simple_integer_property' => "Java::JavafxBeansProperty::SimpleIntegerProperty",
|
54
|
+
'simple_list_property' => "Java::JavafxBeansProperty::SimpleListProperty",
|
55
|
+
'simple_long_property' => "Java::JavafxBeansProperty::SimpleLongProperty",
|
56
|
+
'simple_map_property' => "Java::JavafxBeansProperty::SimpleMapProperty",
|
57
|
+
'simple_object_property' => "Java::JavafxBeansProperty::SimpleObjectProperty",
|
58
|
+
'simple_set_property' => "Java::JavafxBeansProperty::SimpleSetProperty",
|
59
|
+
'simple_string_property' => "Java::JavafxBeansProperty::SimpleStringProperty",
|
60
|
+
'change_listener' => "Java::JavafxBeansValue::ChangeListener",
|
61
|
+
'fx_collections' => "Java::JavafxCollections::FXCollections",
|
62
|
+
'worker' => "Java::JavafxConcurrent::Worker",
|
63
|
+
'task' => "Java::JavafxConcurrent::Task",
|
64
|
+
'service' => "Java::JavafxConcurrent::Service",
|
65
|
+
'event' => "Java::JavafxEvent::Event",
|
66
|
+
'action_event' => "Java::JavafxEvent::ActionEvent",
|
67
|
+
'event_handler' => "Java::JavafxEvent::EventHandler",
|
68
|
+
'initializable' => "Java::JavafxFxml::Initializable",
|
69
|
+
'load_exception' => "Java::JavafxFxml::LoadException",
|
70
|
+
'horizontal_direction' => "Java::JavafxGeometry::HorizontalDirection",
|
71
|
+
'h_pos' => "Java::JavafxGeometry::HPos",
|
72
|
+
'insets' => "Java::JavafxGeometry::Insets",
|
73
|
+
'orientation' => "Java::JavafxGeometry::Orientation",
|
74
|
+
'pos' => "Java::JavafxGeometry::Pos",
|
75
|
+
'rectangle2_d' => "Java::JavafxGeometry::Rectangle2D",
|
76
|
+
'side' => "Java::JavafxGeometry::Side",
|
77
|
+
'vertical_direction' => "Java::JavafxGeometry::VerticalDirection",
|
78
|
+
'v_pos' => "Java::JavafxGeometry::VPos",
|
79
|
+
'group' => "Java::JavafxScene::Group",
|
80
|
+
'node' => "Java::JavafxScene::Node",
|
81
|
+
'parent' => "Java::JavafxScene::Parent",
|
82
|
+
'scene' => "Java::JavafxScene::Scene",
|
83
|
+
'canvas' => "Java::JavafxSceneCanvas::Canvas",
|
84
|
+
'area_chart' => "Java::JavafxSceneChart::AreaChart",
|
85
|
+
'axis' => "Java::JavafxSceneChart::Axis",
|
86
|
+
'bar_chart' => "Java::JavafxSceneChart::BarChart",
|
87
|
+
'bubble_chart' => "Java::JavafxSceneChart::BubbleChart",
|
88
|
+
'category_axis' => "Java::JavafxSceneChart::CategoryAxis",
|
89
|
+
'chart' => "Java::JavafxSceneChart::Chart",
|
90
|
+
'line_chart' => "Java::JavafxSceneChart::LineChart",
|
91
|
+
'number_axis' => "Java::JavafxSceneChart::NumberAxis",
|
92
|
+
'pie_chart' => "Java::JavafxSceneChart::PieChart",
|
93
|
+
'scatter_chart' => "Java::JavafxSceneChart::ScatterChart",
|
94
|
+
'stacked_area_chart' => "Java::JavafxSceneChart::StackedAreaChart",
|
95
|
+
'stacked_bar_chart' => "Java::JavafxSceneChart::StackedBarChart",
|
96
|
+
'value_axis' => "Java::JavafxSceneChart::ValueAxis",
|
97
|
+
'xy_chart' => "Java::JavafxSceneChart::XYChart",
|
98
|
+
'accordion' => "Java::JavafxSceneControl::Accordion",
|
99
|
+
'button' => "Java::JavafxSceneControl::Button",
|
100
|
+
'cell' => "Java::JavafxSceneControl::Cell",
|
101
|
+
'check_box' => "Java::JavafxSceneControl::CheckBox",
|
102
|
+
'check_box_tree_item' => "Java::JavafxSceneControl::CheckBoxTreeItem",
|
103
|
+
'check_menu_item' => "Java::JavafxSceneControl::CheckMenuItem",
|
104
|
+
'choice_box' => "Java::JavafxSceneControl::ChoiceBox",
|
105
|
+
'color_picker' => "Java::JavafxSceneControl::ColorPicker",
|
106
|
+
'combo_box' => "Java::JavafxSceneControl::ComboBox",
|
107
|
+
'context_menu' => "Java::JavafxSceneControl::ContextMenu",
|
108
|
+
'hyperlink' => "Java::JavafxSceneControl::Hyperlink",
|
109
|
+
'label' => "Java::JavafxSceneControl::Label",
|
110
|
+
'list_cell' => "Java::JavafxSceneControl::ListCell",
|
111
|
+
'list_view' => "Java::JavafxSceneControl::ListView",
|
112
|
+
'menu' => "Java::JavafxSceneControl::Menu",
|
113
|
+
'menu_bar' => "Java::JavafxSceneControl::MenuBar",
|
114
|
+
'menu_button' => "Java::JavafxSceneControl::MenuButton",
|
115
|
+
'menu_item' => "Java::JavafxSceneControl::MenuItem",
|
116
|
+
'pagination' => "Java::JavafxSceneControl::Pagination",
|
117
|
+
'password_field' => "Java::JavafxSceneControl::PasswordField",
|
118
|
+
'popup_control' => "Java::JavafxSceneControl::PopupControl",
|
119
|
+
'progress_bar' => "Java::JavafxSceneControl::ProgressBar",
|
120
|
+
'progress_indicator' => "Java::JavafxSceneControl::ProgressIndicator",
|
121
|
+
'radio_button' => "Java::JavafxSceneControl::RadioButton",
|
122
|
+
'radio_menu_item' => "Java::JavafxSceneControl::RadioMenuItem",
|
123
|
+
'scroll_bar' => "Java::JavafxSceneControl::ScrollBar",
|
124
|
+
'scroll_pane' => "Java::JavafxSceneControl::ScrollPane",
|
125
|
+
'separator' => "Java::JavafxSceneControl::Separator",
|
126
|
+
'separator_menu_item' => "Java::JavafxSceneControl::SeparatorMenuItem",
|
127
|
+
'slider' => "Java::JavafxSceneControl::Slider",
|
128
|
+
'split_menu_button' => "Java::JavafxSceneControl::SplitMenuButton",
|
129
|
+
'split_pane' => "Java::JavafxSceneControl::SplitPane",
|
130
|
+
'tab' => "Java::JavafxSceneControl::Tab",
|
131
|
+
'table_view' => "Java::JavafxSceneControl::TableView",
|
132
|
+
'table_cell' => "Java::JavafxSceneControl::TableCell",
|
133
|
+
'table_column' => "Java::JavafxSceneControl::TableColumn",
|
134
|
+
'tab_pane' => "Java::JavafxSceneControl::TabPane",
|
135
|
+
'text_area' => "Java::JavafxSceneControl::TextArea",
|
136
|
+
'text_field' => "Java::JavafxSceneControl::TextField",
|
137
|
+
'titled_pane' => "Java::JavafxSceneControl::TitledPane",
|
138
|
+
'toggle_button' => "Java::JavafxSceneControl::ToggleButton",
|
139
|
+
'toggle_group' => "Java::JavafxSceneControl::ToggleGroup",
|
140
|
+
'tool_bar' => "Java::JavafxSceneControl::ToolBar",
|
141
|
+
'tooltip' => "Java::JavafxSceneControl::Tooltip",
|
142
|
+
'tree_cell' => "Java::JavafxSceneControl::TreeCell",
|
143
|
+
'tree_item' => "Java::JavafxSceneControl::TreeItem",
|
144
|
+
'tree_view' => "Java::JavafxSceneControl::TreeView",
|
145
|
+
'content_display' => "Java::JavafxSceneControl::ContentDisplay",
|
146
|
+
'overrun_style' => "Java::JavafxSceneControl::OverrunStyle",
|
147
|
+
'selection_mode' => "Java::JavafxSceneControl::SelectionMode",
|
148
|
+
'blend' => "Java::JavafxSceneEffect::Blend",
|
149
|
+
'blend_mode' => "Java::JavafxSceneEffect::BlendMode",
|
150
|
+
'bloom' => "Java::JavafxSceneEffect::Bloom",
|
151
|
+
'blur_type' => "Java::JavafxSceneEffect::BlurType",
|
152
|
+
'box_blur' => "Java::JavafxSceneEffect::BoxBlur",
|
153
|
+
'color_adjust' => "Java::JavafxSceneEffect::ColorAdjust",
|
154
|
+
'color_input' => "Java::JavafxSceneEffect::ColorInput",
|
155
|
+
'displacement_map' => "Java::JavafxSceneEffect::DisplacementMap",
|
156
|
+
'drop_shadow' => "Java::JavafxSceneEffect::DropShadow",
|
157
|
+
'gaussian_blur' => "Java::JavafxSceneEffect::GaussianBlur",
|
158
|
+
'glow' => "Java::JavafxSceneEffect::Glow",
|
159
|
+
'image_input' => "Java::JavafxSceneEffect::ImageInput",
|
160
|
+
'inner_shadow' => "Java::JavafxSceneEffect::InnerShadow",
|
161
|
+
'lighting' => "Java::JavafxSceneEffect::Lighting",
|
162
|
+
'motion_blur' => "Java::JavafxSceneEffect::MotionBlur",
|
163
|
+
'perspective_transform' => "Java::JavafxSceneEffect::PerspectiveTransform",
|
164
|
+
'reflection' => "Java::JavafxSceneEffect::Reflection",
|
165
|
+
'sepia_tone' => "Java::JavafxSceneEffect::SepiaTone",
|
166
|
+
'shadow' => "Java::JavafxSceneEffect::Shadow",
|
167
|
+
'image' => "Java::JavafxSceneImage::Image",
|
168
|
+
'image_view' => "Java::JavafxSceneImage::ImageView",
|
169
|
+
'pixel_reader' => "Java::JavafxSceneImage::PixelReader",
|
170
|
+
'pixel_writer' => "Java::JavafxSceneImage::PixelWriter",
|
171
|
+
'clipboard' => "Java::JavafxSceneInput::Clipboard",
|
172
|
+
'clipboard_content' => "Java::JavafxSceneInput::ClipboardContent",
|
173
|
+
'context_menu_event' => "Java::JavafxSceneInput::ContextMenuEvent",
|
174
|
+
'drag_event' => "Java::JavafxSceneInput::DragEvent",
|
175
|
+
'gesture_event' => "Java::JavafxSceneInput::GestureEvent",
|
176
|
+
'input_event' => "Java::JavafxSceneInput::InputEvent",
|
177
|
+
'input_method_event' => "Java::JavafxSceneInput::InputMethodEvent",
|
178
|
+
'key_code' => "Java::JavafxSceneInput::KeyCode",
|
179
|
+
'key_event' => "Java::JavafxSceneInput::KeyEvent",
|
180
|
+
'mnemonic' => "Java::JavafxSceneInput::Mnemonic",
|
181
|
+
'mouse_button' => "Java::JavafxSceneInput::MouseButton",
|
182
|
+
'mouse_drag_event' => "Java::JavafxSceneInput::MouseDragEvent",
|
183
|
+
'mouse_event' => "Java::JavafxSceneInput::MouseEvent",
|
184
|
+
'rotate_event' => "Java::JavafxSceneInput::RotateEvent",
|
185
|
+
'scroll_event' => "Java::JavafxSceneInput::ScrollEvent",
|
186
|
+
'swipe_event' => "Java::JavafxSceneInput::SwipeEvent",
|
187
|
+
'touch_event' => "Java::JavafxSceneInput::TouchEvent",
|
188
|
+
'transfer_mode' => "Java::JavafxSceneInput::TransferMode",
|
189
|
+
'zoom_event' => "Java::JavafxSceneInput::ZoomEvent",
|
190
|
+
'anchor_pane' => "Java::JavafxSceneLayout::AnchorPane",
|
191
|
+
'border_pane' => "Java::JavafxSceneLayout::BorderPane",
|
192
|
+
'column_constraints' => "Java::JavafxSceneLayout::ColumnConstraints",
|
193
|
+
'flow_pane' => "Java::JavafxSceneLayout::FlowPane",
|
194
|
+
'grid_pane' => "Java::JavafxSceneLayout::GridPane",
|
195
|
+
'hbox' => "Java::JavafxSceneLayout::HBox",
|
196
|
+
'pane' => "Java::JavafxSceneLayout::Pane",
|
197
|
+
'priority' => "Java::JavafxSceneLayout::Priority",
|
198
|
+
'row_constraints' => "Java::JavafxSceneLayout::RowConstraints",
|
199
|
+
'stack_pane' => "Java::JavafxSceneLayout::StackPane",
|
200
|
+
'tile_pane' => "Java::JavafxSceneLayout::TilePane",
|
201
|
+
'vbox' => "Java::JavafxSceneLayout::VBox",
|
202
|
+
'audio_clip' => "Java::JavafxSceneMedia::AudioClip",
|
203
|
+
'audio_equalizer' => "Java::JavafxSceneMedia::AudioEqualizer",
|
204
|
+
'audio_track' => "Java::JavafxSceneMedia::AudioTrack",
|
205
|
+
'equalizer_band' => "Java::JavafxSceneMedia::EqualizerBand",
|
206
|
+
'media' => "Java::JavafxSceneMedia::Media",
|
207
|
+
'media_exception' => "Java::JavafxSceneMedia::MediaException",
|
208
|
+
'media_error_event' => "Java::JavafxSceneMedia::MediaErrorEvent",
|
209
|
+
'media_marker_event' => "Java::JavafxSceneMedia::MediaMarkerEvent",
|
210
|
+
'media_player' => "Java::JavafxSceneMedia::MediaPlayer",
|
211
|
+
'media_view' => "Java::JavafxSceneMedia::MediaView",
|
212
|
+
'video_track' => "Java::JavafxSceneMedia::VideoTrack",
|
213
|
+
'color' => "Java::JavafxScenePaint::Color",
|
214
|
+
'cycle_method' => "Java::JavafxScenePaint::CycleMethod",
|
215
|
+
'image_pattern' => "Java::JavafxScenePaint::ImagePattern",
|
216
|
+
'linear_gradient' => "Java::JavafxScenePaint::LinearGradient",
|
217
|
+
'paint' => "Java::JavafxScenePaint::Paint",
|
218
|
+
'radial_gradient' => "Java::JavafxScenePaint::RadialGradient",
|
219
|
+
'stop' => "Java::JavafxScenePaint::Stop",
|
220
|
+
'arc' => "Java::JavafxSceneShape::Arc",
|
221
|
+
'arc_to' => "Java::JavafxSceneShape::ArcTo",
|
222
|
+
'arc_type' => "Java::JavafxSceneShape::ArcType",
|
223
|
+
'circle' => "Java::JavafxSceneShape::Circle",
|
224
|
+
'close_path' => "Java::JavafxSceneShape::ClosePath",
|
225
|
+
'cubic_curve' => "Java::JavafxSceneShape::CubicCurve",
|
226
|
+
'cubic_curve_to' => "Java::JavafxSceneShape::CubicCurveTo",
|
227
|
+
'ellipse' => "Java::JavafxSceneShape::Ellipse",
|
228
|
+
'fill_rule' => "Java::JavafxSceneShape::FillRule",
|
229
|
+
'hline_to' => "Java::JavafxSceneShape::HLineTo",
|
230
|
+
'line' => "Java::JavafxSceneShape::Line",
|
231
|
+
'line_to' => "Java::JavafxSceneShape::LineTo",
|
232
|
+
'move_to' => "Java::JavafxSceneShape::MoveTo",
|
233
|
+
'path' => "Java::JavafxSceneShape::Path",
|
234
|
+
'path_element' => "Java::JavafxSceneShape::PathElement",
|
235
|
+
'polygon' => "Java::JavafxSceneShape::Polygon",
|
236
|
+
'polyline' => "Java::JavafxSceneShape::Polyline",
|
237
|
+
'quad_curve' => "Java::JavafxSceneShape::QuadCurve",
|
238
|
+
'quad_curve_to' => "Java::JavafxSceneShape::QuadCurveTo",
|
239
|
+
'rectangle' => "Java::JavafxSceneShape::Rectangle",
|
240
|
+
'shape' => "Java::JavafxSceneShape::Shape",
|
241
|
+
'stroke_line_cap' => "Java::JavafxSceneShape::StrokeLineCap",
|
242
|
+
'stroke_line_join' => "Java::JavafxSceneShape::StrokeLineJoin",
|
243
|
+
'stroke_type' => "Java::JavafxSceneShape::StrokeType",
|
244
|
+
'svg_path' => "Java::JavafxSceneShape::SVGPath",
|
245
|
+
'vline_to' => "Java::JavafxSceneShape::VLineTo",
|
246
|
+
'font' => "Java::JavafxSceneText::Font",
|
247
|
+
'font_posture' => "Java::JavafxSceneText::FontPosture",
|
248
|
+
'font_smoothing_type' => "Java::JavafxSceneText::FontSmoothingType",
|
249
|
+
'font_weight' => "Java::JavafxSceneText::FontWeight",
|
250
|
+
'text' => "Java::JavafxSceneText::Text",
|
251
|
+
'text_alignment' => "Java::JavafxSceneText::TextAlignment",
|
252
|
+
'text_bounds_type' => "Java::JavafxSceneText::TextBoundsType",
|
253
|
+
'affine' => "Java::JavafxSceneTransform::Affine",
|
254
|
+
'rotate' => "Java::JavafxSceneTransform::Rotate",
|
255
|
+
'scale' => "Java::JavafxSceneTransform::Scale",
|
256
|
+
'shear' => "Java::JavafxSceneTransform::Shear",
|
257
|
+
'translate' => "Java::JavafxSceneTransform::Translate",
|
258
|
+
'web_view' => "Java::JavafxSceneWeb::WebView",
|
259
|
+
'html_editor' => "Java::JavafxSceneWeb::HTMLEditor",
|
260
|
+
'directory_chooser' => "Java::JavafxStage::DirectoryChooser",
|
261
|
+
'file_chooser' => "Java::JavafxStage::FileChooser",
|
262
|
+
'modality' => "Java::JavafxStage::Modality",
|
263
|
+
'popup' => "Java::JavafxStage::Popup",
|
264
|
+
'popup_window' => "Java::JavafxStage::PopupWindow",
|
265
|
+
'screen' => "Java::JavafxStage::Screen",
|
266
|
+
'stage' => "Java::JavafxStage::Stage",
|
267
|
+
'stage_style' => "Java::JavafxStage::StageStyle",
|
268
|
+
'window' => "Java::JavafxStage::Window",
|
269
|
+
'window_event' => "Java::JavafxStage::WindowEvent",
|
270
|
+
'duration' => "Java::JavafxUtil::Duration",
|
271
|
+
}
|
272
|
+
end
|
273
|
+
end
|
@@ -0,0 +1,316 @@
|
|
1
|
+
=begin
|
2
|
+
JRubyFX - Write JavaFX and FXML in Ruby
|
3
|
+
Copyright (C) 2013 The JRubyFX Team
|
4
|
+
|
5
|
+
Licensed under the Apache License, Version 2.0 (the "License");
|
6
|
+
you may not use this file except in compliance with the License.
|
7
|
+
You may obtain a copy of the License at
|
8
|
+
|
9
|
+
http://www.apache.org/licenses/LICENSE-2.0
|
10
|
+
|
11
|
+
Unless required by applicable law or agreed to in writing, software
|
12
|
+
distributed under the License is distributed on an "AS IS" BASIS,
|
13
|
+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
14
|
+
See the License for the specific language governing permissions and
|
15
|
+
limitations under the License.
|
16
|
+
=end
|
17
|
+
|
18
|
+
require_relative 'utils'
|
19
|
+
|
20
|
+
# Update load path to include the JavaFX runtime and fail nicely if we can't find it
|
21
|
+
begin
|
22
|
+
if ENV['JFX_DIR']
|
23
|
+
$LOAD_PATH << ENV['JFX_DIR']
|
24
|
+
else #should we check for 1.7 vs 1.8? oh well, adding extra paths won't hurt anybody (maybe performance loading)
|
25
|
+
jfx_path = ENV_JAVA["sun.boot.library.path"]
|
26
|
+
$LOAD_PATH << if jfx_path.include? ":\\" and !jfx_path.include? "/" # can be tricked, but should work fine
|
27
|
+
#windows
|
28
|
+
jfx_path.gsub(/\\bin[\\]*$/i, "\\lib")
|
29
|
+
else
|
30
|
+
# *nix
|
31
|
+
jfx_path.gsub(/[\/\\][amdix345678_]+$/, "") # strip i386 or amd64 (including variants). TODO: ARM
|
32
|
+
end
|
33
|
+
end
|
34
|
+
|
35
|
+
# Java 8 (after ea-b75) and above has JavaFX as part of the normal distib, only require it if we are 7 or below
|
36
|
+
jre = ENV_JAVA["java.runtime.version"].match %r{^(?<version>(?<major>\d+)\.(?<minor>\d+))\.(?<patch>\d+)(_\d+)?-?(?<release>ea|u\d)?(-?b(?<build>\d+))?}
|
37
|
+
require 'jfxrt.jar' if ENV['JFX_DIR'] or
|
38
|
+
jre[:version].to_f < 1.8 or
|
39
|
+
(jre[:version].to_f == 1.8 and jre[:release] == 'ea' and jre[:build].to_i < 75)
|
40
|
+
|
41
|
+
# Java 8 at some point requires explicit toolkit/platform initialization
|
42
|
+
# before any controls can be loaded.
|
43
|
+
JRubyFX.load_fx
|
44
|
+
|
45
|
+
# Attempt to load a javafx class
|
46
|
+
Java.javafx.application.Application
|
47
|
+
rescue LoadError, NameError
|
48
|
+
puts "JavaFX runtime not found. Please install Java 7u6 or newer or set environment variable JFX_DIR to the folder that contains jfxrt.jar "
|
49
|
+
puts "If you have Java 7u6 or later, this is a bug. Please report to the issue tracker on github. Include your OS version, 32/64bit, and architecture (x86, ARM, PPC, etc)"
|
50
|
+
exit -1
|
51
|
+
end
|
52
|
+
|
53
|
+
module JRubyFX
|
54
|
+
# If you need JavaFX, just include this module. Its sole purpose in life is to
|
55
|
+
# import all JavaFX stuff, plus a few useful Java classes (like Void)
|
56
|
+
module FXImports
|
57
|
+
|
58
|
+
# If something is missing, just java_import it in your code.
|
59
|
+
# And then ask us to put it in this list
|
60
|
+
#
|
61
|
+
|
62
|
+
# The below lines are generated by `rake reflect`. Do not edit.
|
63
|
+
|
64
|
+
def const_missing(c)
|
65
|
+
if LOCAL_NAME_MAP.has_key? c
|
66
|
+
java_import(LOCAL_NAME_MAP[c])[0]
|
67
|
+
else
|
68
|
+
super
|
69
|
+
end
|
70
|
+
end
|
71
|
+
|
72
|
+
LOCAL_NAME_MAP = {
|
73
|
+
:Animation => "javafx.animation.Animation",
|
74
|
+
:AnimationTimer => "javafx.animation.AnimationTimer",
|
75
|
+
:FadeTransition => "javafx.animation.FadeTransition",
|
76
|
+
:FillTransition => "javafx.animation.FillTransition",
|
77
|
+
:Interpolator => "javafx.animation.Interpolator",
|
78
|
+
:KeyFrame => "javafx.animation.KeyFrame",
|
79
|
+
:KeyValue => "javafx.animation.KeyValue",
|
80
|
+
:ParallelTransition => "javafx.animation.ParallelTransition",
|
81
|
+
:PathTransition => "javafx.animation.PathTransition",
|
82
|
+
:PauseTransition => "javafx.animation.PauseTransition",
|
83
|
+
:RotateTransition => "javafx.animation.RotateTransition",
|
84
|
+
:ScaleTransition => "javafx.animation.ScaleTransition",
|
85
|
+
:SequentialTransition => "javafx.animation.SequentialTransition",
|
86
|
+
:StrokeTransition => "javafx.animation.StrokeTransition",
|
87
|
+
:Timeline => "javafx.animation.Timeline",
|
88
|
+
:Transition => "javafx.animation.Transition",
|
89
|
+
:TranslateTransition => "javafx.animation.TranslateTransition",
|
90
|
+
:Platform => "javafx.application.Platform",
|
91
|
+
:SimpleBooleanProperty => "javafx.beans.property.SimpleBooleanProperty",
|
92
|
+
:SimpleDoubleProperty => "javafx.beans.property.SimpleDoubleProperty",
|
93
|
+
:SimpleFloatProperty => "javafx.beans.property.SimpleFloatProperty",
|
94
|
+
:SimpleIntegerProperty => "javafx.beans.property.SimpleIntegerProperty",
|
95
|
+
:SimpleListProperty => "javafx.beans.property.SimpleListProperty",
|
96
|
+
:SimpleLongProperty => "javafx.beans.property.SimpleLongProperty",
|
97
|
+
:SimpleMapProperty => "javafx.beans.property.SimpleMapProperty",
|
98
|
+
:SimpleObjectProperty => "javafx.beans.property.SimpleObjectProperty",
|
99
|
+
:SimpleSetProperty => "javafx.beans.property.SimpleSetProperty",
|
100
|
+
:SimpleStringProperty => "javafx.beans.property.SimpleStringProperty",
|
101
|
+
:ChangeListener => "javafx.beans.value.ChangeListener",
|
102
|
+
:FXCollections => "javafx.collections.FXCollections",
|
103
|
+
:Worker => "javafx.concurrent.Worker",
|
104
|
+
:Task => "javafx.concurrent.Task",
|
105
|
+
:Service => "javafx.concurrent.Service",
|
106
|
+
:Event => "javafx.event.Event",
|
107
|
+
:ActionEvent => "javafx.event.ActionEvent",
|
108
|
+
:EventHandler => "javafx.event.EventHandler",
|
109
|
+
:Initializable => "javafx.fxml.Initializable",
|
110
|
+
:LoadException => "javafx.fxml.LoadException",
|
111
|
+
:HorizontalDirection => "javafx.geometry.HorizontalDirection",
|
112
|
+
:HPos => "javafx.geometry.HPos",
|
113
|
+
:Insets => "javafx.geometry.Insets",
|
114
|
+
:Orientation => "javafx.geometry.Orientation",
|
115
|
+
:Pos => "javafx.geometry.Pos",
|
116
|
+
:Rectangle2D => "javafx.geometry.Rectangle2D",
|
117
|
+
:Side => "javafx.geometry.Side",
|
118
|
+
:VerticalDirection => "javafx.geometry.VerticalDirection",
|
119
|
+
:VPos => "javafx.geometry.VPos",
|
120
|
+
:Group => "javafx.scene.Group",
|
121
|
+
:Node => "javafx.scene.Node",
|
122
|
+
:Parent => "javafx.scene.Parent",
|
123
|
+
:Scene => "javafx.scene.Scene",
|
124
|
+
:Canvas => "javafx.scene.canvas.Canvas",
|
125
|
+
:AreaChart => "javafx.scene.chart.AreaChart",
|
126
|
+
:Axis => "javafx.scene.chart.Axis",
|
127
|
+
:BarChart => "javafx.scene.chart.BarChart",
|
128
|
+
:BubbleChart => "javafx.scene.chart.BubbleChart",
|
129
|
+
:CategoryAxis => "javafx.scene.chart.CategoryAxis",
|
130
|
+
:Chart => "javafx.scene.chart.Chart",
|
131
|
+
:LineChart => "javafx.scene.chart.LineChart",
|
132
|
+
:NumberAxis => "javafx.scene.chart.NumberAxis",
|
133
|
+
:PieChart => "javafx.scene.chart.PieChart",
|
134
|
+
:ScatterChart => "javafx.scene.chart.ScatterChart",
|
135
|
+
:StackedAreaChart => "javafx.scene.chart.StackedAreaChart",
|
136
|
+
:StackedBarChart => "javafx.scene.chart.StackedBarChart",
|
137
|
+
:ValueAxis => "javafx.scene.chart.ValueAxis",
|
138
|
+
:XYChart => "javafx.scene.chart.XYChart",
|
139
|
+
:Accordion => "javafx.scene.control.Accordion",
|
140
|
+
:Button => "javafx.scene.control.Button",
|
141
|
+
:Cell => "javafx.scene.control.Cell",
|
142
|
+
:CheckBox => "javafx.scene.control.CheckBox",
|
143
|
+
:CheckBoxTreeItem => "javafx.scene.control.CheckBoxTreeItem",
|
144
|
+
:CheckMenuItem => "javafx.scene.control.CheckMenuItem",
|
145
|
+
:ChoiceBox => "javafx.scene.control.ChoiceBox",
|
146
|
+
:ColorPicker => "javafx.scene.control.ColorPicker",
|
147
|
+
:ComboBox => "javafx.scene.control.ComboBox",
|
148
|
+
:ContextMenu => "javafx.scene.control.ContextMenu",
|
149
|
+
:Hyperlink => "javafx.scene.control.Hyperlink",
|
150
|
+
:Label => "javafx.scene.control.Label",
|
151
|
+
:ListCell => "javafx.scene.control.ListCell",
|
152
|
+
:ListView => "javafx.scene.control.ListView",
|
153
|
+
:Menu => "javafx.scene.control.Menu",
|
154
|
+
:MenuBar => "javafx.scene.control.MenuBar",
|
155
|
+
:MenuButton => "javafx.scene.control.MenuButton",
|
156
|
+
:MenuItem => "javafx.scene.control.MenuItem",
|
157
|
+
:Pagination => "javafx.scene.control.Pagination",
|
158
|
+
:PasswordField => "javafx.scene.control.PasswordField",
|
159
|
+
:PopupControl => "javafx.scene.control.PopupControl",
|
160
|
+
:ProgressBar => "javafx.scene.control.ProgressBar",
|
161
|
+
:ProgressIndicator => "javafx.scene.control.ProgressIndicator",
|
162
|
+
:RadioButton => "javafx.scene.control.RadioButton",
|
163
|
+
:RadioMenuItem => "javafx.scene.control.RadioMenuItem",
|
164
|
+
:ScrollBar => "javafx.scene.control.ScrollBar",
|
165
|
+
:ScrollPane => "javafx.scene.control.ScrollPane",
|
166
|
+
:Separator => "javafx.scene.control.Separator",
|
167
|
+
:SeparatorMenuItem => "javafx.scene.control.SeparatorMenuItem",
|
168
|
+
:Slider => "javafx.scene.control.Slider",
|
169
|
+
:SplitMenuButton => "javafx.scene.control.SplitMenuButton",
|
170
|
+
:SplitPane => "javafx.scene.control.SplitPane",
|
171
|
+
:Tab => "javafx.scene.control.Tab",
|
172
|
+
:TableView => "javafx.scene.control.TableView",
|
173
|
+
:TableCell => "javafx.scene.control.TableCell",
|
174
|
+
:TableColumn => "javafx.scene.control.TableColumn",
|
175
|
+
:TabPane => "javafx.scene.control.TabPane",
|
176
|
+
:TextArea => "javafx.scene.control.TextArea",
|
177
|
+
:TextField => "javafx.scene.control.TextField",
|
178
|
+
:TitledPane => "javafx.scene.control.TitledPane",
|
179
|
+
:ToggleButton => "javafx.scene.control.ToggleButton",
|
180
|
+
:ToggleGroup => "javafx.scene.control.ToggleGroup",
|
181
|
+
:ToolBar => "javafx.scene.control.ToolBar",
|
182
|
+
:Tooltip => "javafx.scene.control.Tooltip",
|
183
|
+
:TreeCell => "javafx.scene.control.TreeCell",
|
184
|
+
:TreeItem => "javafx.scene.control.TreeItem",
|
185
|
+
:TreeView => "javafx.scene.control.TreeView",
|
186
|
+
:ContentDisplay => "javafx.scene.control.ContentDisplay",
|
187
|
+
:OverrunStyle => "javafx.scene.control.OverrunStyle",
|
188
|
+
:SelectionMode => "javafx.scene.control.SelectionMode",
|
189
|
+
:Blend => "javafx.scene.effect.Blend",
|
190
|
+
:BlendMode => "javafx.scene.effect.BlendMode",
|
191
|
+
:Bloom => "javafx.scene.effect.Bloom",
|
192
|
+
:BlurType => "javafx.scene.effect.BlurType",
|
193
|
+
:BoxBlur => "javafx.scene.effect.BoxBlur",
|
194
|
+
:ColorAdjust => "javafx.scene.effect.ColorAdjust",
|
195
|
+
:ColorInput => "javafx.scene.effect.ColorInput",
|
196
|
+
:DisplacementMap => "javafx.scene.effect.DisplacementMap",
|
197
|
+
:DropShadow => "javafx.scene.effect.DropShadow",
|
198
|
+
:GaussianBlur => "javafx.scene.effect.GaussianBlur",
|
199
|
+
:Glow => "javafx.scene.effect.Glow",
|
200
|
+
:ImageInput => "javafx.scene.effect.ImageInput",
|
201
|
+
:InnerShadow => "javafx.scene.effect.InnerShadow",
|
202
|
+
:Lighting => "javafx.scene.effect.Lighting",
|
203
|
+
:MotionBlur => "javafx.scene.effect.MotionBlur",
|
204
|
+
:PerspectiveTransform => "javafx.scene.effect.PerspectiveTransform",
|
205
|
+
:Reflection => "javafx.scene.effect.Reflection",
|
206
|
+
:SepiaTone => "javafx.scene.effect.SepiaTone",
|
207
|
+
:Shadow => "javafx.scene.effect.Shadow",
|
208
|
+
:Image => "javafx.scene.image.Image",
|
209
|
+
:ImageView => "javafx.scene.image.ImageView",
|
210
|
+
:PixelReader => "javafx.scene.image.PixelReader",
|
211
|
+
:PixelWriter => "javafx.scene.image.PixelWriter",
|
212
|
+
:Clipboard => "javafx.scene.input.Clipboard",
|
213
|
+
:ClipboardContent => "javafx.scene.input.ClipboardContent",
|
214
|
+
:ContextMenuEvent => "javafx.scene.input.ContextMenuEvent",
|
215
|
+
:DragEvent => "javafx.scene.input.DragEvent",
|
216
|
+
:GestureEvent => "javafx.scene.input.GestureEvent",
|
217
|
+
:InputEvent => "javafx.scene.input.InputEvent",
|
218
|
+
:InputMethodEvent => "javafx.scene.input.InputMethodEvent",
|
219
|
+
:KeyCode => "javafx.scene.input.KeyCode",
|
220
|
+
:KeyEvent => "javafx.scene.input.KeyEvent",
|
221
|
+
:Mnemonic => "javafx.scene.input.Mnemonic",
|
222
|
+
:MouseButton => "javafx.scene.input.MouseButton",
|
223
|
+
:MouseDragEvent => "javafx.scene.input.MouseDragEvent",
|
224
|
+
:MouseEvent => "javafx.scene.input.MouseEvent",
|
225
|
+
:RotateEvent => "javafx.scene.input.RotateEvent",
|
226
|
+
:ScrollEvent => "javafx.scene.input.ScrollEvent",
|
227
|
+
:SwipeEvent => "javafx.scene.input.SwipeEvent",
|
228
|
+
:TouchEvent => "javafx.scene.input.TouchEvent",
|
229
|
+
:TransferMode => "javafx.scene.input.TransferMode",
|
230
|
+
:ZoomEvent => "javafx.scene.input.ZoomEvent",
|
231
|
+
:AnchorPane => "javafx.scene.layout.AnchorPane",
|
232
|
+
:BorderPane => "javafx.scene.layout.BorderPane",
|
233
|
+
:ColumnConstraints => "javafx.scene.layout.ColumnConstraints",
|
234
|
+
:FlowPane => "javafx.scene.layout.FlowPane",
|
235
|
+
:GridPane => "javafx.scene.layout.GridPane",
|
236
|
+
:HBox => "javafx.scene.layout.HBox",
|
237
|
+
:Pane => "javafx.scene.layout.Pane",
|
238
|
+
:Priority => "javafx.scene.layout.Priority",
|
239
|
+
:RowConstraints => "javafx.scene.layout.RowConstraints",
|
240
|
+
:StackPane => "javafx.scene.layout.StackPane",
|
241
|
+
:TilePane => "javafx.scene.layout.TilePane",
|
242
|
+
:VBox => "javafx.scene.layout.VBox",
|
243
|
+
:AudioClip => "javafx.scene.media.AudioClip",
|
244
|
+
:AudioEqualizer => "javafx.scene.media.AudioEqualizer",
|
245
|
+
:AudioTrack => "javafx.scene.media.AudioTrack",
|
246
|
+
:EqualizerBand => "javafx.scene.media.EqualizerBand",
|
247
|
+
:Media => "javafx.scene.media.Media",
|
248
|
+
:MediaException => "javafx.scene.media.MediaException",
|
249
|
+
:MediaErrorEvent => "javafx.scene.media.MediaErrorEvent",
|
250
|
+
:MediaMarkerEvent => "javafx.scene.media.MediaMarkerEvent",
|
251
|
+
:MediaPlayer => "javafx.scene.media.MediaPlayer",
|
252
|
+
:MediaView => "javafx.scene.media.MediaView",
|
253
|
+
:VideoTrack => "javafx.scene.media.VideoTrack",
|
254
|
+
:Color => "javafx.scene.paint.Color",
|
255
|
+
:CycleMethod => "javafx.scene.paint.CycleMethod",
|
256
|
+
:ImagePattern => "javafx.scene.paint.ImagePattern",
|
257
|
+
:LinearGradient => "javafx.scene.paint.LinearGradient",
|
258
|
+
:Paint => "javafx.scene.paint.Paint",
|
259
|
+
:RadialGradient => "javafx.scene.paint.RadialGradient",
|
260
|
+
:Stop => "javafx.scene.paint.Stop",
|
261
|
+
:Arc => "javafx.scene.shape.Arc",
|
262
|
+
:ArcTo => "javafx.scene.shape.ArcTo",
|
263
|
+
:ArcType => "javafx.scene.shape.ArcType",
|
264
|
+
:Circle => "javafx.scene.shape.Circle",
|
265
|
+
:ClosePath => "javafx.scene.shape.ClosePath",
|
266
|
+
:CubicCurve => "javafx.scene.shape.CubicCurve",
|
267
|
+
:CubicCurveTo => "javafx.scene.shape.CubicCurveTo",
|
268
|
+
:Ellipse => "javafx.scene.shape.Ellipse",
|
269
|
+
:FillRule => "javafx.scene.shape.FillRule",
|
270
|
+
:HLineTo => "javafx.scene.shape.HLineTo",
|
271
|
+
:Line => "javafx.scene.shape.Line",
|
272
|
+
:LineTo => "javafx.scene.shape.LineTo",
|
273
|
+
:MoveTo => "javafx.scene.shape.MoveTo",
|
274
|
+
:Path => "javafx.scene.shape.Path",
|
275
|
+
:PathElement => "javafx.scene.shape.PathElement",
|
276
|
+
:Polygon => "javafx.scene.shape.Polygon",
|
277
|
+
:Polyline => "javafx.scene.shape.Polyline",
|
278
|
+
:QuadCurve => "javafx.scene.shape.QuadCurve",
|
279
|
+
:QuadCurveTo => "javafx.scene.shape.QuadCurveTo",
|
280
|
+
:Rectangle => "javafx.scene.shape.Rectangle",
|
281
|
+
:Shape => "javafx.scene.shape.Shape",
|
282
|
+
:StrokeLineCap => "javafx.scene.shape.StrokeLineCap",
|
283
|
+
:StrokeLineJoin => "javafx.scene.shape.StrokeLineJoin",
|
284
|
+
:StrokeType => "javafx.scene.shape.StrokeType",
|
285
|
+
:SVGPath => "javafx.scene.shape.SVGPath",
|
286
|
+
:VLineTo => "javafx.scene.shape.VLineTo",
|
287
|
+
:Font => "javafx.scene.text.Font",
|
288
|
+
:FontPosture => "javafx.scene.text.FontPosture",
|
289
|
+
:FontSmoothingType => "javafx.scene.text.FontSmoothingType",
|
290
|
+
:FontWeight => "javafx.scene.text.FontWeight",
|
291
|
+
:Text => "javafx.scene.text.Text",
|
292
|
+
:TextAlignment => "javafx.scene.text.TextAlignment",
|
293
|
+
:TextBoundsType => "javafx.scene.text.TextBoundsType",
|
294
|
+
:Affine => "javafx.scene.transform.Affine",
|
295
|
+
:Rotate => "javafx.scene.transform.Rotate",
|
296
|
+
:Scale => "javafx.scene.transform.Scale",
|
297
|
+
:Shear => "javafx.scene.transform.Shear",
|
298
|
+
:Translate => "javafx.scene.transform.Translate",
|
299
|
+
:WebView => "javafx.scene.web.WebView",
|
300
|
+
:HTMLEditor => "javafx.scene.web.HTMLEditor",
|
301
|
+
:DirectoryChooser => "javafx.stage.DirectoryChooser",
|
302
|
+
:FileChooser => "javafx.stage.FileChooser",
|
303
|
+
:Modality => "javafx.stage.Modality",
|
304
|
+
:Popup => "javafx.stage.Popup",
|
305
|
+
:PopupWindow => "javafx.stage.PopupWindow",
|
306
|
+
:Screen => "javafx.stage.Screen",
|
307
|
+
:Stage => "javafx.stage.Stage",
|
308
|
+
:StageStyle => "javafx.stage.StageStyle",
|
309
|
+
:Window => "javafx.stage.Window",
|
310
|
+
:WindowEvent => "javafx.stage.WindowEvent",
|
311
|
+
:Duration => "javafx.util.Duration"
|
312
|
+
}
|
313
|
+
java_import 'java.lang.Void'
|
314
|
+
end
|
315
|
+
end
|
316
|
+
|