Sha256: 62620528ef80b1c0299597d157da44c0f39c725531b39f585f0a0e0e71288bab

Contents?: true

Size: 1013 Bytes

Versions: 13

Compression:

Stored size: 1013 Bytes

Contents

require 'glimmer/dsl/expression'
require 'glimmer/data_binding/model_binding'
require 'glimmer/data_binding/table_items_binding'

module Glimmer
  module DSL
    module SWT
      #Depends on BindCommandHandler and TableColumnPropertiesDataBindingCommandHandler
      class TableItemsDataBindingExpression < Expression
        include_package 'org.eclipse.swt.widgets'
  
        def can_interpret?(parent, keyword, *args, &block)
          keyword == "items" and
            block.nil? and
            widget?(parent) and
            parent.swt_widget.is_a?(Table) and
            args.size == 2 and
            args[0].is_a?(DataBinding::ModelBinding) and
            args[0].evaluate_property.is_a?(Array) and
            args[1].is_a?(Array)
        end
  
        def interpret(parent, keyword, *args, &block)
          model_binding = args[0]
          column_properties = args[1]
          DataBinding::TableItemsBinding.new(parent, model_binding, column_properties)
        end
      end
    end
  end
end

Version data entries

13 entries across 13 versions & 1 rubygems

Version Path
glimmer-0.8.2 lib/glimmer/dsl/swt/table_items_data_binding_expression.rb
glimmer-0.8.1 lib/glimmer/dsl/swt/table_items_data_binding_expression.rb
glimmer-0.8.0 lib/glimmer/dsl/swt/table_items_data_binding_expression.rb
glimmer-0.7.8 lib/glimmer/dsl/swt/table_items_data_binding_expression.rb
glimmer-0.7.7 lib/glimmer/dsl/swt/table_items_data_binding_expression.rb
glimmer-0.7.6 lib/glimmer/dsl/swt/table_items_data_binding_expression.rb
glimmer-0.7.5 lib/glimmer/dsl/swt/table_items_data_binding_expression.rb
glimmer-0.7.4 lib/glimmer/dsl/swt/table_items_data_binding_expression.rb
glimmer-0.7.3 lib/glimmer/dsl/swt/table_items_data_binding_expression.rb
glimmer-0.7.2 lib/glimmer/dsl/swt/table_items_data_binding_expression.rb
glimmer-0.7.1 lib/glimmer/dsl/swt/table_items_data_binding_expression.rb
glimmer-0.7.0 lib/glimmer/dsl/swt/table_items_data_binding_expression.rb
glimmer-0.6.0 lib/glimmer/dsl/swt/table_items_data_binding_expression.rb