class EnvironmentInformation::GUI::EnvironmentInformation
Public Class Methods
Public Instance Methods
reset()
click to toggle source
run()
click to toggle source
#¶ ↑
run¶ ↑
#¶ ↑
# File lib/environment_information/gui/jruby/environment_information.rb, line 41 def run frame = frame(TITLE) panel = new_panel # This is an instance of Java::JavaxSwing::JPanel. panel.use_this_font = :hack_40 frame.getContentPane.add(panel) panel.setLayout(BoxLayout.new(panel, BoxLayout::PAGE_AXIS)) # FlowLayout.new) 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.use_this_font = :hack_35 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