Class: Glimmer::SWT::CommandHandlers::TableItemsDataBindingCommandHandler

Inherits:
Object
  • Object
show all
Includes:
CommandHandler
Defined in:
lib/glimmer/swt/command_handlers/table_items_data_binding_command_handler.rb

Overview

Depends on BindCommandHandler and TableColumnPropertiesDataBindingCommandHandler

Instance Method Summary collapse

Instance Method Details

#can_handle?(parent, command_symbol, *args, &block) ⇒ Boolean

Returns:

  • (Boolean)


14
15
16
17
18
19
20
21
22
23
# File 'lib/glimmer/swt/command_handlers/table_items_data_binding_command_handler.rb', line 14

def can_handle?(parent, command_symbol, *args, &block)
  parent.is_a?(GWidget) 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

#do_handle(parent, command_symbol, *args, &block) ⇒ Object



25
26
27
28
29
# File 'lib/glimmer/swt/command_handlers/table_items_data_binding_command_handler.rb', line 25

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