Class: Gtk::ProgressBar

Inherits:
Object show all
Defined in:
lib/knj/jruby-gtk2/progressbar.rb

Instance Method Summary collapse

Constructor Details

#initializeProgressBar

Returns a new instance of ProgressBar.



2
3
4
5
6
7
8
9
10
11
# File 'lib/knj/jruby-gtk2/progressbar.rb', line 2

def initialize
  if Gtk.takeob
    @ob = Gtk.takeob
    Gtk.takeob = nil
  else
    splitted = self.class.to_s.split("::")
    javaname = "org.gnome." + splitted.first.downcase + "." + splitted.last
    @ob = Gtk.evalob(javaname).new
  end
end