Class: Bioroebe::GUI::LibUI::ShowCodonUsage

Inherits:
Object
  • Object
show all
Includes:
ShowCodonUsageModule, LibuiParadise::Extensions
Defined in:
lib/bioroebe/gui/libui/show_codon_usage/show_codon_usage.rb

Overview

Bioroebe::GUI::LibUI::ShowCodonUsage

Constant Summary

Constants included from ShowCodonUsageModule

ShowCodonUsageModule::HEIGHT, ShowCodonUsageModule::TEST_SEQUENCE, ShowCodonUsageModule::TITLE, ShowCodonUsageModule::USE_THIS_FONT, ShowCodonUsageModule::WIDTH

Instance Method Summary collapse

Methods included from ShowCodonUsageModule

#border_size?, #create_box_top_five_codons, #create_the_label_showing_n_nucleotides, #create_the_label_top_five_codons, #create_the_main_entry, #create_the_text_view, #do_the_conversion, #do_the_conversion_then_update_the_label_as_well, #handle_the_commandline_arguments, #padding?, #reset_the_shared_module, #sync_the_input_sequence_onto_the_main_entry, #update_the_main_label_denoting_how_many_nucleotides_can_be_found_in_the_main_sequence

Constructor Details

#initialize(run_already = true) ⇒ ShowCodonUsage

#

initialize

#


24
25
26
27
28
29
# File 'lib/bioroebe/gui/libui/show_codon_usage/show_codon_usage.rb', line 24

def initialize(
    run_already = true
  )
  reset
  run if run_already
end

Instance Method Details

#create_skeletonObject

#

create_skeleton (create tag)

#


41
42
43
44
45
46
47
# File 'lib/bioroebe/gui/libui/show_codon_usage/show_codon_usage.rb', line 41

def create_skeleton
  create_the_main_entry
  create_the_label_top_five_codons
  create_the_label_showing_n_nucleotides
  create_box_top_five_codons
  create_the_text_view
end

#resetObject

#

reset (reset tag)

#


34
35
36
# File 'lib/bioroebe/gui/libui/show_codon_usage/show_codon_usage.rb', line 34

def reset
  reset_the_shared_module
end

#runObject

#

run

#


52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
# File 'lib/bioroebe/gui/libui/show_codon_usage/show_codon_usage.rb', line 52

def run
  create_skeleton
  window = ui_padded_main_window(
    TITLE,
    WIDTH,
    HEIGHT,
    0
  )
 
  outer_vbox = padded_vbox
  mini_hbox = hbox
  mini_hbox.maximal(@entry1)
  button_do_the_conversion = button('Do the conversion')
  button_do_the_conversion.on_clicked {
    do_the_conversion_then_update_the_label_as_well
  }
  mini_hbox.minimal(button_do_the_conversion)
  outer_vbox.minimal(mini_hbox)
  outer_vbox.add_hsep
  outer_vbox.minimal(@label_showing_n_nucleotides)
  outer_vbox.add_hsep
  mini_hbox = hbox
  @box_top_five_codons.minimal(@label_top_five_codons, 10)
  mini_hbox.maximal(@text_view)
  mini_hbox.maximal(@box_top_five_codons)
  outer_vbox.maximal(mini_hbox)
  outer_vbox.add_hsep
  button_quit = quit_button
  outer_vbox.minimal(button_quit)
  window.add(outer_vbox)
  window.intelligent_exit
end