Class: SubAppTask

Inherits:
Object
  • Object
show all
Defined in:
lib/jruby_visualizer/visualizer_main_app.rb

Overview

A concurrent Task for a JRubyFX application from the Visualizer

Instance Method Summary collapse

Constructor Details

#initialize(view_name) ⇒ SubAppTask

Returns a new instance of SubAppTask.



79
80
81
82
83
84
85
86
87
88
89
90
91
92
# File 'lib/jruby_visualizer/visualizer_main_app.rb', line 79

def initialize(view_name)
  super()
  # (select view)
  case view_name
  when :ir_view
    @view = IRVisualizer.new
  when :cfg_view
    @view = CFGVisualizer.new
  when :about_page
    @view = AboutPage.new
  else
    raise "unknown name for a view: #{view_name}"
  end
end

Instance Method Details

#callObject



94
95
96
97
# File 'lib/jruby_visualizer/visualizer_main_app.rb', line 94

def call
  stage = Java::javafx.stage.Stage.new
  @view.start(stage)
end