profligacy 0.2-jruby → 0.3-jruby

Sign up to get free protection for your applications and to get access to all the features.
Files changed (50) hide show
  1. data/Rakefile +6 -4
  2. data/doc/rdoc/classes/Proc.src/M000001.html +4 -4
  3. data/doc/rdoc/classes/Proc.src/M000002.html +4 -4
  4. data/doc/rdoc/classes/Profligacy/LELGroupLayout.html +296 -0
  5. data/doc/rdoc/classes/Profligacy/LELGroupLayout.src/M000014.html +28 -0
  6. data/doc/rdoc/classes/Profligacy/LELGroupLayout.src/M000015.html +18 -0
  7. data/doc/rdoc/classes/Profligacy/LELGroupLayout.src/M000016.html +19 -0
  8. data/doc/rdoc/classes/Profligacy/LELGroupLayout.src/M000017.html +23 -0
  9. data/doc/rdoc/classes/Profligacy/LELGroupLayout.src/M000018.html +27 -0
  10. data/doc/rdoc/classes/Profligacy/LELGroupLayout.src/M000019.html +19 -0
  11. data/doc/rdoc/classes/Profligacy/LELGroupLayout.src/M000020.html +23 -0
  12. data/doc/rdoc/classes/Profligacy/LELGroupLayout.src/M000021.html +18 -0
  13. data/doc/rdoc/classes/Profligacy/LELGroupLayout.src/M000022.html +18 -0
  14. data/doc/rdoc/classes/Profligacy/LELGroupLayout.src/M000023.html +18 -0
  15. data/doc/rdoc/classes/Profligacy/LELGroupLayout.src/M000024.html +21 -0
  16. data/doc/rdoc/classes/Profligacy/LELNameScanner.html +189 -0
  17. data/doc/rdoc/classes/Profligacy/LELNameScanner.src/M000025.html +18 -0
  18. data/doc/rdoc/classes/Profligacy/LELNameScanner.src/M000026.html +18 -0
  19. data/doc/rdoc/classes/Profligacy/LELNameScanner.src/M000027.html +18 -0
  20. data/doc/rdoc/classes/Profligacy/Swing/Build.html +30 -0
  21. data/doc/rdoc/classes/Profligacy/Swing/Build.src/M000003.html +3 -6
  22. data/doc/rdoc/classes/Profligacy/Swing/Build.src/M000004.html +4 -4
  23. data/doc/rdoc/classes/Profligacy/Swing/Build.src/M000005.html +25 -31
  24. data/doc/rdoc/classes/Profligacy/Swing/Build.src/M000006.html +4 -4
  25. data/doc/rdoc/classes/Profligacy/Swing/Build.src/M000007.html +8 -8
  26. data/doc/rdoc/classes/Profligacy/Swing/Build.src/M000008.html +21 -0
  27. data/doc/rdoc/classes/Profligacy/Swing/Build.src/M000009.html +24 -0
  28. data/doc/rdoc/classes/Profligacy/Swing/LEL.html +169 -0
  29. data/doc/rdoc/classes/Profligacy/Swing/LEL.src/M000010.html +33 -0
  30. data/doc/rdoc/classes/Profligacy/Swing/LEL.src/M000011.html +36 -0
  31. data/doc/rdoc/classes/Profligacy/Swing/RunnableProc.html +10 -10
  32. data/doc/rdoc/classes/Profligacy/Swing/RunnableProc.src/{M000008.html → M000012.html} +0 -0
  33. data/doc/rdoc/classes/Profligacy/Swing/RunnableProc.src/{M000009.html → M000013.html} +0 -0
  34. data/doc/rdoc/classes/Profligacy/Swing.html +5 -0
  35. data/doc/rdoc/classes/Profligacy.html +6 -0
  36. data/doc/rdoc/created.rid +1 -1
  37. data/doc/rdoc/files/lib/profligacy/lel_rb.html +101 -0
  38. data/doc/rdoc/files/lib/profligacy/swing_rb.html +1 -1
  39. data/doc/rdoc/fr_class_index.html +3 -0
  40. data/doc/rdoc/fr_file_index.html +1 -0
  41. data/doc/rdoc/fr_method_index.html +20 -2
  42. data/examples/layout_test.rb +25 -0
  43. data/examples/swing8_lel.rb +63 -0
  44. data/lib/profligacy/LELParser$LELEventListener.class +0 -0
  45. data/lib/profligacy/LELParser.class +0 -0
  46. data/lib/profligacy/LELParser.java +342 -0
  47. data/lib/profligacy/LELParser.rl +84 -0
  48. data/lib/profligacy/lel.rb +199 -0
  49. data/lib/profligacy/swing.rb +18 -11
  50. metadata +38 -6
