Class: Glimmer::SWT::GTabItemComposite

Inherits:
GWidget
  • Object
show all
Defined in:
lib/glimmer/swt/g_tab_item_composite.rb

Instance Attribute Summary collapse

Attributes inherited from GWidget

#widget

Instance Method Summary collapse

Methods inherited from GWidget

#add_listener, #apply_property_type_converters, #async_exec, #can_add_listener?, #dispose, #has_style?, #process_block, #property_type_converters, swt_widget_class_for, #sync_exec, widget_exists?, #widget_listener_exists?

Methods included from Parent

#process_block

Constructor Details

#initialize(tab_item, parent, style, &contents) ⇒ GTabItemComposite

Returns a new instance of GTabItemComposite.



10
11
12
13
14
# File 'lib/glimmer/swt/g_tab_item_composite.rb', line 10

def initialize(tab_item, parent, style, &contents)
  super("composite", parent, style, &contents)
  @tab_item = tab_item
  @tab_item.widget.control = self.widget
end

Instance Attribute Details

#tab_itemObject (readonly)

Returns the value of attribute tab_item.



9
10
11
# File 'lib/glimmer/swt/g_tab_item_composite.rb', line 9

def tab_item
  @tab_item
end

Instance Method Details

#has_attribute?(attribute_name, *args) ⇒ Boolean

Returns:

  • (Boolean)


16
17
18
19
20
21
22
# File 'lib/glimmer/swt/g_tab_item_composite.rb', line 16

def has_attribute?(attribute_name, *args)
  if attribute_name.to_s == "text"
    true
  else
    super(attribute_name, *args)
  end
end

#set_attribute(attribute_name, *args) ⇒ Object



24
25
26
27
28
29
30
31
# File 'lib/glimmer/swt/g_tab_item_composite.rb', line 24

def set_attribute(attribute_name, *args)
  if attribute_name.to_s == "text"
    text_value = args[0]
    @tab_item.widget.text = text_value
  else
    super(attribute_name, *args)
  end
end