bakkdoor-rswing 0.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (5) hide show
  1. data/LICENSE +171 -0
  2. data/README +52 -0
  3. data/Rakefile +8 -0
  4. data/lib/rswing.rb +2 -0
  5. metadata +59 -0
data/LICENSE ADDED
@@ -0,0 +1,171 @@
1
+ RSwing is licensed under the GNU LGPL v3.
2
+ Copyright (C) 2008 Christopher Bertels, Waldemar Smirnow.
3
+
4
+ =============================================================================================
5
+
6
+ GNU LESSER GENERAL PUBLIC LICENSE
7
+ Version 3, 29 June 2007
8
+
9
+ Copyright (C) 2007 Free Software Foundation, Inc. <http://fsf.org/>
10
+ Everyone is permitted to copy and distribute verbatim copies
11
+ of this license document, but changing it is not allowed.
12
+
13
+
14
+ This version of the GNU Lesser General Public License incorporates
15
+ the terms and conditions of version 3 of the GNU General Public
16
+ License, supplemented by the additional permissions listed below.
17
+
18
+ 0. Additional Definitions.
19
+
20
+ As used herein, "this License" refers to version 3 of the GNU Lesser
21
+ General Public License, and the "GNU GPL" refers to version 3 of the GNU
22
+ General Public License.
23
+
24
+ "The Library" refers to a covered work governed by this License,
25
+ other than an Application or a Combined Work as defined below.
26
+
27
+ An "Application" is any work that makes use of an interface provided
28
+ by the Library, but which is not otherwise based on the Library.
29
+ Defining a subclass of a class defined by the Library is deemed a mode
30
+ of using an interface provided by the Library.
31
+
32
+ A "Combined Work" is a work produced by combining or linking an
33
+ Application with the Library. The particular version of the Library
34
+ with which the Combined Work was made is also called the "Linked
35
+ Version".
36
+
37
+ The "Minimal Corresponding Source" for a Combined Work means the
38
+ Corresponding Source for the Combined Work, excluding any source code
39
+ for portions of the Combined Work that, considered in isolation, are
40
+ based on the Application, and not on the Linked Version.
41
+
42
+ The "Corresponding Application Code" for a Combined Work means the
43
+ object code and/or source code for the Application, including any data
44
+ and utility programs needed for reproducing the Combined Work from the
45
+ Application, but excluding the System Libraries of the Combined Work.
46
+
47
+ 1. Exception to Section 3 of the GNU GPL.
48
+
49
+ You may convey a covered work under sections 3 and 4 of this License
50
+ without being bound by section 3 of the GNU GPL.
51
+
52
+ 2. Conveying Modified Versions.
53
+
54
+ If you modify a copy of the Library, and, in your modifications, a
55
+ facility refers to a function or data to be supplied by an Application
56
+ that uses the facility (other than as an argument passed when the
57
+ facility is invoked), then you may convey a copy of the modified
58
+ version:
59
+
60
+ a) under this License, provided that you make a good faith effort to
61
+ ensure that, in the event an Application does not supply the
62
+ function or data, the facility still operates, and performs
63
+ whatever part of its purpose remains meaningful, or
64
+
65
+ b) under the GNU GPL, with none of the additional permissions of
66
+ this License applicable to that copy.
67
+
68
+ 3. Object Code Incorporating Material from Library Header Files.
69
+
70
+ The object code form of an Application may incorporate material from
71
+ a header file that is part of the Library. You may convey such object
72
+ code under terms of your choice, provided that, if the incorporated
73
+ material is not limited to numerical parameters, data structure
74
+ layouts and accessors, or small macros, inline functions and templates
75
+ (ten or fewer lines in length), you do both of the following:
76
+
77
+ a) Give prominent notice with each copy of the object code that the
78
+ Library is used in it and that the Library and its use are
79
+ covered by this License.
80
+
81
+ b) Accompany the object code with a copy of the GNU GPL and this license
82
+ document.
83
+
84
+ 4. Combined Works.
85
+
86
+ You may convey a Combined Work under terms of your choice that,
87
+ taken together, effectively do not restrict modification of the
88
+ portions of the Library contained in the Combined Work and reverse
89
+ engineering for debugging such modifications, if you also do each of
90
+ the following:
91
+
92
+ a) Give prominent notice with each copy of the Combined Work that
93
+ the Library is used in it and that the Library and its use are
94
+ covered by this License.
95
+
96
+ b) Accompany the Combined Work with a copy of the GNU GPL and this license
97
+ document.
98
+
99
+ c) For a Combined Work that displays copyright notices during
100
+ execution, include the copyright notice for the Library among
101
+ these notices, as well as a reference directing the user to the
102
+ copies of the GNU GPL and this license document.
103
+
104
+ d) Do one of the following:
105
+
106
+ 0) Convey the Minimal Corresponding Source under the terms of this
107
+ License, and the Corresponding Application Code in a form
108
+ suitable for, and under terms that permit, the user to
109
+ recombine or relink the Application with a modified version of
110
+ the Linked Version to produce a modified Combined Work, in the
111
+ manner specified by section 6 of the GNU GPL for conveying
112
+ Corresponding Source.
113
+
114
+ 1) Use a suitable shared library mechanism for linking with the
115
+ Library. A suitable mechanism is one that (a) uses at run time
116
+ a copy of the Library already present on the user's computer
117
+ system, and (b) will operate properly with a modified version
118
+ of the Library that is interface-compatible with the Linked
119
+ Version.
120
+
121
+ e) Provide Installation Information, but only if you would otherwise
122
+ be required to provide such information under section 6 of the
123
+ GNU GPL, and only to the extent that such information is
124
+ necessary to install and execute a modified version of the
125
+ Combined Work produced by recombining or relinking the
126
+ Application with a modified version of the Linked Version. (If
127
+ you use option 4d0, the Installation Information must accompany
128
+ the Minimal Corresponding Source and Corresponding Application
129
+ Code. If you use option 4d1, you must provide the Installation
130
+ Information in the manner specified by section 6 of the GNU GPL
131
+ for conveying Corresponding Source.)
132
+
133
+ 5. Combined Libraries.
134
+
135
+ You may place library facilities that are a work based on the
136
+ Library side by side in a single library together with other library
137
+ facilities that are not Applications and are not covered by this
138
+ License, and convey such a combined library under terms of your
139
+ choice, if you do both of the following:
140
+
141
+ a) Accompany the combined library with a copy of the same work based
142
+ on the Library, uncombined with any other library facilities,
143
+ conveyed under the terms of this License.
144
+
145
+ b) Give prominent notice with the combined library that part of it
146
+ is a work based on the Library, and explaining where to find the
147
+ accompanying uncombined form of the same work.
148
+
149
+ 6. Revised Versions of the GNU Lesser General Public License.
150
+
151
+ The Free Software Foundation may publish revised and/or new versions
152
+ of the GNU Lesser General Public License from time to time. Such new
153
+ versions will be similar in spirit to the present version, but may
154
+ differ in detail to address new problems or concerns.
155
+
156
+ Each version is given a distinguishing version number. If the
157
+ Library as you received it specifies that a certain numbered version
158
+ of the GNU Lesser General Public License "or any later version"
159
+ applies to it, you have the option of following the terms and
160
+ conditions either of that published version or of any later version
161
+ published by the Free Software Foundation. If the Library as you
162
+ received it does not specify a version number of the GNU Lesser
163
+ General Public License, you may choose any version of the GNU Lesser
164
+ General Public License ever published by the Free Software Foundation.
165
+
166
+ If the Library as you received it specifies that a proxy can decide
167
+ whether future versions of the GNU Lesser General Public License shall
168
+ apply, that proxy's public statement of acceptance of any version is
169
+ permanent authorization for you to choose that version for the
170
+ Library.
171
+
data/README ADDED
@@ -0,0 +1,52 @@
1
+ == RSwing - Swing wrapper for JRuby
2
+
3
+ RSwing is licensed under the GNU LGPL v3. For more information, take a look at
4
+ the LICENSE file.
5
+
6
+ ================================================================================
7
+
8
+ RSwing is a wrapper of the Swing GUI-Framework of the Java Platform for JRuby.
9
+ The goal is to provide a ruby-ish wrapper library to Swing, which makes it feel
10
+ more like an actual ruby library rather than just a plain interface to the java
11
+ classes.
12
+
13
+ For example, RSwing tries to make heavy use of blocks, symbols and similar
14
+ typical ruby concepts.
15
+
16
+ ================================================================================
17
+
18
+ Some examples:
19
+
20
+ Frame.new("hello, world") do |frame|
21
+ frame.default_close_operation = :exit_on_close
22
+ frame.size = java.awt.Dimension.new(200,200)
23
+
24
+ # create a new button, belonging to this frame with a given name to access it easily later
25
+ Button.new("OK", :belongs_to => frame, :name => :okButton) do |btn|
26
+
27
+ btn.on_click do
28
+ Dialog.show frame, "Button clicked!", :dialog_type => :info, :title => "My Title"
29
+ end
30
+
31
+ btn.on_focus do
32
+ puts "button has now focus"
33
+ end
34
+
35
+ btn.on_focus_lost do
36
+ puts "button has lost focus"
37
+ end
38
+ end
39
+
40
+ # accessing components of frame via :name attribute given to button:
41
+ puts "text property of : #{frame[:okButton].text}"
42
+
43
+ # options-dialog
44
+ options = ["Yes", "No", "Cancel"]
45
+ selected_value = Dialog.showOption(frame, options.join(" or ") + "?",
46
+ :option_values => options,
47
+ :option_type => :yes_no_cancel)
48
+
49
+ puts "#{selected_value} was selected"
50
+
51
+ frame.visible = true
52
+ end
data/Rakefile ADDED
@@ -0,0 +1,8 @@
1
+ #
2
+ # To change this template, choose Tools | Templates
3
+ # and open the template in the editor.
4
+
5
+
6
+ require 'rake'
7
+ require 'rake/testtask'
8
+ require 'rake/rdoctask'
data/lib/rswing.rb ADDED
@@ -0,0 +1,2 @@
1
+ require "java"
2
+ $: << File.expand_path(File.dirname(__FILE__) + "/rswing/components")
metadata ADDED
@@ -0,0 +1,59 @@
1
+ --- !ruby/object:Gem::Specification
2
+ name: bakkdoor-rswing
3
+ version: !ruby/object:Gem::Version
4
+ version: 0.1.0
5
+ platform: ruby
6
+ authors:
7
+ - Christopher Bertels
8
+ autorequire:
9
+ bindir: bin
10
+ cert_chain: []
11
+
12
+ date: 2008-10-05 00:00:00 -07:00
13
+ default_executable:
14
+ dependencies: []
15
+
16
+ description: RSwing is a wrapper of the Swing GUI-Framework of the Java Platform for JRuby. The goal is to provide a ruby-ish wrapper library to Swing, which makes it feel more like an actual ruby library rather than just a plain interface to the java classes.
17
+ email: bakkdoor@flasht.de
18
+ executables: []
19
+
20
+ extensions: []
21
+
22
+ extra_rdoc_files:
23
+ - README
24
+ files:
25
+ - README
26
+ - LICENSE
27
+ - Rakefile
28
+ - lib/rswing.rb
29
+ - lib/rswing/components/*.rb
30
+ - lib/rswing/components/events/*.rb
31
+ has_rdoc: true
32
+ homepage: http://github.com/bakkdoor/rswing
33
+ post_install_message:
34
+ rdoc_options:
35
+ - --main
36
+ - README
37
+ require_paths:
38
+ - lib
39
+ required_ruby_version: !ruby/object:Gem::Requirement
40
+ requirements:
41
+ - - ">="
42
+ - !ruby/object:Gem::Version
43
+ version: "0"
44
+ version:
45
+ required_rubygems_version: !ruby/object:Gem::Requirement
46
+ requirements:
47
+ - - ">="
48
+ - !ruby/object:Gem::Version
49
+ version: "0"
50
+ version:
51
+ requirements:
52
+ - none
53
+ rubyforge_project:
54
+ rubygems_version: 1.2.0
55
+ signing_key:
56
+ specification_version: 2
57
+ summary: RSwing - Ruby-ish wrapper of Swing GUI-Framework for JRuby
58
+ test_files: []
59
+