Module: Cheri::Java

Defined in:
lib/cheri/java/java.rb,
lib/cheri/java/builder/main.rb,
lib/cheri/java/builder/util.rb

Defined Under Namespace

Modules: Builder

Constant Summary collapse

JRuby =

:nodoc:

Cheri::JRuby
ImageIcon =
javax.swing.ImageIcon
CL =
java.lang.ClassLoader
BUG_JRUBY_3476 =
!x.java_class

Class Method Summary collapse

Class Method Details

.cheri_iconObject

Returns the 16x16 Cheri icon.



50
51
52
# File 'lib/cheri/java/java.rb', line 50

def cheri_icon
  @cheri_icon ||= get_icon('cheri_icon_16x16.png')
end

.get_class(*r) ⇒ Object



38
39
40
# File 'lib/cheri/java/java.rb', line 38

def get_class(*r)
  JRuby.get_class(*r)
end

.get_icon(n) ⇒ Object

call-seq:

Cheri::Java.get_icon(filename) -> icon

Returns an instance of LocatableIcon for file at #Cheri.img_path#filename.



45
46
47
48
# File 'lib/cheri/java/java.rb', line 45

def get_icon(n)
  path = "#{Cheri.img_path}#{n}"
  @icons[path] ||= ImageIcon.new(CL.get_system_resource(path) || path)
end