Class: EnvironmentInformation::GUI::EnvironmentInformation
Constant Summary
UniversalWidgets::EnvironmentInformationModule::FONT_SIZE, UniversalWidgets::EnvironmentInformationModule::LARGER_FONT, UniversalWidgets::EnvironmentInformationModule::N, UniversalWidgets::EnvironmentInformationModule::SMALLER_FONT, UniversalWidgets::EnvironmentInformationModule::TITLE, UniversalWidgets::EnvironmentInformationModule::USE_THIS_FONT
Instance Method Summary
collapse
#assign_the_environment_information_dataset_to_the_data_variable, #border_size?, #favicon?, #padding?, #reset_the_variables, #smaller_font?
Constructor Details
24
25
26
27
28
29
|
# File 'lib/environment_information/gui/jruby/environment_information.rb', line 24
def initialize(
run_already = true
)
reset
run if run_already
end
|
Instance Method Details
#reset ⇒ Object
34
35
36
|
# File 'lib/environment_information/gui/jruby/environment_information.rb', line 34
def reset
reset_the_variables
end
|
#run ⇒ Object
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
|
# File 'lib/environment_information/gui/jruby/environment_information.rb', line 41
def run
frame = frame(TITLE)
panel = new_panel panel.use_this_font = :hack_40
frame.getContentPane.add(panel)
panel.setLayout(BoxLayout.new(panel, BoxLayout::PAGE_AXIS)) panel.hint = 'Table example'
text_view = create_text_view
_ = ''.dup
@data.each_pair {|key, value|
key = "#{key}:"
key = key.ljust(25, ' ')
_ << "#{key}"\
"#{value}\n"
}
text_view.set_content(_)
text_view.set_font(Font.new('Hack', Font::PLAIN, 30))
scrolled_window = create_scrolled_window(text_view)
panel << scrolled_window
panel << quit_button
frame.use_this_font = :hack_45
frame.exit_on_close
frame.set_size(1550, 900)
frame.setLocationRelativeTo(nil)
frame.show_all
end
|