Class: Java::OrgEclipseSwtWidgets::Composite
- Inherits:
-
Object
- Object
- Java::OrgEclipseSwtWidgets::Composite
- Defined in:
- lib/sweet/composite.rb
Instance Method Summary collapse
Instance Method Details
#layout=(name, options = {}) ⇒ Object
3 4 5 6 7 8 9 10 11 12 |
# File 'lib/sweet/composite.rb', line 3 def layout=(name, = {}) class_name = "#{name.to_s.capitalize}Layout" l = instance_eval "org.eclipse.swt.layout.#{class_name}.new" .each_pair do |k,v| l.send("#{k}=", v) end setLayout l end |