class Roby::GUI::SchedulerView

Public Instance Methods

display(state) click to toggle source

Displays the state of the scheduler. It clears existing information

@param [Schedulers::State] state the state

# File lib/roby/gui/scheduler_view.rb, line 40
def display(state)
    code = erb.result(binding)
    self.html = code
end
erb() click to toggle source
# File lib/roby/gui/scheduler_view.rb, line 18
def erb
    if !@erb
        template = File.read(scheduler_view_rhtml)
        @erb = ERB.new(template)
    end
    return @erb
end
format_msg_string(msg, *args) click to toggle source
# File lib/roby/gui/scheduler_view.rb, line 26
def format_msg_string(msg, *args)
    args.each_with_index.inject(msg) do |msg, (a, i)|
        a = if a.respond_to?(:map)
                a.map(&:to_s).join(", ")
            else a.to_s
            end
        msg.gsub "%#{i + 1}", a
    end
end
ressources_dir() click to toggle source
# File lib/roby/gui/scheduler_view.rb, line 6
def ressources_dir
    File.expand_path(File.dirname(__FILE__))
end
scheduler_view_css() click to toggle source
# File lib/roby/gui/scheduler_view.rb, line 10
def scheduler_view_css
    File.join(ressources_dir, "scheduler_view.css")
end
scheduler_view_rhtml() click to toggle source
# File lib/roby/gui/scheduler_view.rb, line 14
def scheduler_view_rhtml
    File.join(ressources_dir, "scheduler_view.rhtml")
end