Sha256: f7fd3f010ad84494b2c3f3b047f57faac0cb59c6d07f4c6ff054dc9607c27d41

Contents?: true

Size: 691 Bytes

Versions: 1

Compression:

Stored size: 691 Bytes

Contents

Rubeus::Awt.depend_on('Container', 'Window', 'Frame')
Rubeus::Swing.depend_on('JPanel')

module Rubeus::Extensions::Javax::Swing
  module JFrame
    def self.included(base)
      base.perform_as_container
      base.default_attributes = {
        :size => [400, 300],
        :default_close_operation => :EXIT_ON_CLOSE
      }
      if ENV_JAVA["java.specification.version"] == "1.6"
        base.module_eval do
          alias_method :size=, :set_size
        end
      end
    end

    if ENV_JAVA["java.specification.version"] == "1.6"
      def set_size(*args)
        java_send :setSize, [java.awt.Dimension], 
          Rubeus::Awt::Dimension.create(*args)
      end
    end
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
rubeus-0.0.8-java lib/rubeus/extensions/javax/swing/j_frame.rb