profligacy 0.2-jruby
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.
- data/COPYING +55 -0
- data/LICENSE +55 -0
- data/README +22 -0
- data/Rakefile +48 -0
- data/doc/rdoc/classes/Proc.html +152 -0
- data/doc/rdoc/classes/Proc.src/M000001.html +18 -0
- data/doc/rdoc/classes/Proc.src/M000002.html +18 -0
- data/doc/rdoc/classes/Profligacy.html +111 -0
- data/doc/rdoc/classes/Profligacy/Swing.html +113 -0
- data/doc/rdoc/classes/Profligacy/Swing/Build.html +238 -0
- data/doc/rdoc/classes/Profligacy/Swing/Build.src/M000003.html +23 -0
- data/doc/rdoc/classes/Profligacy/Swing/Build.src/M000004.html +18 -0
- data/doc/rdoc/classes/Profligacy/Swing/Build.src/M000005.html +45 -0
- data/doc/rdoc/classes/Profligacy/Swing/Build.src/M000006.html +18 -0
- data/doc/rdoc/classes/Profligacy/Swing/Build.src/M000007.html +22 -0
- data/doc/rdoc/classes/Profligacy/Swing/Listeners.html +123 -0
- data/doc/rdoc/classes/Profligacy/Swing/RunnableProc.html +161 -0
- data/doc/rdoc/classes/Profligacy/Swing/RunnableProc.src/M000008.html +18 -0
- data/doc/rdoc/classes/Profligacy/Swing/RunnableProc.src/M000009.html +18 -0
- data/doc/rdoc/created.rid +1 -0
- data/doc/rdoc/files/COPYING.html +168 -0
- data/doc/rdoc/files/LICENSE.html +168 -0
- data/doc/rdoc/files/README.html +127 -0
- data/doc/rdoc/files/lib/profligacy/swing_rb.html +108 -0
- data/doc/rdoc/fr_class_index.html +32 -0
- data/doc/rdoc/fr_file_index.html +30 -0
- data/doc/rdoc/fr_method_index.html +35 -0
- data/doc/rdoc/index.html +24 -0
- data/doc/rdoc/rdoc-style.css +208 -0
- data/examples/prefuse_sample.rb +62 -0
- data/examples/swing1.rb +19 -0
- data/examples/swing2.rb +26 -0
- data/examples/swing3.rb +38 -0
- data/examples/swing4.rb +34 -0
- data/examples/swing5.rb +31 -0
- data/examples/swing6.rb +33 -0
- data/examples/swing7.rb +37 -0
- data/examples/swing8.rb +64 -0
- data/lib/profligacy/swing.rb +139 -0
- data/tools/rakehelp.rb +121 -0
- metadata +88 -0
@@ -0,0 +1,113 @@
|
|
1
|
+
<?xml version="1.0" encoding="iso-8859-1"?>
|
2
|
+
<!DOCTYPE html
|
3
|
+
PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
|
4
|
+
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
5
|
+
|
6
|
+
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
|
7
|
+
<head>
|
8
|
+
<title>Module: Profligacy::Swing</title>
|
9
|
+
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
|
10
|
+
<meta http-equiv="Content-Script-Type" content="text/javascript" />
|
11
|
+
<link rel="stylesheet" href="../.././rdoc-style.css" type="text/css" media="screen" />
|
12
|
+
<script type="text/javascript">
|
13
|
+
// <![CDATA[
|
14
|
+
|
15
|
+
function popupCode( url ) {
|
16
|
+
window.open(url, "Code", "resizable=yes,scrollbars=yes,toolbar=no,status=no,height=150,width=400")
|
17
|
+
}
|
18
|
+
|
19
|
+
function toggleCode( id ) {
|
20
|
+
if ( document.getElementById )
|
21
|
+
elem = document.getElementById( id );
|
22
|
+
else if ( document.all )
|
23
|
+
elem = eval( "document.all." + id );
|
24
|
+
else
|
25
|
+
return false;
|
26
|
+
|
27
|
+
elemStyle = elem.style;
|
28
|
+
|
29
|
+
if ( elemStyle.display != "block" ) {
|
30
|
+
elemStyle.display = "block"
|
31
|
+
} else {
|
32
|
+
elemStyle.display = "none"
|
33
|
+
}
|
34
|
+
|
35
|
+
return true;
|
36
|
+
}
|
37
|
+
|
38
|
+
// Make codeblocks hidden by default
|
39
|
+
document.writeln( "<style type=\"text/css\">div.method-source-code { display: none }</style>" )
|
40
|
+
|
41
|
+
// ]]>
|
42
|
+
</script>
|
43
|
+
|
44
|
+
</head>
|
45
|
+
<body>
|
46
|
+
|
47
|
+
|
48
|
+
|
49
|
+
<div id="classHeader">
|
50
|
+
<table class="header-table">
|
51
|
+
<tr class="top-aligned-row">
|
52
|
+
<td><strong>Module</strong></td>
|
53
|
+
<td class="class-name-in-header">Profligacy::Swing</td>
|
54
|
+
</tr>
|
55
|
+
<tr class="top-aligned-row">
|
56
|
+
<td><strong>In:</strong></td>
|
57
|
+
<td>
|
58
|
+
<a href="../../files/lib/profligacy/swing_rb.html">
|
59
|
+
lib/profligacy/swing.rb
|
60
|
+
</a>
|
61
|
+
<br />
|
62
|
+
</td>
|
63
|
+
</tr>
|
64
|
+
|
65
|
+
</table>
|
66
|
+
</div>
|
67
|
+
<!-- banner header -->
|
68
|
+
|
69
|
+
<div id="bodyContent">
|
70
|
+
|
71
|
+
|
72
|
+
|
73
|
+
<div id="contextContent">
|
74
|
+
|
75
|
+
|
76
|
+
|
77
|
+
</div>
|
78
|
+
|
79
|
+
|
80
|
+
</div>
|
81
|
+
|
82
|
+
|
83
|
+
<!-- if includes -->
|
84
|
+
|
85
|
+
<div id="section">
|
86
|
+
|
87
|
+
<div id="class-list">
|
88
|
+
<h3 class="section-bar">Classes and Modules</h3>
|
89
|
+
|
90
|
+
Module <a href="Swing/Listeners.html" class="link">Profligacy::Swing::Listeners</a><br />
|
91
|
+
Class <a href="Swing/Build.html" class="link">Profligacy::Swing::Build</a><br />
|
92
|
+
Class <a href="Swing/RunnableProc.html" class="link">Profligacy::Swing::RunnableProc</a><br />
|
93
|
+
|
94
|
+
</div>
|
95
|
+
|
96
|
+
|
97
|
+
|
98
|
+
|
99
|
+
|
100
|
+
|
101
|
+
|
102
|
+
<!-- if method_list -->
|
103
|
+
|
104
|
+
|
105
|
+
</div>
|
106
|
+
|
107
|
+
|
108
|
+
<div id="validator-badges">
|
109
|
+
<p><small><a href="http://validator.w3.org/check/referer">[Validate]</a></small></p>
|
110
|
+
</div>
|
111
|
+
|
112
|
+
</body>
|
113
|
+
</html>
|
@@ -0,0 +1,238 @@
|
|
1
|
+
<?xml version="1.0" encoding="iso-8859-1"?>
|
2
|
+
<!DOCTYPE html
|
3
|
+
PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
|
4
|
+
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
5
|
+
|
6
|
+
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
|
7
|
+
<head>
|
8
|
+
<title>Class: Profligacy::Swing::Build</title>
|
9
|
+
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
|
10
|
+
<meta http-equiv="Content-Script-Type" content="text/javascript" />
|
11
|
+
<link rel="stylesheet" href="../../.././rdoc-style.css" type="text/css" media="screen" />
|
12
|
+
<script type="text/javascript">
|
13
|
+
// <![CDATA[
|
14
|
+
|
15
|
+
function popupCode( url ) {
|
16
|
+
window.open(url, "Code", "resizable=yes,scrollbars=yes,toolbar=no,status=no,height=150,width=400")
|
17
|
+
}
|
18
|
+
|
19
|
+
function toggleCode( id ) {
|
20
|
+
if ( document.getElementById )
|
21
|
+
elem = document.getElementById( id );
|
22
|
+
else if ( document.all )
|
23
|
+
elem = eval( "document.all." + id );
|
24
|
+
else
|
25
|
+
return false;
|
26
|
+
|
27
|
+
elemStyle = elem.style;
|
28
|
+
|
29
|
+
if ( elemStyle.display != "block" ) {
|
30
|
+
elemStyle.display = "block"
|
31
|
+
} else {
|
32
|
+
elemStyle.display = "none"
|
33
|
+
}
|
34
|
+
|
35
|
+
return true;
|
36
|
+
}
|
37
|
+
|
38
|
+
// Make codeblocks hidden by default
|
39
|
+
document.writeln( "<style type=\"text/css\">div.method-source-code { display: none }</style>" )
|
40
|
+
|
41
|
+
// ]]>
|
42
|
+
</script>
|
43
|
+
|
44
|
+
</head>
|
45
|
+
<body>
|
46
|
+
|
47
|
+
|
48
|
+
|
49
|
+
<div id="classHeader">
|
50
|
+
<table class="header-table">
|
51
|
+
<tr class="top-aligned-row">
|
52
|
+
<td><strong>Class</strong></td>
|
53
|
+
<td class="class-name-in-header">Profligacy::Swing::Build</td>
|
54
|
+
</tr>
|
55
|
+
<tr class="top-aligned-row">
|
56
|
+
<td><strong>In:</strong></td>
|
57
|
+
<td>
|
58
|
+
<a href="../../../files/lib/profligacy/swing_rb.html">
|
59
|
+
lib/profligacy/swing.rb
|
60
|
+
</a>
|
61
|
+
<br />
|
62
|
+
</td>
|
63
|
+
</tr>
|
64
|
+
|
65
|
+
<tr class="top-aligned-row">
|
66
|
+
<td><strong>Parent:</strong></td>
|
67
|
+
<td>
|
68
|
+
Object
|
69
|
+
</td>
|
70
|
+
</tr>
|
71
|
+
</table>
|
72
|
+
</div>
|
73
|
+
<!-- banner header -->
|
74
|
+
|
75
|
+
<div id="bodyContent">
|
76
|
+
|
77
|
+
|
78
|
+
|
79
|
+
<div id="contextContent">
|
80
|
+
|
81
|
+
|
82
|
+
|
83
|
+
</div>
|
84
|
+
|
85
|
+
<div id="method-list">
|
86
|
+
<h3 class="section-bar">Methods</h3>
|
87
|
+
|
88
|
+
<div class="name-list">
|
89
|
+
<a href="#M000005">build</a>
|
90
|
+
<a href="#M000007">each_or_one</a>
|
91
|
+
<a href="#M000004">interactions</a>
|
92
|
+
<a href="#M000006">method_missing</a>
|
93
|
+
<a href="#M000003">new</a>
|
94
|
+
</div>
|
95
|
+
</div>
|
96
|
+
|
97
|
+
</div>
|
98
|
+
|
99
|
+
|
100
|
+
<!-- if includes -->
|
101
|
+
|
102
|
+
<div id="section">
|
103
|
+
|
104
|
+
|
105
|
+
|
106
|
+
|
107
|
+
|
108
|
+
<div id="attribute-list">
|
109
|
+
<h3 class="section-bar">Attributes</h3>
|
110
|
+
|
111
|
+
<div class="name-list">
|
112
|
+
<table>
|
113
|
+
<tr class="top-aligned-row context-row">
|
114
|
+
<td class="context-item-name">children</td>
|
115
|
+
<td class="context-item-value"> [RW] </td>
|
116
|
+
<td class="context-item-desc"></td>
|
117
|
+
</tr>
|
118
|
+
<tr class="top-aligned-row context-row">
|
119
|
+
<td class="context-item-name">container</td>
|
120
|
+
<td class="context-item-value"> [RW] </td>
|
121
|
+
<td class="context-item-desc"></td>
|
122
|
+
</tr>
|
123
|
+
<tr class="top-aligned-row context-row">
|
124
|
+
<td class="context-item-name">contents</td>
|
125
|
+
<td class="context-item-value"> [RW] </td>
|
126
|
+
<td class="context-item-desc"></td>
|
127
|
+
</tr>
|
128
|
+
<tr class="top-aligned-row context-row">
|
129
|
+
<td class="context-item-name">interactions</td>
|
130
|
+
<td class="context-item-value"> [RW] </td>
|
131
|
+
<td class="context-item-desc"></td>
|
132
|
+
</tr>
|
133
|
+
<tr class="top-aligned-row context-row">
|
134
|
+
<td class="context-item-name">layout</td>
|
135
|
+
<td class="context-item-value"> [RW] </td>
|
136
|
+
<td class="context-item-desc"></td>
|
137
|
+
</tr>
|
138
|
+
</table>
|
139
|
+
</div>
|
140
|
+
</div>
|
141
|
+
|
142
|
+
|
143
|
+
|
144
|
+
<!-- if method_list -->
|
145
|
+
<div id="methods">
|
146
|
+
<h3 class="section-bar">Public Class methods</h3>
|
147
|
+
|
148
|
+
<div id="method-M000003" class="method-detail">
|
149
|
+
<a name="M000003"></a>
|
150
|
+
|
151
|
+
<div class="method-heading">
|
152
|
+
<a href="Build.src/M000003.html" target="Code" class="method-signature"
|
153
|
+
onclick="popupCode('Build.src/M000003.html');return false;">
|
154
|
+
<span class="method-name">new</span><span class="method-args">(*children) {|@contents, @interactions| ...}</span>
|
155
|
+
</a>
|
156
|
+
</div>
|
157
|
+
|
158
|
+
<div class="method-description">
|
159
|
+
</div>
|
160
|
+
</div>
|
161
|
+
|
162
|
+
<h3 class="section-bar">Public Instance methods</h3>
|
163
|
+
|
164
|
+
<div id="method-M000005" class="method-detail">
|
165
|
+
<a name="M000005"></a>
|
166
|
+
|
167
|
+
<div class="method-heading">
|
168
|
+
<a href="Build.src/M000005.html" target="Code" class="method-signature"
|
169
|
+
onclick="popupCode('Build.src/M000005.html');return false;">
|
170
|
+
<span class="method-name">build</span><span class="method-args">(*args)</span>
|
171
|
+
</a>
|
172
|
+
</div>
|
173
|
+
|
174
|
+
<div class="method-description">
|
175
|
+
</div>
|
176
|
+
</div>
|
177
|
+
|
178
|
+
<div id="method-M000004" class="method-detail">
|
179
|
+
<a name="M000004"></a>
|
180
|
+
|
181
|
+
<div class="method-heading">
|
182
|
+
<a href="Build.src/M000004.html" target="Code" class="method-signature"
|
183
|
+
onclick="popupCode('Build.src/M000004.html');return false;">
|
184
|
+
<span class="method-name">interactions</span><span class="method-args">() {|@contents, @interactions| ...}</span>
|
185
|
+
</a>
|
186
|
+
</div>
|
187
|
+
|
188
|
+
<div class="method-description">
|
189
|
+
</div>
|
190
|
+
</div>
|
191
|
+
|
192
|
+
<div id="method-M000006" class="method-detail">
|
193
|
+
<a name="M000006"></a>
|
194
|
+
|
195
|
+
<div class="method-heading">
|
196
|
+
<a href="Build.src/M000006.html" target="Code" class="method-signature"
|
197
|
+
onclick="popupCode('Build.src/M000006.html');return false;">
|
198
|
+
<span class="method-name">method_missing</span><span class="method-args">(symb, *args)</span>
|
199
|
+
</a>
|
200
|
+
</div>
|
201
|
+
|
202
|
+
<div class="method-description">
|
203
|
+
</div>
|
204
|
+
</div>
|
205
|
+
|
206
|
+
<h3 class="section-bar">Protected Instance methods</h3>
|
207
|
+
|
208
|
+
<div id="method-M000007" class="method-detail">
|
209
|
+
<a name="M000007"></a>
|
210
|
+
|
211
|
+
<div class="method-heading">
|
212
|
+
<a href="Build.src/M000007.html" target="Code" class="method-signature"
|
213
|
+
onclick="popupCode('Build.src/M000007.html');return false;">
|
214
|
+
<span class="method-name">each_or_one</span><span class="method-args">(component) {|c| ...}</span>
|
215
|
+
</a>
|
216
|
+
</div>
|
217
|
+
|
218
|
+
<div class="method-description">
|
219
|
+
<p>
|
220
|
+
allows for a block of code to be run on each element of anything responding
|
221
|
+
to each, or just on one item
|
222
|
+
</p>
|
223
|
+
</div>
|
224
|
+
</div>
|
225
|
+
|
226
|
+
|
227
|
+
</div>
|
228
|
+
|
229
|
+
|
230
|
+
</div>
|
231
|
+
|
232
|
+
|
233
|
+
<div id="validator-badges">
|
234
|
+
<p><small><a href="http://validator.w3.org/check/referer">[Validate]</a></small></p>
|
235
|
+
</div>
|
236
|
+
|
237
|
+
</body>
|
238
|
+
</html>
|
@@ -0,0 +1,23 @@
|
|
1
|
+
<?xml version="1.0" encoding="iso-8859-1"?>
|
2
|
+
<!DOCTYPE html
|
3
|
+
PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
|
4
|
+
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
5
|
+
|
6
|
+
<html>
|
7
|
+
<head>
|
8
|
+
<title>new (Profligacy::Swing::Build)</title>
|
9
|
+
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
|
10
|
+
<link rel="stylesheet" href="../../../.././rdoc-style.css" type="text/css" media="screen" />
|
11
|
+
</head>
|
12
|
+
<body class="standalone-code">
|
13
|
+
<pre> <span class="ruby-comment cmt"># File lib/profligacy/swing.rb, line 67</span>
|
14
|
+
67: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">initialize</span>(<span class="ruby-operator">*</span><span class="ruby-identifier">children</span>)
|
15
|
+
68: <span class="ruby-ivar">@container_class</span> = <span class="ruby-identifier">children</span>.<span class="ruby-identifier">shift</span>
|
16
|
+
69: <span class="ruby-ivar">@children</span> = <span class="ruby-identifier">children</span>
|
17
|
+
70: <span class="ruby-ivar">@klass</span> = <span class="ruby-constant">Struct</span>.<span class="ruby-identifier">new</span> <span class="ruby-operator">*</span><span class="ruby-ivar">@children</span>
|
18
|
+
71: <span class="ruby-ivar">@contents</span> = <span class="ruby-ivar">@klass</span>.<span class="ruby-identifier">new</span>
|
19
|
+
72: <span class="ruby-ivar">@interactions</span> = <span class="ruby-ivar">@klass</span>.<span class="ruby-identifier">new</span>
|
20
|
+
73: <span class="ruby-keyword kw">yield</span> <span class="ruby-ivar">@contents</span>, <span class="ruby-ivar">@interactions</span>
|
21
|
+
74: <span class="ruby-keyword kw">end</span></pre>
|
22
|
+
</body>
|
23
|
+
</html>
|
@@ -0,0 +1,18 @@
|
|
1
|
+
<?xml version="1.0" encoding="iso-8859-1"?>
|
2
|
+
<!DOCTYPE html
|
3
|
+
PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
|
4
|
+
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
5
|
+
|
6
|
+
<html>
|
7
|
+
<head>
|
8
|
+
<title>interactions (Profligacy::Swing::Build)</title>
|
9
|
+
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
|
10
|
+
<link rel="stylesheet" href="../../../.././rdoc-style.css" type="text/css" media="screen" />
|
11
|
+
</head>
|
12
|
+
<body class="standalone-code">
|
13
|
+
<pre> <span class="ruby-comment cmt"># File lib/profligacy/swing.rb, line 76</span>
|
14
|
+
76: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">interactions</span>
|
15
|
+
77: <span class="ruby-keyword kw">yield</span> <span class="ruby-ivar">@contents</span>, <span class="ruby-ivar">@interactions</span>
|
16
|
+
78: <span class="ruby-keyword kw">end</span></pre>
|
17
|
+
</body>
|
18
|
+
</html>
|
@@ -0,0 +1,45 @@
|
|
1
|
+
<?xml version="1.0" encoding="iso-8859-1"?>
|
2
|
+
<!DOCTYPE html
|
3
|
+
PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
|
4
|
+
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
5
|
+
|
6
|
+
<html>
|
7
|
+
<head>
|
8
|
+
<title>build (Profligacy::Swing::Build)</title>
|
9
|
+
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
|
10
|
+
<link rel="stylesheet" href="../../../.././rdoc-style.css" type="text/css" media="screen" />
|
11
|
+
</head>
|
12
|
+
<body class="standalone-code">
|
13
|
+
<pre> <span class="ruby-comment cmt"># File lib/profligacy/swing.rb, line 80</span>
|
14
|
+
80: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">build</span>(<span class="ruby-operator">*</span><span class="ruby-identifier">args</span>)
|
15
|
+
81: <span class="ruby-comment cmt"># create the container they ask for with these args</span>
|
16
|
+
82: <span class="ruby-ivar">@container</span> = <span class="ruby-ivar">@container_class</span>.<span class="ruby-identifier">new</span> <span class="ruby-operator">*</span><span class="ruby-identifier">args</span>
|
17
|
+
83: <span class="ruby-comment cmt"># tack on the layout they wanted</span>
|
18
|
+
84: <span class="ruby-ivar">@container</span>.<span class="ruby-identifier">layout</span> = <span class="ruby-identifier">layout</span> <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">layout</span>
|
19
|
+
85:
|
20
|
+
86: <span class="ruby-comment cmt"># go through all the children, add them on and tack on the callbacks</span>
|
21
|
+
87: <span class="ruby-ivar">@children</span>.<span class="ruby-identifier">each</span> {<span class="ruby-operator">|</span><span class="ruby-identifier">child</span><span class="ruby-operator">|</span>
|
22
|
+
88: <span class="ruby-keyword kw">if</span> <span class="ruby-ivar">@contents</span>[<span class="ruby-identifier">child</span>]
|
23
|
+
89: <span class="ruby-comment cmt"># if this component answers the each call then go through all</span>
|
24
|
+
90: <span class="ruby-identifier">component</span> = <span class="ruby-ivar">@contents</span>[<span class="ruby-identifier">child</span>]
|
25
|
+
91: <span class="ruby-identifier">each_or_one</span>(<span class="ruby-identifier">component</span>) {<span class="ruby-operator">|</span><span class="ruby-identifier">c</span><span class="ruby-operator">|</span> <span class="ruby-ivar">@container</span>.<span class="ruby-identifier">add</span>(<span class="ruby-identifier">c</span>) }
|
26
|
+
92:
|
27
|
+
93: <span class="ruby-identifier">actions</span> = <span class="ruby-ivar">@interactions</span>[<span class="ruby-identifier">child</span>]
|
28
|
+
94: <span class="ruby-comment cmt"># now we tack on the callback</span>
|
29
|
+
95: <span class="ruby-identifier">actions</span>.<span class="ruby-identifier">each</span> { <span class="ruby-operator">|</span><span class="ruby-identifier">type</span>, <span class="ruby-identifier">callback</span><span class="ruby-operator">|</span>
|
30
|
+
96: <span class="ruby-identifier">each_or_one</span>(<span class="ruby-identifier">component</span>) <span class="ruby-keyword kw">do</span> <span class="ruby-operator">|</span><span class="ruby-identifier">c</span><span class="ruby-operator">|</span>
|
31
|
+
97: <span class="ruby-identifier">c</span>.<span class="ruby-identifier">send</span>(<span class="ruby-node">"add_#{type}_listener"</span>, <span class="ruby-identifier">callback</span>.<span class="ruby-identifier">to_proc</span>.<span class="ruby-identifier">to_listener</span>(<span class="ruby-identifier">type</span>))
|
32
|
+
98: <span class="ruby-keyword kw">end</span>
|
33
|
+
99: } <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">actions</span>
|
34
|
+
100: <span class="ruby-keyword kw">end</span>
|
35
|
+
101: }
|
36
|
+
102:
|
37
|
+
103: <span class="ruby-comment cmt"># even though swing doesn't do this, we do</span>
|
38
|
+
104: <span class="ruby-ivar">@container</span>.<span class="ruby-identifier">pack</span> <span class="ruby-keyword kw">if</span> <span class="ruby-ivar">@container</span>.<span class="ruby-identifier">respond_to?</span> <span class="ruby-identifier">:pack</span>
|
39
|
+
105: <span class="ruby-ivar">@container</span>.<span class="ruby-identifier">visible</span> = <span class="ruby-keyword kw">true</span> <span class="ruby-keyword kw">if</span> <span class="ruby-ivar">@container</span>.<span class="ruby-identifier">respond_to?</span> <span class="ruby-identifier">:visible</span>
|
40
|
+
106:
|
41
|
+
107: <span class="ruby-comment cmt"># and now they can do whatever they want to the container</span>
|
42
|
+
108: <span class="ruby-ivar">@container</span>
|
43
|
+
109: <span class="ruby-keyword kw">end</span></pre>
|
44
|
+
</body>
|
45
|
+
</html>
|
@@ -0,0 +1,18 @@
|
|
1
|
+
<?xml version="1.0" encoding="iso-8859-1"?>
|
2
|
+
<!DOCTYPE html
|
3
|
+
PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
|
4
|
+
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
5
|
+
|
6
|
+
<html>
|
7
|
+
<head>
|
8
|
+
<title>method_missing (Profligacy::Swing::Build)</title>
|
9
|
+
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
|
10
|
+
<link rel="stylesheet" href="../../../.././rdoc-style.css" type="text/css" media="screen" />
|
11
|
+
</head>
|
12
|
+
<body class="standalone-code">
|
13
|
+
<pre> <span class="ruby-comment cmt"># File lib/profligacy/swing.rb, line 111</span>
|
14
|
+
111: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">method_missing</span>(<span class="ruby-identifier">symb</span>, <span class="ruby-operator">*</span><span class="ruby-identifier">args</span>)
|
15
|
+
112: <span class="ruby-ivar">@contents</span>[<span class="ruby-identifier">symb</span>]
|
16
|
+
113: <span class="ruby-keyword kw">end</span></pre>
|
17
|
+
</body>
|
18
|
+
</html>
|