Class: Glimmer::SWT::CommandHandlers::LayoutDataCommandHandler

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

Instance Method Summary collapse

Instance Method Details

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

Returns:

  • (Boolean)


14
15
16
17
# File 'lib/glimmer/swt/command_handlers/layout_data_command_handler.rb', line 14

def can_handle?(parent, command_symbol, *args, &block)
  parent.is_a?(GWidget) and
  command_symbol.to_s == 'layout_data'
end

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



19
20
21
22
# File 'lib/glimmer/swt/command_handlers/layout_data_command_handler.rb', line 19

def do_handle(parent, command_symbol, *args, &block)
  Glimmer.logger.debug "Layout Data args are: #{args.inspect}"
  GLayoutData.new(parent.widget, args)
end