@@ -0,0 +1,189 @@
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::LELNameScanner</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::LELNameScanner</td>
54
+ </tr>
55
+ <tr class="top-aligned-row">
56
+ <td><strong>In:</strong></td>
57
+ <td>
58
+ <a href="../../files/lib/profligacy/lel_rb.html">
59
+ lib/profligacy/lel.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="#M000026">id</a>&nbsp;&nbsp;
90
+ <a href="#M000027">method_missing</a>&nbsp;&nbsp;
91
+ <a href="#M000025">new</a>&nbsp;&nbsp;
92
+ </div>
93
+ </div>
94
+
95
+ </div>
96
+
97
+
98
+ <!-- if includes -->
99
+ <div id="includes">
100
+ <h3 class="section-bar">Included Modules</h3>
101
+
102
+ <div id="includes-list">
103
+ <span class="include-name">Profligacy::LELParser::LELEventListener</span>
104
+ </div>
105
+ </div>
106
+
107
+ <div id="section">
108
+
109
+
110
+
111
+
112
+
113
+ <div id="attribute-list">
114
+ <h3 class="section-bar">Attributes</h3>
115
+
116
+ <div class="name-list">
117
+ <table>
118
+ <tr class="top-aligned-row context-row">
119
+ <td class="context-item-name">children</td>
120
+ <td class="context-item-value">&nbsp;[R]&nbsp;</td>
121
+ <td class="context-item-desc"></td>
122
+ </tr>
123
+ </table>
124
+ </div>
125
+ </div>
126
+
127
+
128
+
129
+ <!-- if method_list -->
130
+ <div id="methods">
131
+ <h3 class="section-bar">Public Class methods</h3>
132
+
133
+ <div id="method-M000025" class="method-detail">
134
+ <a name="M000025"></a>
135
+
136
+ <div class="method-heading">
137
+ <a href="LELNameScanner.src/M000025.html" target="Code" class="method-signature"
138
+ onclick="popupCode('LELNameScanner.src/M000025.html');return false;">
139
+ <span class="method-name">new</span><span class="method-args">()</span>
140
+ </a>
141
+ </div>
142
+
143
+ <div class="method-description">
144
+ </div>
145
+ </div>
146
+
147
+ <h3 class="section-bar">Public Instance methods</h3>
148
+
149
+ <div id="method-M000026" class="method-detail">
150
+ <a name="M000026"></a>
151
+
152
+ <div class="method-heading">
153
+ <a href="LELNameScanner.src/M000026.html" target="Code" class="method-signature"
154
+ onclick="popupCode('LELNameScanner.src/M000026.html');return false;">
155
+ <span class="method-name">id</span><span class="method-args">(name)</span>
156
+ </a>
157
+ </div>
158
+
159
+ <div class="method-description">
160
+ </div>
161
+ </div>
162
+
163
+ <div id="method-M000027" class="method-detail">
164
+ <a name="M000027"></a>
165
+
166
+ <div class="method-heading">
167
+ <a href="LELNameScanner.src/M000027.html" target="Code" class="method-signature"
168
+ onclick="popupCode('LELNameScanner.src/M000027.html');return false;">
169
+ <span class="method-name">method_missing</span><span class="method-args">(symb, *args)</span>
170
+ </a>
171
+ </div>
172
+
173
+ <div class="method-description">
174
+ </div>
175
+ </div>
176
+
177
+
178
+ </div>
179
+
180
+
181
+ </div>
182
+
183
+
184
+ <div id="validator-badges">
185
+ <p><small><a href="http://validator.w3.org/check/referer">[Validate]</a></small></p>
186
+ </div>
187
+
188
+ </body>
189
+ </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>new (Profligacy::LELNameScanner)</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/lel.rb, line 9</span>
14
+ 9: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">initialize</span>
15
+ 10: <span class="ruby-ivar">@children</span> = []
16
+ 11: <span class="ruby-keyword kw">end</span></pre>
17
+ </body>
18
+ </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>id (Profligacy::LELNameScanner)</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/lel.rb, line 13</span>
14
+ 13: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">id</span>(<span class="ruby-identifier">name</span>)
15
+ 14: <span class="ruby-ivar">@children</span> <span class="ruby-operator">&lt;&lt;</span> <span class="ruby-identifier">name</span>.<span class="ruby-identifier">to_sym</span>
16
+ 15: <span class="ruby-keyword kw">end</span></pre>
17
+ </body>
18
+ </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::LELNameScanner)</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/lel.rb, line 17</span>
14
+ 17: <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
+ 18: <span class="ruby-comment cmt">#ignored</span>
16
+ 19: <span class="ruby-keyword kw">end</span></pre>
17
+ </body>
18
+ </html>
@@ -87,10 +87,12 @@
87
87
 
88
88
  <div class="name-list">
89
89
  <a href="#M000005">build</a>&nbsp;&nbsp;
