Class: Cosmos::TabbedPlotsTab
- Defined in:
- lib/cosmos/tools/tlm_grapher/tabbed_plots_tool/tabbed_plots_tab.rb
Overview
Represents a tab in a tabbed plots definition
Instance Attribute Summary collapse
-
#gui_frame ⇒ Object
Gui object for tab frame.
-
#gui_item ⇒ Object
Gui object for tab item.
-
#gui_layout ⇒ Object
Gui object for tab layout.
-
#plots ⇒ Object
Array of plots in the tab.
-
#tab_text ⇒ Object
Text to display in a tab.
Instance Method Summary collapse
-
#configuration_string ⇒ Object
Returns the configuration lines used to create this tab.
-
#initialize(tab_text = nil) ⇒ TabbedPlotsTab
constructor
Create a new TabbedPlotsTab.
Constructor Details
#initialize(tab_text = nil) ⇒ TabbedPlotsTab
Create a new TabbedPlotsTab
34 35 36 37 38 39 40 |
# File 'lib/cosmos/tools/tlm_grapher/tabbed_plots_tool/tabbed_plots_tab.rb', line 34 def initialize(tab_text = nil) @tab_text = tab_text @plots = [] @gui_item = nil @gui_frame = nil @gui_layout = nil end |
Instance Attribute Details
#gui_frame ⇒ Object
Gui object for tab frame
28 29 30 |
# File 'lib/cosmos/tools/tlm_grapher/tabbed_plots_tool/tabbed_plots_tab.rb', line 28 def gui_frame @gui_frame end |
#gui_item ⇒ Object
Gui object for tab item
25 26 27 |
# File 'lib/cosmos/tools/tlm_grapher/tabbed_plots_tool/tabbed_plots_tab.rb', line 25 def gui_item @gui_item end |
#gui_layout ⇒ Object
Gui object for tab layout
31 32 33 |
# File 'lib/cosmos/tools/tlm_grapher/tabbed_plots_tool/tabbed_plots_tab.rb', line 31 def gui_layout @gui_layout end |
#plots ⇒ Object
Array of plots in the tab
22 23 24 |
# File 'lib/cosmos/tools/tlm_grapher/tabbed_plots_tool/tabbed_plots_tab.rb', line 22 def plots @plots end |
#tab_text ⇒ Object
Text to display in a tab
19 20 21 |
# File 'lib/cosmos/tools/tlm_grapher/tabbed_plots_tool/tabbed_plots_tab.rb', line 19 def tab_text @tab_text end |
Instance Method Details
#configuration_string ⇒ Object
Returns the configuration lines used to create this tab
43 44 45 46 47 48 49 50 51 52 53 |
# File 'lib/cosmos/tools/tlm_grapher/tabbed_plots_tool/tabbed_plots_tab.rb', line 43 def configuration_string if @tab_text string = "TAB \"#{@tab_text}\"\n" else string = "TAB\n" end @plots.each do |plot| string << plot.configuration_string end string end |