Sha256: 9567755cc7938ae50ad46ce2660a084e33d5eda4e76af4561e47d7919298d30f
Contents?: true
Size: 1.23 KB
Versions: 2
Compression:
Stored size: 1.23 KB
Contents
# -*- coding: utf-8 -*- require "rubeus/component_loader" require "rubeus/awt" module Rubeus Swing = ComponentLoader.new("javax.swing") do class_to_package.update({ # $JAVA_HOME/lib/classlistにないものリスト 'JTextPane' => 'javax.swing', 'RTFEditorKit' => 'javax.swing.text.rtf', 'DefaultTableModel' => 'javax.swing.table', 'DelegatableTableModel' => 'jp.rubybizcommons.rubeus.extensions.javax.swing.table', 'ReadonlyableTableModel' => 'jp.rubybizcommons.rubeus.extensions.javax.swing.table', }) class_to_package['DefaultStyledDocument'] ||= 'javax.swing.text' # Windowsにない? def self.irb Rubeus::Awt.extend_with self.extend_with end end end Rubeus::Swing.depend_on('JComponent') =begin import "javax.swing.JFrame" require "swing_ext" frame = JFrame.new("JDBC Query") frame.set_size(400, 300) frame.default_close_operation = JFrame::EXIT_ON_CLOSE frame.events frame.event_methods(:key) frame.event_methods(:key, :typed) frame.event_methods(:key, "typed") frame.event_methods(:key, :keyTyped) frame.event_methods(:key, :keyTyped) frame.event_methods(:key, "key_typed") frame.event_methods(:key, "key_Typed") frame.events.each frame.visible = true =end
Version data entries
2 entries across 2 versions & 1 rubygems
Version | Path |
---|---|
rubeus-0.0.8-java | lib/rubeus/swing.rb |
rubeus-0.0.7-java | lib/rubeus/swing.rb |