Class: Redcar::EditViewSWT::Tab
- Inherits:
-
ApplicationSWT::Tab
- Object
- ApplicationSWT::Tab
- Redcar::EditViewSWT::Tab
- Includes:
- Observable
- Defined in:
- plugins/edit_view_swt/lib/edit_view_swt/edit_tab.rb
Constant Summary
Constant Summary
Constants included from Observable
Instance Attribute Summary (collapse)
-
- (Object) edit_view
readonly
Returns the value of attribute edit_view.
-
- (Object) item
readonly
Returns the value of attribute item.
Attributes inherited from ApplicationSWT::Tab
Instance Method Summary (collapse)
-
- (Object) close
Close the EditTab, disposing of any resources along the way.
-
- (Object) focus
Focuses the CTabItem within the CTabFolder, and gives the keyboard focus to the EditViewSWT.
-
- (Tab) initialize(*args)
constructor
A new instance of Tab.
Methods included from Observable
#add_listener, #notify_listeners, #remove_listener
Methods inherited from ApplicationSWT::Tab
#attach_listeners, #create_item_widget, #dragging=, #dragging?, #move_tab_widget_to_current_notebook, #move_tab_widget_to_position, #set_icon, #set_notebook, #swt_focus_gained
Constructor Details
- (Tab) initialize(*args)
A new instance of Tab
8 9 10 11 |
# File 'plugins/edit_view_swt/lib/edit_view_swt/edit_tab.rb', line 8 def initialize(*args) super @model.add_listener(:changed_title) { |title| @item.text = title } end |
Instance Attribute Details
- (Object) edit_view (readonly)
Returns the value of attribute edit_view
6 7 8 |
# File 'plugins/edit_view_swt/lib/edit_view_swt/edit_tab.rb', line 6 def edit_view @edit_view end |
- (Object) item (readonly)
Returns the value of attribute item
6 7 8 |
# File 'plugins/edit_view_swt/lib/edit_view_swt/edit_tab.rb', line 6 def item @item end |
Instance Method Details
- (Object) close
Close the EditTab, disposing of any resources along the way.
21 22 23 24 25 |
# File 'plugins/edit_view_swt/lib/edit_view_swt/edit_tab.rb', line 21 def close @edit_view.dispose @widget.dispose super end |
- (Object) focus
Focuses the CTabItem within the CTabFolder, and gives the keyboard focus to the EditViewSWT.
15 16 17 18 |
# File 'plugins/edit_view_swt/lib/edit_view_swt/edit_tab.rb', line 15 def focus super edit_view.focus end |