Sha256: e63b8eed7935a8d4e8df3b1f203ffee847ce0b9805524c60dbfc9ba1dc586b07

Contents?: true

Size: 984 Bytes

Versions: 2

Compression:

Stored size: 984 Bytes

Contents

=begin
  Require this file to do Clevic in Swing with JRuby
=end

require 'pathname'

# This seems to be required for jruby-1.5.x (at least for 1.5.2)
require 'java'

# require these first, so TableModel and TableView get the correct ancestors
require 'clevic/swing/table_model.rb'
require 'clevic/swing/table_view.rb'

# all other files in the swing subdirectory
( Pathname.new( __FILE__ ).parent + 'swing' ).children.grep( /.rb$/ ).each do |child|
  require child.to_s
end

# now require the generic parts
require 'clevic/table_model'
require 'clevic/table_view'
require 'clevic.rb'

module Clevic

def self.tahoma
  if @font.nil?
    @font = 
    begin
      found = java.awt.GraphicsEnvironment.local_graphics_environment.all_fonts.select {|f| f.font_name == "Tahoma"}.first
      found.deriveFont( 13.0 )
      java.awt.Font.new( 'DialogInput', java.awt.Font::PLAIN, 13 )
  rescue
      java.awt.Font.new( 'DialogInput', java.awt.Font::PLAIN, 13 )
    end
  end
  @font
end

end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
clevic-0.13.0.b3 lib/clevic/swing.rb
clevic-0.13.0.b2 lib/clevic/swing.rb