Class: Glimmer::SWT::TableColumnProxy
- Inherits:
-
WidgetProxy
- Object
- WidgetProxy
- Glimmer::SWT::TableColumnProxy
- Includes:
- Glimmer
- Defined in:
- lib/glimmer/swt/table_column_proxy.rb
Constant Summary
Constants inherited from WidgetProxy
WidgetProxy::DEFAULT_INITIALIZERS
Instance Attribute Summary collapse
-
#text ⇒ Object
Returns the value of attribute text.
-
#width ⇒ Object
Returns the value of attribute width.
Attributes inherited from WidgetProxy
#args, #background, #children, #enabled, #font, #foreground, #parent, #path
Instance Method Summary collapse
- #css ⇒ Object
- #dom ⇒ Object
- #element ⇒ Object
- #observation_request_to_event_mapping ⇒ Object
- #parent_path ⇒ Object
Methods inherited from WidgetProxy
#add_child, #add_css_class, #add_css_classes, #add_observer, #apply_property_type_converters, #build_dom, #can_handle_observation_request?, #clear_css_classes, #content, #css_classes, #dispose, #dom_element, for, #handle_observation_request, #has_style?, #id, #id=, #initialize, #listener_dom_element, #listener_path, max_id_number_for, max_id_numbers, #name, next_id_number_for, #parent_dom_element, #property_type_converters, #remove_css_class, #remove_css_classes, #render, reset_max_id_numbers!, #selector, #set_attribute, #style_element, underscored_widget_name, widget_class, widget_exists?, #widget_property_listener_installers
Methods included from PropertyOwner
#attribute_getter, #attribute_setter, #get_attribute, #set_attribute
Constructor Details
This class inherits a constructor from Glimmer::SWT::WidgetProxy
Instance Attribute Details
#text ⇒ Object
Returns the value of attribute text.
8 9 10 |
# File 'lib/glimmer/swt/table_column_proxy.rb', line 8 def text @text end |
#width ⇒ Object
Returns the value of attribute width.
8 9 10 |
# File 'lib/glimmer/swt/table_column_proxy.rb', line 8 def width @width end |
Instance Method Details
#css ⇒ Object
24 25 26 27 28 |
# File 'lib/glimmer/swt/table_column_proxy.rb', line 24 def css <<~CSS width: #{width}px; CSS end |
#dom ⇒ Object
42 43 44 45 46 47 48 49 50 51 52 53 |
# File 'lib/glimmer/swt/table_column_proxy.rb', line 42 def dom table_column_text = text table_column_id = id table_column_id_style = css table_column_css_classes = css_classes table_column_css_classes << name @dom ||= html { th(id: table_column_id, style: table_column_id_style, class: table_column_css_classes.to_a.join(' ')) { table_column_text } }.to_s end |
#element ⇒ Object
30 31 32 |
# File 'lib/glimmer/swt/table_column_proxy.rb', line 30 def element 'th' end |
#observation_request_to_event_mapping ⇒ Object
34 35 36 37 38 39 40 |
# File 'lib/glimmer/swt/table_column_proxy.rb', line 34 def observation_request_to_event_mapping { 'on_widget_selected' => { event: 'click' }, } end |
#parent_path ⇒ Object
20 21 22 |
# File 'lib/glimmer/swt/table_column_proxy.rb', line 20 def parent_path parent.columns_path end |