90
+ <a href="#M000009">configure_interactions_for</a>&nbsp;&nbsp;
90
91
  <a href="#M000007">each_or_one</a>&nbsp;&nbsp;
91
92
  <a href="#M000004">interactions</a>&nbsp;&nbsp;
92
93
  <a href="#M000006">method_missing</a>&nbsp;&nbsp;
93
94
  <a href="#M000003">new</a>&nbsp;&nbsp;
95
+ <a href="#M000008">setup_children_and_interactions</a>&nbsp;&nbsp;
94
96
  </div>
95
97
  </div>
96
98
 
@@ -205,6 +207,20 @@
205
207
 
206
208
  <h3 class="section-bar">Protected Instance methods</h3>
207
209
 
210
+ <div id="method-M000009" class="method-detail">
211
+ <a name="M000009"></a>
212
+
213
+ <div class="method-heading">
214
+ <a href="Build.src/M000009.html" target="Code" class="method-signature"
215
+ onclick="popupCode('Build.src/M000009.html');return false;">
216
+ <span class="method-name">configure_interactions_for</span><span class="method-args">(child,component)</span>
217
+ </a>
218
+ </div>
219
+
220
+ <div class="method-description">
221
+ </div>
222
+ </div>
223
+
208
224
  <div id="method-M000007" class="method-detail">
209
225
  <a name="M000007"></a>
210
226
 
@@ -223,6 +239,20 @@ to each, or just on one item
223
239
  </div>
224
240
  </div>
225
241
 
242
+ <div id="method-M000008" class="method-detail">
243
+ <a name="M000008"></a>
244
+
245
+ <div class="method-heading">
246
+ <a href="Build.src/M000008.html" target="Code" class="method-signature"
247
+ onclick="popupCode('Build.src/M000008.html');return false;">
248
+ <span class="method-name">setup_children_and_interactions</span><span class="method-args">(children)</span>
249
+ </a>
250
+ </div>
251
+
252
+ <div class="method-description">
253
+ </div>
254
+ </div>
255
+
226
256
 
227
257
  </div>
228
258
 
@@ -13,11 +13,8 @@
13
13
  <pre> <span class="ruby-comment cmt"># File lib/profligacy/swing.rb, line 67</span>
14
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
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>
16
+ 69: <span class="ruby-identifier">setup_children_and_interactions</span>(<span class="ruby-identifier">children</span>)
17
+ 70: <span class="ruby-keyword kw">yield</span> <span class="ruby-ivar">@contents</span>, <span class="ruby-ivar">@interactions</span>
18
+ 71: <span class="ruby-keyword kw">end</span></pre>
22
19
  </body>
23
20
  </html>
@@ -10,9 +10,9 @@
10
10
  <link rel="stylesheet" href="../../../.././rdoc-style.css" type="text/css" media="screen" />
11
11
  </head>
12
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>
13
+ <pre> <span class="ruby-comment cmt"># File lib/profligacy/swing.rb, line 73</span>
14
+ 73: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">interactions</span>
15
+ 74: <span class="ruby-keyword kw">yield</span> <span class="ruby-ivar">@contents</span>, <span class="ruby-ivar">@interactions</span>
16
+ 75: <span class="ruby-keyword kw">end</span></pre>
17
17
  </body>
18
18
  </html>
@@ -10,36 +10,30 @@
10
10
  <link rel="stylesheet" href="../../../.././rdoc-style.css" type="text/css" media="screen" />
11
11
  </head>
12
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">&quot;add_#{type}_listener&quot;</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>
13
+ <pre> <span class="ruby-comment cmt"># File lib/profligacy/swing.rb, line 77</span>
14
+ 77: <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
+ 78: <span class="ruby-comment cmt"># create the container they ask for with these args</span>
16
+ 79: <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
+ 80: <span class="ruby-comment cmt"># tack on the layout they wanted</span>
18
+ 81: <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
+ 82:
20
+ 83: <span class="ruby-comment cmt"># go through all the children, add them on and tack on the callbacks</span>
21
+ 84: <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
+ 85: <span class="ruby-keyword kw">if</span> <span class="ruby-ivar">@contents</span>[<span class="ruby-identifier">child</span>]
23
+ 86: <span class="ruby-comment cmt"># if this component answers the each call then go through all</span>
24
+ 87: <span class="ruby-identifier">component</span> = <span class="ruby-ivar">@contents</span>[<span class="ruby-identifier">child</span>]
25
+ 88: <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
+ 89:
27
+ 90: <span class="ruby-identifier">configure_interactions_for</span> <span class="ruby-identifier">child</span>, <span class="ruby-identifier">component</span>
28
+ 91: <span class="ruby-keyword kw">end</span>
29
+ 92: }
30
+ 93:
31
+ 94: <span class="ruby-comment cmt"># even though swing doesn't do this, we do</span>
32
+ 95: <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>
33
+ 96: <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>
34
+ 97:
35
+ 98: <span class="ruby-comment cmt"># and now they can do whatever they want to the container</span>
36
+ 99: <span class="ruby-ivar">@container</span>
37
+ 100: <span class="ruby-keyword kw">end</span></pre>
44
38
  </body>
