Sha256: b262fd4d91ff149ffb8fa2d8c335dd811c8c18e74aabce1e3f09dc252fac6525

Contents?: true

Size: 880 Bytes

Versions: 13

Compression:

Stored size: 880 Bytes

Contents

require File.dirname(__FILE__) + "/../command_handler"
require File.dirname(__FILE__) + "/models/r_widget"
require File.dirname(__FILE__) + "/models/table_items_binding"

#Depends on BindCommandHandler and TableColumnPropertiesDataBindingCommandHandler
class TableItemsDataBindingCommandHandler
  include CommandHandler

  include_package 'org.eclipse.swt.widgets'

  def can_handle?(parent, command_symbol, *args, &block)
    parent.is_a?(RWidget) and
    parent.widget.is_a?(Table) and
    command_symbol.to_s == "items" and
    args.size == 2 and
    args[0].is_a?(ModelBinding) and
    args[0].evaluate_property.is_a?(Array) and
    args[1].is_a?(Array) and
    block == nil
  end

  def do_handle(parent, command_symbol, *args, &block)
    model_binding = args[0]
    column_properties = args[1]
    TableItemsBinding.new(parent, model_binding, column_properties)
  end

end

Version data entries

13 entries across 13 versions & 1 rubygems

Version Path
glimmer-0.3.5 lib/command_handlers/table_items_data_binding_command_handler.rb
glimmer-0.3.4 lib/command_handlers/table_items_data_binding_command_handler.rb
glimmer-0.3.3 lib/command_handlers/table_items_data_binding_command_handler.rb
glimmer-0.3.2 lib/command_handlers/table_items_data_binding_command_handler.rb
glimmer-0.3.1 lib/command_handlers/table_items_data_binding_command_handler.rb
glimmer-0.2.5 lib/command_handlers/table_items_data_binding_command_handler.rb
glimmer-0.2.4 lib/command_handlers/table_items_data_binding_command_handler.rb
glimmer-0.2.3 lib/command_handlers/table_items_data_binding_command_handler.rb
glimmer-0.2.2 lib/command_handlers/table_items_data_binding_command_handler.rb
glimmer-0.2.1 lib/command_handlers/table_items_data_binding_command_handler.rb
glimmer-0.2.0 lib/command_handlers/table_items_data_binding_command_handler.rb
glimmer-0.1.11.SWT4.14 lib/command_handlers/table_items_data_binding_command_handler.rb
glimmer-0.1.11.470 lib/command_handlers/table_items_data_binding_command_handler.rb