Class: AboutPage

Inherits:
JRubyFX::Application
  • Object
show all
Defined in:
lib/jruby_visualizer/about_page.rb

Overview

JRubyFX Application showing information about the Visualizer

Instance Method Summary collapse

Instance Method Details

#open_browser_with(url) ⇒ Object



46
47
48
# File 'lib/jruby_visualizer/about_page.rb', line 46

def open_browser_with(url)
  get_host_services.show_document(url)
end

#start(stage) ⇒ Object



28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
# File 'lib/jruby_visualizer/about_page.rb', line 28

def start(stage)
  with(stage, title: 'About the JRuby Visualizer') do
    fxml(AboutPageController)
    icons.add(Image.new(resource_url(:images, 'jruby-icon-32.png').to_s))
  end

  stage['#jruby_logo'].set_on_mouse_clicked do |e|
      open_browser_with('http://jruby.org')
  end
  stage['#jruby_hyperlink'].set_on_action do |e|
      open_browser_with('http://jruby.org')
  end
  stage['#visualizer_hyperlink'].set_on_action do |e|
    open_browser_with('https://github.com/jruby/jruby-visualizer')
  end
  stage.show
end