Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Add in a few more constant symbol supports
  • Loading branch information
byteit101 committed Jan 24, 2013
commit 1507e2513e98f7b10e5dbad5daeb80e92c1f34eb
30 changes: 30 additions & 0 deletions lib/jrubyfx/core_ext/effects.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
=begin
JRubyFX - Write JavaFX and FXML in Ruby
Copyright (C) 2013 The JRubyFX Team

Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
=end
# JRubyFX DSL extensions for JavaFX drop shadows
class Java::javafx::scene::effect::DropShadow
extend JRubyFX::Utils::CommonConverters

converter_for :color, [:color]

class << self
extend JRubyFX::Utils::CommonConverters

converter_for :new, [], [:none, :color], [:none, :none, :none, :color],
[enum_converter(Java::javafx::scene::effect::BlurType), :color, :none, :none, :none, :none]
end

end
10 changes: 10 additions & 0 deletions lib/jrubyfx/core_ext/radial_gradient.rb
Original file line number Diff line number Diff line change
Expand Up @@ -25,3 +25,13 @@ class << self
converter_for :new, [:none, :none, :none, :none, :none, :none, enum_converter(CycleMethod), :none]
end
end

# JRubyFX DSL extensions for JavaFX Linear Gradients
class Java::javafx::scene::paint::LinearGradient
class << self
java_import Java::javafx.scene.paint.CycleMethod
extend JRubyFX::Utils::CommonConverters

converter_for :new, [:none, :none, :none, :none, :none, enum_converter(CycleMethod), :none]
end
end
2 changes: 1 addition & 1 deletion lib/jrubyfx/core_ext/region.rb
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
limitations under the License.
=end
# JRubyFX DSL extensions for JavaFX color stops
class Java::javafx::scene::media::MediaPlayer
class Java::javafx::scene::layout::Region
extend JRubyFX::Utils::CommonConverters

use_sizes = map_converter(use_pref_size: USE_PREF_SIZE,
Expand Down