45
39
  </html>
@@ -10,9 +10,9 @@
10
10
  <link rel="stylesheet" href="../../../.././rdoc-style.css" type="text/css" media="screen" />
11
11
  </head>
12
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>
13
+ <pre> <span class="ruby-comment cmt"># File lib/profligacy/swing.rb, line 102</span>
14
+ 102: <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
+ 103: <span class="ruby-ivar">@contents</span>[<span class="ruby-identifier">symb</span>]
16
+ 104: <span class="ruby-keyword kw">end</span></pre>
17
17
  </body>
18
18
  </html>
@@ -10,13 +10,13 @@
10
10
  <link rel="stylesheet" href="../../../.././rdoc-style.css" type="text/css" media="screen" />
11
11
  </head>
12
12
  <body class="standalone-code">
13
- <pre> <span class="ruby-comment cmt"># File lib/profligacy/swing.rb, line 119</span>
14
- 119: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">each_or_one</span>(<span class="ruby-identifier">component</span>)
15
- 120: <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">component</span>.<span class="ruby-identifier">respond_to?</span> <span class="ruby-identifier">:each</span>
16
- 121: <span class="ruby-identifier">component</span>.<span class="ruby-identifier">each</span> {<span class="ruby-operator">|</span><span class="ruby-identifier">c</span><span class="ruby-operator">|</span> <span class="ruby-keyword kw">yield</span> <span class="ruby-identifier">c</span> }
17
- 122: <span class="ruby-keyword kw">else</span>
18
- 123: <span class="ruby-keyword kw">yield</span> <span class="ruby-identifier">component</span>
19
- 124: <span class="ruby-keyword kw">end</span>
20
- 125: <span class="ruby-keyword kw">end</span></pre>
13
+ <pre> <span class="ruby-comment cmt"># File lib/profligacy/swing.rb, line 110</span>
14
+ 110: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">each_or_one</span>(<span class="ruby-identifier">component</span>)
15
+ 111: <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">component</span>.<span class="ruby-identifier">respond_to?</span> <span class="ruby-identifier">:each</span>
16
+ 112: <span class="ruby-identifier">component</span>.<span class="ruby-identifier">each</span> {<span class="ruby-operator">|</span><span class="ruby-identifier">c</span><span class="ruby-operator">|</span> <span class="ruby-keyword kw">yield</span> <span class="ruby-identifier">c</span> }
17
+ 113: <span class="ruby-keyword kw">else</span>
18
+ 114: <span class="ruby-keyword kw">yield</span> <span class="ruby-identifier">component</span>
19
+ 115: <span class="ruby-keyword kw">end</span>
20
+ 116: <span class="ruby-keyword kw">end</span></pre>
21
21
  </body>
22
22
  </html>
@@ -0,0 +1,21 @@
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>setup_children_and_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 118</span>
14
+ 118: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">setup_children_and_interactions</span>(<span class="ruby-identifier">children</span>)
15
+ 119: <span class="ruby-ivar">@children</span> = <span class="ruby-identifier">children</span>
16
+ 120: <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>
17
+ 121: <span class="ruby-ivar">@contents</span> = <span class="ruby-ivar">@klass</span>.<span class="ruby-identifier">new</span>
18
+ 122: <span class="ruby-ivar">@interactions</span> = <span class="ruby-ivar">@klass</span>.<span class="ruby-identifier">new</span>
19
+ 123: <span class="ruby-keyword kw">end</span></pre>
20
+ </body>
21
+ </html>
@@ -0,0 +1,24 @@
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>configure_interactions_for (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 125</span>
14
+ 125: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">configure_interactions_for</span>(<span class="ruby-identifier">child</span>,<span class="ruby-identifier">component</span>)
15
+ 126: <span class="ruby-identifier">actions</span> = <span class="ruby-ivar">@interactions</span>[<span class="ruby-identifier">child</span>]
16
+ 127: <span class="ruby-comment cmt"># now we tack on the callback</span>
17
+ 128: <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>
18
+ 129: <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>
19
+ 130: <span class="ruby-identifier">c</span>.<span class="ruby-identifier">send</span>(<span class="ruby-node">&quot;add_#{type}_listener&quot;</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>))
20
+ 131: <span class="ruby-keyword kw">end</span>
21
+ 132: } <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">actions</span>
22
+ 133: <span class="ruby-keyword kw">end</span></pre>
23
+ </body>
24
+ </html>