Class: Glimmer::DSL::SWT::ShineDataBindingExpression

Inherits:
Expression
  • Object
show all
Defined in:
lib/glimmer/dsl/swt/shine_data_binding_expression.rb

Instance Method Summary collapse

Instance Method Details

#can_interpret?(parent, keyword, *args, &block) ⇒ Boolean

Returns:

  • (Boolean)


34
35
36
37
38
39
40
41
42
# File 'lib/glimmer/dsl/swt/shine_data_binding_expression.rb', line 34

def can_interpret?(parent, keyword, *args, &block)
  args.size == 0 and
    block.nil? and
    (
      (parent.respond_to?(:has_attribute?) and parent.has_attribute?(keyword)) or
      (parent.respond_to?(:swt_widget) and (parent.swt_widget.is_a?(Table) or parent.swt_widget.is_a?(Tree)))
    ) and
    !(parent.respond_to?(:swt_widget) && parent.swt_widget.class == org.eclipse.swt.widgets.Canvas && keyword == 'image')
end

#interpret(parent, keyword, *args, &block) ⇒ Object



44
45
46
# File 'lib/glimmer/dsl/swt/shine_data_binding_expression.rb', line 44

def interpret(parent, keyword, *args, &block)
  Glimmer::DataBinding::Shine.new(parent, keyword)
end