sproutcore 0.9.13 → 0.9.14
Sign up to get free protection for your applications and to get access to all the features.
- data/History.txt +19 -0
- data/Manifest.txt +103 -26
- data/app_generators/sproutcore/templates/README +1 -1
- data/bin/sc-build +1 -1
- data/bin/sc-gen +0 -0
- data/bin/sc-ide +278 -0
- data/bin/sc-init +38 -0
- data/bin/sc-install +96 -0
- data/bin/sc-remove +94 -0
- data/bin/sc-server +4 -0
- data/bin/sc-update +94 -0
- data/bin/sproutcore +3 -14
- data/clients/sc_docs/controllers/docs.js +1 -1
- data/clients/sc_docs/models/doc.js +6 -0
- data/clients/sc_docs/views/doc_frame.js +1 -1
- data/clients/sc_test_runner/english.lproj/icons/small/next.png +0 -0
- data/clients/sc_test_runner/english.lproj/icons/small/reset.png +0 -0
- data/frameworks/sproutcore/HISTORY +34 -2
- data/frameworks/sproutcore/controllers/array.js +1 -1
- data/frameworks/sproutcore/controllers/controller.js +1 -1
- data/frameworks/sproutcore/controllers/object.js +9 -6
- data/frameworks/sproutcore/core.js +19 -4
- data/frameworks/sproutcore/english.lproj/blank.gif +0 -0
- data/frameworks/sproutcore/english.lproj/core.css +1 -0
- data/frameworks/sproutcore/english.lproj/menu.css +1 -0
- data/frameworks/sproutcore/foundation/application.js +3 -3
- data/frameworks/sproutcore/foundation/benchmark.js +1 -1
- data/frameworks/sproutcore/foundation/node_descriptor.js +13 -1
- data/frameworks/sproutcore/foundation/page.js +3 -2
- data/frameworks/sproutcore/foundation/path_module.js +33 -16
- data/frameworks/sproutcore/foundation/run_loop.js +1 -1
- data/frameworks/sproutcore/foundation/server.js +68 -18
- data/frameworks/sproutcore/foundation/string.js +1 -1
- data/frameworks/sproutcore/globals/window.js +62 -15
- data/frameworks/sproutcore/lib/core_views.rb +1 -0
- data/frameworks/sproutcore/lib/index.rhtml +4 -3
- data/frameworks/sproutcore/lib/menu_views.rb +2 -2
- data/frameworks/sproutcore/models/collection.js +122 -107
- data/frameworks/sproutcore/models/record.js +2 -2
- data/frameworks/sproutcore/panes/manager.js +1 -1
- data/frameworks/sproutcore/panes/overlay.js +3 -3
- data/frameworks/sproutcore/tests/controllers/object.rhtml +26 -0
- data/frameworks/sproutcore/tests/views/collection/incremental_rendering.rhtml +2 -2
- data/frameworks/sproutcore/views/button/disclosure.js +1 -1
- data/frameworks/sproutcore/views/collection/collection.js +19 -15
- data/frameworks/sproutcore/views/collection/source_list.js +1 -1
- data/frameworks/sproutcore/views/collection/table.js +2 -2
- data/frameworks/sproutcore/views/error_explanation.js +1 -1
- data/frameworks/sproutcore/views/field/checkbox_field.js +1 -1
- data/frameworks/sproutcore/views/field/field.js +1 -1
- data/frameworks/sproutcore/views/field/radio_field.js +1 -1
- data/frameworks/sproutcore/views/field/select_field.js +1 -1
- data/frameworks/sproutcore/views/form.js +1 -1
- data/frameworks/sproutcore/views/image.js +1 -1
- data/frameworks/sproutcore/views/menu_item.js +1 -1
- data/frameworks/sproutcore/views/popup_button.js +1 -1
- data/frameworks/sproutcore/views/popup_menu.js +1 -1
- data/frameworks/sproutcore/views/progress.js +4 -2
- data/frameworks/sproutcore/views/radio_group.js +1 -1
- data/frameworks/sproutcore/views/scroll.js +1 -1
- data/frameworks/sproutcore/views/source_list_group.js +1 -1
- data/frameworks/sproutcore/views/split.js +1 -1
- data/frameworks/sproutcore/views/tab.js +3 -1
- data/frameworks/sproutcore/views/view.js +19 -3
- data/jsdoc/README.txt +89 -57
- data/jsdoc/app/frame/Chain.js +102 -0
- data/jsdoc/app/frame/Dumper.js +144 -0
- data/jsdoc/app/frame/Hash.js +47 -0
- data/jsdoc/app/frame/Link.js +142 -0
- data/jsdoc/app/frame/Namespace.js +10 -0
- data/jsdoc/app/frame/Opt.js +134 -0
- data/jsdoc/app/frame/Reflection.js +26 -0
- data/jsdoc/app/frame/String.js +93 -0
- data/jsdoc/app/frame/Testrun.js +129 -0
- data/jsdoc/app/frame.js +33 -0
- data/jsdoc/app/handlers/FOODOC.js +26 -0
- data/jsdoc/app/handlers/XMLDOC/DomReader.js +159 -0
- data/jsdoc/app/handlers/XMLDOC/XMLDoc.js +16 -0
- data/jsdoc/app/handlers/XMLDOC/XMLParse.js +292 -0
- data/jsdoc/app/handlers/XMLDOC.js +26 -0
- data/jsdoc/app/lib/JSDOC/DocComment.js +200 -0
- data/jsdoc/app/lib/JSDOC/DocTag.js +294 -0
- data/jsdoc/app/lib/JSDOC/JsDoc.js +180 -0
- data/jsdoc/app/lib/JSDOC/JsPlate.js +100 -0
- data/jsdoc/app/lib/JSDOC/Lang.js +144 -0
- data/jsdoc/app/lib/JSDOC/Parser.js +109 -0
- data/jsdoc/app/lib/JSDOC/PluginManager.js +33 -0
- data/jsdoc/app/lib/JSDOC/Symbol.js +600 -0
- data/jsdoc/app/lib/JSDOC/SymbolSet.js +220 -0
- data/jsdoc/app/lib/JSDOC/TextStream.js +41 -0
- data/jsdoc/app/lib/JSDOC/Token.js +18 -0
- data/jsdoc/app/lib/JSDOC/TokenReader.js +323 -0
- data/jsdoc/app/lib/JSDOC/TokenStream.js +133 -0
- data/jsdoc/app/lib/JSDOC/Util.js +32 -0
- data/jsdoc/app/lib/JSDOC/Walker.js +416 -0
- data/jsdoc/app/lib/JSDOC.js +97 -0
- data/jsdoc/app/main.js +74 -0
- data/jsdoc/app/plugins/commentSrcJson.js +19 -0
- data/jsdoc/app/plugins/frameworkPrototype.js +16 -0
- data/jsdoc/app/plugins/functionCall.js +10 -0
- data/jsdoc/app/plugins/publishSrcHilite.js +62 -0
- data/jsdoc/app/plugins/sproutcoreTags.js +26 -0
- data/jsdoc/app/plugins/symbolLink.js +9 -0
- data/jsdoc/app/plugins/tagParamConfig.js +31 -0
- data/jsdoc/app/plugins/tagSynonyms.js +43 -0
- data/jsdoc/app/run.js +339 -137
- data/jsdoc/changes.txt +47 -0
- data/jsdoc/conf/sample.conf +31 -0
- data/jsdoc/java/build.xml +36 -0
- data/jsdoc/java/build_1.4.xml +36 -0
- data/jsdoc/java/classes/js.jar +0 -0
- data/jsdoc/java/src/JsDebugRun.java +21 -0
- data/jsdoc/java/src/JsRun.java +21 -0
- data/jsdoc/jsdebug.jar +0 -0
- data/jsdoc/jsrun.jar +0 -0
- data/jsdoc/t/TestDoc.js +144 -0
- data/jsdoc/t/runner.js +13 -0
- data/jsdoc/templates/sproutcore/allclasses.tmpl +17 -0
- data/jsdoc/templates/sproutcore/allfiles.tmpl +56 -0
- data/jsdoc/templates/sproutcore/class.tmpl +408 -326
- data/jsdoc/templates/sproutcore/index.tmpl +30 -31
- data/jsdoc/templates/sproutcore/publish.js +173 -81
- data/jsdoc/templates/sproutcore/static/default.css +191 -0
- data/jsdoc/templates/sproutcore/static/header.html +2 -0
- data/jsdoc/templates/sproutcore/static/index.html +19 -0
- data/jsdoc/templates/sproutcore/symbol.tmpl +35 -0
- data/jsdoc/test/addon.js +24 -0
- data/jsdoc/test/anon_inner.js +14 -0
- data/jsdoc/test/augments.js +31 -0
- data/jsdoc/test/augments2.js +26 -0
- data/jsdoc/test/borrows.js +41 -0
- data/jsdoc/test/borrows2.js +23 -0
- data/jsdoc/test/config.js +22 -0
- data/jsdoc/test/constructs.js +18 -0
- data/jsdoc/test/encoding.js +10 -0
- data/jsdoc/test/encoding_other.js +12 -0
- data/jsdoc/test/functions_anon.js +39 -0
- data/jsdoc/test/functions_nested.js +33 -0
- data/jsdoc/test/global.js +13 -0
- data/jsdoc/test/globals.js +25 -0
- data/jsdoc/test/ignore.js +10 -0
- data/jsdoc/test/inner.js +16 -0
- data/jsdoc/test/jsdoc_test.js +477 -0
- data/jsdoc/test/lend.js +33 -0
- data/jsdoc/test/memberof.js +20 -0
- data/jsdoc/test/memberof_constructor.js +15 -0
- data/jsdoc/test/name.js +19 -0
- data/jsdoc/test/namespace_nested.js +23 -0
- data/jsdoc/test/nocode.js +13 -0
- data/jsdoc/test/oblit_anon.js +20 -0
- data/jsdoc/test/overview.js +20 -0
- data/jsdoc/test/param_inline.js +37 -0
- data/jsdoc/test/params_optional.js +8 -0
- data/jsdoc/test/prototype.js +17 -0
- data/jsdoc/test/prototype_nested.js +9 -0
- data/jsdoc/test/prototype_oblit.js +13 -0
- data/jsdoc/test/prototype_oblit_constructor.js +24 -0
- data/jsdoc/test/public.js +10 -0
- data/jsdoc/test/shared.js +42 -0
- data/jsdoc/test/shared2.js +2 -0
- data/jsdoc/test/shortcuts.js +22 -0
- data/jsdoc/test/static_this.js +13 -0
- data/jsdoc/test/synonyms.js +23 -0
- data/jsdoc/test/tosource.js +23 -0
- data/jsdoc/test/variable_redefine.js +14 -0
- data/jsdoc/test.js +304 -0
- data/lib/sproutcore/build_tools/resource_builder.rb +6 -1
- data/lib/sproutcore/bundle_installer.rb +268 -0
- data/lib/sproutcore/jsdoc.rb +7 -6
- data/lib/sproutcore/library.rb +38 -0
- data/lib/sproutcore/merb/bundle_controller.rb +8 -4
- data/lib/sproutcore/version.rb +1 -1
- data/lib/sproutcore.rb +1 -1
- data/script/destroy +0 -0
- data/script/generate +0 -0
- data/script/txt2html +0 -0
- metadata +117 -29
- data/clients/view_builder/core.js +0 -19
- data/clients/view_builder/english.lproj/body.css +0 -149
- data/clients/view_builder/english.lproj/body.rhtml +0 -18
- data/clients/view_builder/english.lproj/strings.js +0 -14
- data/clients/view_builder/main.js +0 -37
- data/jsdoc/app/DocFile.js +0 -137
- data/jsdoc/app/DocTag.js +0 -110
- data/jsdoc/app/Doclet.js +0 -63
- data/jsdoc/app/Dumper.js +0 -143
- data/jsdoc/app/JsDoc.js +0 -103
- data/jsdoc/app/JsHilite.js +0 -45
- data/jsdoc/app/JsIO.js +0 -163
- data/jsdoc/app/JsParse.js +0 -385
- data/jsdoc/app/JsPlate.js +0 -130
- data/jsdoc/app/JsTestrun.js +0 -129
- data/jsdoc/app/JsToke.js +0 -564
- data/jsdoc/app/Symbol.js +0 -298
- data/jsdoc/app/Transformer.js +0 -14
- data/jsdoc/app/Util.js +0 -97
- data/jsdoc/app/js.jar +0 -0
- data/jsdoc/plugins/min.js +0 -316
- data/jsdoc/plugins/strip.js +0 -20
- data/jsdoc/templates/sproutcore/default.css +0 -191
- data/jsdoc/templates/sproutcore/index.html +0 -13
- data/jsdoc/templates/sproutcore/prototype.js +0 -4186
- data/jsdoc/templates/sproutcore/splash.html +0 -7
@@ -0,0 +1,477 @@
|
|
1
|
+
/**
|
2
|
+
* @fileoverview This file is to be used for testing the JSDoc parser
|
3
|
+
* It is not intended to be an example of good JavaScript OO-programming,
|
4
|
+
* nor is it intended to fulfill any specific purpose apart from
|
5
|
+
* demonstrating the functionality of the
|
6
|
+
* <a href='http://sourceforge.net/projects/jsdoc'>JSDoc</a> parser
|
7
|
+
*
|
8
|
+
* @author Gabriel Reid gab_reid@users.sourceforge.net
|
9
|
+
* @version 0.1
|
10
|
+
*/
|
11
|
+
|
12
|
+
|
13
|
+
/**
|
14
|
+
* Construct a new Shape object.
|
15
|
+
* @class This is the basic Shape class.
|
16
|
+
* It can be considered an abstract class, even though no such thing
|
17
|
+
* really existing in JavaScript
|
18
|
+
* @constructor
|
19
|
+
* @throws MemoryException if there is no more memory
|
20
|
+
* @throws GeneralShapeException rarely (if ever)
|
21
|
+
* @return {Shape|Coordinate} A new shape.
|
22
|
+
*/
|
23
|
+
function Shape(){
|
24
|
+
|
25
|
+
/**
|
26
|
+
* This is an example of a function that is not given as a property
|
27
|
+
* of a prototype, but instead it is assigned within a constructor.
|
28
|
+
* For inner functions like this to be picked up by the parser, the
|
29
|
+
* function that acts as a constructor <b>must</b> be denoted with
|
30
|
+
* the <b>@constructor</b> tag in its comment.
|
31
|
+
* @type String
|
32
|
+
*/
|
33
|
+
this.getClassName = function(){
|
34
|
+
return "Shape";
|
35
|
+
}
|
36
|
+
|
37
|
+
/**
|
38
|
+
* This is an inner method, just used here as an example
|
39
|
+
* @since version 0.5
|
40
|
+
* @author Sue Smart
|
41
|
+
*/
|
42
|
+
function addReference(){
|
43
|
+
// Do nothing...
|
44
|
+
}
|
45
|
+
|
46
|
+
}
|
47
|
+
|
48
|
+
/**
|
49
|
+
* Create a new Hexagon instance.
|
50
|
+
* @extends Shape
|
51
|
+
* @class Hexagon is a class that is a <i>logical</i> sublcass of
|
52
|
+
* {@link Shape} (thanks to the <code>@extends</code> tag), but in
|
53
|
+
* reality it is completely unrelated to Shape.
|
54
|
+
* @param {int} sideLength The length of one side for the new Hexagon
|
55
|
+
* @example
|
56
|
+
* var h = new Hexagon(2);
|
57
|
+
* @example
|
58
|
+
* if (hasHex) {
|
59
|
+
* hex = new Hexagon(5);
|
60
|
+
* color = hex.getColor();
|
61
|
+
* }
|
62
|
+
*/
|
63
|
+
function Hexagon(sideLength) {
|
64
|
+
}
|
65
|
+
|
66
|
+
|
67
|
+
/**
|
68
|
+
* This is an unattached (static) function that adds two integers together.
|
69
|
+
* @param {int} One The first number to add
|
70
|
+
* @param {int} Two The second number to add
|
71
|
+
* @author Gabriel Reid
|
72
|
+
* @deprecated So you shouldn't use it anymore!
|
73
|
+
*/
|
74
|
+
function Add(One, Two){
|
75
|
+
return One + Two;
|
76
|
+
}
|
77
|
+
|
78
|
+
|
79
|
+
/**
|
80
|
+
* The color of this shape
|
81
|
+
* @type Color
|
82
|
+
*/
|
83
|
+
Shape.prototype.color = null;
|
84
|
+
|
85
|
+
/**
|
86
|
+
* The border of this shape.
|
87
|
+
* @field
|
88
|
+
* @type int
|
89
|
+
*/
|
90
|
+
Shape.prototype.border = function(){return border;};
|
91
|
+
|
92
|
+
/*
|
93
|
+
* These are all the instance method implementations for Shape
|
94
|
+
*/
|
95
|
+
|
96
|
+
/**
|
97
|
+
* Get the coordinates of this shape. It is assumed that we're always talking
|
98
|
+
* about shapes in a 2D location here.
|
99
|
+
* @requires The {@link Shape} class
|
100
|
+
* @returns A Coordinate object representing the location of this Shape
|
101
|
+
* @type Coordinate[]
|
102
|
+
*/
|
103
|
+
Shape.prototype.getCoords = function(){
|
104
|
+
return this.coords;
|
105
|
+
}
|
106
|
+
|
107
|
+
/**
|
108
|
+
* Get the color of this shape.
|
109
|
+
* @see #setColor
|
110
|
+
* @see The <a href="http://example.com">Color</a> library.
|
111
|
+
* @link Shape
|
112
|
+
* @type Color
|
113
|
+
*/
|
114
|
+
Shape.prototype.getColor = function(){
|
115
|
+
return this.color;
|
116
|
+
}
|
117
|
+
|
118
|
+
/**
|
119
|
+
* Set the coordinates for this Shape
|
120
|
+
* @param {Coordinate} coordinates The coordinates to set for this Shape
|
121
|
+
*/
|
122
|
+
Shape.prototype.setCoords = function(coordinates){
|
123
|
+
this.coords = coordinates;
|
124
|
+
}
|
125
|
+
|
126
|
+
/**
|
127
|
+
* Set the color for this Shape
|
128
|
+
* @param {Color} color The color to set for this Shape
|
129
|
+
* @param other There is no other param, but it can still be documented if
|
130
|
+
* optional parameters are used
|
131
|
+
* @throws NonExistantColorException (no, not really!)
|
132
|
+
* @see #getColor
|
133
|
+
*/
|
134
|
+
Shape.prototype.setColor = function(color){
|
135
|
+
this.color = color;
|
136
|
+
}
|
137
|
+
|
138
|
+
/**
|
139
|
+
* Clone this shape
|
140
|
+
* @returns A copy of this shape
|
141
|
+
* @type Shape
|
142
|
+
* @author Gabriel Reid
|
143
|
+
*/
|
144
|
+
Shape.prototype.clone = function(){
|
145
|
+
return new Shape();
|
146
|
+
}
|
147
|
+
|
148
|
+
/**
|
149
|
+
* Create a new Rectangle instance.
|
150
|
+
* @class A basic rectangle class, inherits from Shape.
|
151
|
+
* This class could be considered a concrete implementation class
|
152
|
+
* @constructor
|
153
|
+
* @param {int} width The optional width for this Rectangle
|
154
|
+
* @param {int} height Thie optional height for this Rectangle
|
155
|
+
* @author Gabriel Reid
|
156
|
+
* @see Shape is the base class for this
|
157
|
+
* @augments Shape
|
158
|
+
* @hilited
|
159
|
+
*/
|
160
|
+
function Rectangle(width, // This is the width
|
161
|
+
height // This is the height
|
162
|
+
){
|
163
|
+
if (width){
|
164
|
+
this.width = width;
|
165
|
+
if (height){
|
166
|
+
this.height = height;
|
167
|
+
}
|
168
|
+
}
|
169
|
+
}
|
170
|
+
|
171
|
+
|
172
|
+
/* Inherit from Shape */
|
173
|
+
Rectangle.prototype = new Shape();
|
174
|
+
|
175
|
+
/**
|
176
|
+
* Value to represent the width of the Rectangle.
|
177
|
+
* <br>Text in <b>bold</b> and <i>italic</i> and a
|
178
|
+
* link to <a href="http://sf.net">SourceForge</a>
|
179
|
+
* @private
|
180
|
+
* @type int
|
181
|
+
*/
|
182
|
+
Rectangle.prototype.width = 0;
|
183
|
+
|
184
|
+
/**
|
185
|
+
* Value to represent the height of the Rectangle
|
186
|
+
* @private
|
187
|
+
* @type int
|
188
|
+
*/
|
189
|
+
Rectangle.prototype.height = 0;
|
190
|
+
|
191
|
+
/**
|
192
|
+
* Get the type of this object.
|
193
|
+
* @type String
|
194
|
+
*/
|
195
|
+
Rectangle.prototype.getClassName= function(){
|
196
|
+
return "Rectangle";
|
197
|
+
}
|
198
|
+
|
199
|
+
/**
|
200
|
+
* Get the value of the width for the Rectangle
|
201
|
+
* @type int
|
202
|
+
* @see Rectangle#setWidth
|
203
|
+
*/
|
204
|
+
Rectangle.prototype.getWidth = function(){
|
205
|
+
return this.width;
|
206
|
+
}
|
207
|
+
|
208
|
+
/**
|
209
|
+
* Get the value of the height for the Rectangle.
|
210
|
+
* Another getter is the {@link Shape#getColor} method in the
|
211
|
+
* {@link Shape} base class.
|
212
|
+
* @return The height of this Rectangle
|
213
|
+
* @type int
|
214
|
+
* @see Rectangle#setHeight
|
215
|
+
*/
|
216
|
+
Rectangle.prototype.getHeight = function(){
|
217
|
+
return this.height;
|
218
|
+
}
|
219
|
+
|
220
|
+
/**
|
221
|
+
* Set the width value for this Rectangle.
|
222
|
+
* @param {int} width The width value to be set
|
223
|
+
* @see #setWidth
|
224
|
+
*/
|
225
|
+
Rectangle.prototype.setWidth = function(width){
|
226
|
+
this.width = width;
|
227
|
+
}
|
228
|
+
|
229
|
+
/**
|
230
|
+
* Set the height value for this Rectangle.
|
231
|
+
* @param {int} height The height value to be set
|
232
|
+
* @see #getHeight
|
233
|
+
*/
|
234
|
+
Rectangle.prototype.setHeight = function(height){
|
235
|
+
this.height = height;
|
236
|
+
}
|
237
|
+
|
238
|
+
/**
|
239
|
+
* Get the value for the total area of this Rectangle
|
240
|
+
* @return total area of this Rectangle
|
241
|
+
* @type int
|
242
|
+
*/
|
243
|
+
Rectangle.prototype.getArea = function(){
|
244
|
+
return width * height;
|
245
|
+
}
|
246
|
+
|
247
|
+
|
248
|
+
/**
|
249
|
+
* Create a new Square instance.
|
250
|
+
* @class A Square is a subclass of {@link Rectangle}
|
251
|
+
* @param {int} width The optional width for this Rectangle
|
252
|
+
* @param {int} height The optional height for this Rectangle
|
253
|
+
* @augments Rectangle
|
254
|
+
*/
|
255
|
+
function Square(width, height){
|
256
|
+
if (width){
|
257
|
+
this.width = width;
|
258
|
+
if (height){
|
259
|
+
this.height = height;
|
260
|
+
}
|
261
|
+
}
|
262
|
+
|
263
|
+
}
|
264
|
+
|
265
|
+
/* Square is a subclass of Rectangle */
|
266
|
+
Square.prototype = new Rectangle();
|
267
|
+
|
268
|
+
/**
|
269
|
+
* Set the width value for this Shape.
|
270
|
+
* @param {int} width The width value to be set
|
271
|
+
* @see #getWidth
|
272
|
+
*/
|
273
|
+
Square.prototype.setWidth = function(width){
|
274
|
+
this.width = this.height = width;
|
275
|
+
}
|
276
|
+
|
277
|
+
/**
|
278
|
+
* Set the height value for this Shape
|
279
|
+
* Sets the {@link Rectangle#height} attribute in the Rectangle.
|
280
|
+
* @param {int} height The height value to be set
|
281
|
+
*/
|
282
|
+
Square.prototype.setHeight = function(height){
|
283
|
+
this.height = this.width = height;
|
284
|
+
}
|
285
|
+
|
286
|
+
|
287
|
+
/**
|
288
|
+
* Create a new Circle instance based on a radius.
|
289
|
+
* @class Circle class is another subclass of Shape
|
290
|
+
* @extends Shape
|
291
|
+
* @param {int} radius The optional radius of this {@link Circle }
|
292
|
+
* @mixin Square.prototype.setWidth as this.setDiameter
|
293
|
+
*/
|
294
|
+
function Circle(radius){
|
295
|
+
if (radius) {
|
296
|
+
/** The radius of the this Circle. */
|
297
|
+
this.radius = radius;
|
298
|
+
}
|
299
|
+
}
|
300
|
+
|
301
|
+
/* Circle inherits from {@link Shape} */
|
302
|
+
Circle.prototype = new Shape();
|
303
|
+
|
304
|
+
/**
|
305
|
+
* The radius value for this Circle
|
306
|
+
* @private
|
307
|
+
* @type int
|
308
|
+
*/
|
309
|
+
Circle.prototype.radius = 0;
|
310
|
+
|
311
|
+
/**
|
312
|
+
* A very simple class (static) field that is also a constant
|
313
|
+
* @final
|
314
|
+
* @type float
|
315
|
+
*/
|
316
|
+
Circle.PI = 3.14;
|
317
|
+
|
318
|
+
/**
|
319
|
+
* Get the radius value for this Circle
|
320
|
+
* @type int
|
321
|
+
* @see #setRadius
|
322
|
+
*/
|
323
|
+
Circle.prototype.getRadius = function(){
|
324
|
+
return this.radius;
|
325
|
+
}
|
326
|
+
|
327
|
+
/**
|
328
|
+
* Set the radius value for this Circle
|
329
|
+
* @param {int} radius The {@link Circle#radius} value to set
|
330
|
+
* @see #getRadius
|
331
|
+
*/
|
332
|
+
Circle.prototype.setRadius = function(radius){
|
333
|
+
this.radius = radius;
|
334
|
+
}
|
335
|
+
|
336
|
+
/**
|
337
|
+
* An example of a class (static) method that acts as a factory for Circle
|
338
|
+
* objects. Given a radius value, this method creates a new Circle.
|
339
|
+
* @param {int} radius The radius value to use for the new Circle.
|
340
|
+
* @type Circle
|
341
|
+
*/
|
342
|
+
Circle.createCircle = function(radius){
|
343
|
+
return new Circle(radius);
|
344
|
+
}
|
345
|
+
|
346
|
+
|
347
|
+
/**
|
348
|
+
* Create a new Coordinate instance based on x and y grid data.
|
349
|
+
* @class Coordinate is a class that can encapsulate location information.
|
350
|
+
* @param {int} [x=0] The optional x portion of the Coordinate
|
351
|
+
* @param {int} [y=0] The optinal y portion of the Coordinate
|
352
|
+
*/
|
353
|
+
function Coordinate(x, y){
|
354
|
+
if (x){
|
355
|
+
this.x = x;
|
356
|
+
if (y){
|
357
|
+
this.y = y;
|
358
|
+
}
|
359
|
+
}
|
360
|
+
}
|
361
|
+
|
362
|
+
/**
|
363
|
+
* The x portion of the Coordinate
|
364
|
+
* @type int
|
365
|
+
* @see #getX
|
366
|
+
* @see #setX
|
367
|
+
*/
|
368
|
+
Coordinate.prototype.x = 0;
|
369
|
+
|
370
|
+
/**
|
371
|
+
* The y portion of the Coordinate
|
372
|
+
* @type int
|
373
|
+
* @see #getY
|
374
|
+
* @see #setY
|
375
|
+
*/
|
376
|
+
Coordinate.prototype.y = 0;
|
377
|
+
|
378
|
+
/**
|
379
|
+
* Gets the x portion of the Coordinate.
|
380
|
+
* @type int
|
381
|
+
* @see #setX
|
382
|
+
*/
|
383
|
+
Coordinate.prototype.getX = function(){
|
384
|
+
return this.x;
|
385
|
+
}
|
386
|
+
|
387
|
+
/**
|
388
|
+
* Get the y portion of the Coordinate.
|
389
|
+
* @type int
|
390
|
+
* @see #setY
|
391
|
+
*/
|
392
|
+
Coordinate.prototype.getY = function(){
|
393
|
+
return this.y;
|
394
|
+
}
|
395
|
+
|
396
|
+
/**
|
397
|
+
* Sets the x portion of the Coordinate.
|
398
|
+
* @param {int} x The x value to set
|
399
|
+
* @see #getX
|
400
|
+
*/
|
401
|
+
Coordinate.prototype.setX = function(x){
|
402
|
+
this.x = x;
|
403
|
+
}
|
404
|
+
|
405
|
+
/**
|
406
|
+
* Sets the y portion of the Coordinate.
|
407
|
+
* @param {int} y The y value to set
|
408
|
+
* @see #getY
|
409
|
+
*/
|
410
|
+
Coordinate.prototype.setY = function(y){
|
411
|
+
this.y = y;
|
412
|
+
}
|
413
|
+
|
414
|
+
/**
|
415
|
+
* @class This class exists to demonstrate the assignment of a class prototype
|
416
|
+
* as an anonymous block.
|
417
|
+
*/
|
418
|
+
function ShapeFactory(){
|
419
|
+
}
|
420
|
+
|
421
|
+
ShapeFactory.prototype = {
|
422
|
+
/**
|
423
|
+
* Creates a new {@link Shape} instance.
|
424
|
+
* @return A new {@link Shape}
|
425
|
+
* @type Shape
|
426
|
+
*/
|
427
|
+
createShape: function(){
|
428
|
+
return new Shape();
|
429
|
+
}
|
430
|
+
}
|
431
|
+
|
432
|
+
/**
|
433
|
+
* An example of a singleton class
|
434
|
+
* @param ... Arguments represent {@link coordinate}s in the shape.
|
435
|
+
* @constructor
|
436
|
+
*/
|
437
|
+
MySingletonShapeFactory = function(){
|
438
|
+
|
439
|
+
/**
|
440
|
+
* Get the next {@link Shape}
|
441
|
+
* @type Shape
|
442
|
+
* @return A new {@link Shape}
|
443
|
+
*/
|
444
|
+
this.getShape = function(){
|
445
|
+
return null;
|
446
|
+
}
|
447
|
+
|
448
|
+
}
|
449
|
+
|
450
|
+
|
451
|
+
/**
|
452
|
+
* Create a new Foo instance.
|
453
|
+
* @class This is the Foo class. It exists to demonstrate 'nested' classes.
|
454
|
+
* @constructor
|
455
|
+
* @see Foo.Bar
|
456
|
+
*/
|
457
|
+
function Foo(){}
|
458
|
+
|
459
|
+
/**
|
460
|
+
* Creates a new instance of Bar.
|
461
|
+
* @class This class exists to demonstrate 'nested' classes.
|
462
|
+
* @constructor
|
463
|
+
* @see Foo.Bar
|
464
|
+
*/
|
465
|
+
function Bar(){}
|
466
|
+
|
467
|
+
/**
|
468
|
+
* Nested class
|
469
|
+
* @constructor
|
470
|
+
*/
|
471
|
+
Foo.Bar = function(){
|
472
|
+
/** The x. */ this.x = 2;
|
473
|
+
}
|
474
|
+
|
475
|
+
Foo.Bar.prototype = new Bar();
|
476
|
+
/** The y. */
|
477
|
+
Foo.Bar.prototype.y = '3';
|
data/jsdoc/test/lend.js
ADDED
@@ -0,0 +1,33 @@
|
|
1
|
+
/** @class */
|
2
|
+
var Person = Class.create(
|
3
|
+
/**
|
4
|
+
@lends Person.prototype
|
5
|
+
*/
|
6
|
+
{
|
7
|
+
initialize: function(name) {
|
8
|
+
this.name = name;
|
9
|
+
},
|
10
|
+
say: function(message) {
|
11
|
+
return this.name + ': ' + message;
|
12
|
+
}
|
13
|
+
}
|
14
|
+
);
|
15
|
+
|
16
|
+
/** @lends Person.prototype */
|
17
|
+
{
|
18
|
+
/** like say but more musical */
|
19
|
+
sing: function(song) {
|
20
|
+
}
|
21
|
+
}
|
22
|
+
|
23
|
+
/** @lends Person */
|
24
|
+
{
|
25
|
+
getCount: function() {
|
26
|
+
}
|
27
|
+
}
|
28
|
+
|
29
|
+
/** @lends Unknown.prototype */
|
30
|
+
{
|
31
|
+
notok: function() {
|
32
|
+
}
|
33
|
+
}
|
@@ -0,0 +1,20 @@
|
|
1
|
+
/** @constructor */
|
2
|
+
pack = function() {
|
3
|
+
this.init = function(){}
|
4
|
+
function config(){}
|
5
|
+
}
|
6
|
+
|
7
|
+
pack.build = function(task) {};
|
8
|
+
|
9
|
+
/** @memberOf pack */
|
10
|
+
pack.install = function() {}
|
11
|
+
|
12
|
+
/** @memberOf pack */
|
13
|
+
pack.install.overwrite = function() {}
|
14
|
+
|
15
|
+
/** @memberOf pack */
|
16
|
+
clean = function() {}
|
17
|
+
|
18
|
+
|
19
|
+
/** @memberOf pack-config */
|
20
|
+
install = function() {};
|
data/jsdoc/test/name.js
ADDED
@@ -0,0 +1,19 @@
|
|
1
|
+
/**
|
2
|
+
@name Response
|
3
|
+
@class
|
4
|
+
*/
|
5
|
+
|
6
|
+
Response.prototype = {
|
7
|
+
/**
|
8
|
+
@name Response#text
|
9
|
+
@function
|
10
|
+
@description
|
11
|
+
Gets the body of the response as plain text
|
12
|
+
@returns {String}
|
13
|
+
Response as text
|
14
|
+
*/
|
15
|
+
|
16
|
+
text: function() {
|
17
|
+
return this.nativeResponse.responseText;
|
18
|
+
}
|
19
|
+
}
|
@@ -0,0 +1,23 @@
|
|
1
|
+
/**
|
2
|
+
@namespace This is the first namespace.
|
3
|
+
*/
|
4
|
+
ns1 = {};
|
5
|
+
|
6
|
+
/**
|
7
|
+
This is the second namespace.
|
8
|
+
@namespace
|
9
|
+
*/
|
10
|
+
ns1.ns2 = {};
|
11
|
+
|
12
|
+
/**
|
13
|
+
This part of ns1.ns2
|
14
|
+
@constructor
|
15
|
+
*/
|
16
|
+
ns1.ns2.Function1 = function() {
|
17
|
+
};
|
18
|
+
|
19
|
+
ns1.staticFunction = function() {
|
20
|
+
};
|
21
|
+
|
22
|
+
/** A static field in a namespace. */
|
23
|
+
ns1.ns2.staticField = 1;
|
@@ -0,0 +1,20 @@
|
|
1
|
+
/** the options */
|
2
|
+
opt = Opt.get(
|
3
|
+
arguments,
|
4
|
+
{
|
5
|
+
d: "directory",
|
6
|
+
c: "conf",
|
7
|
+
"D[]": "define"
|
8
|
+
}
|
9
|
+
);
|
10
|
+
|
11
|
+
/** configuration */
|
12
|
+
opt.conf = {
|
13
|
+
/** keep */
|
14
|
+
keep: true,
|
15
|
+
/** base */
|
16
|
+
base: getBase(this, {p: properties})
|
17
|
+
}
|
18
|
+
|
19
|
+
|
20
|
+
|
@@ -0,0 +1,20 @@
|
|
1
|
+
/**
|
2
|
+
* @overview This "library" contains a
|
3
|
+
* lot of classes and functions.
|
4
|
+
* @example
|
5
|
+
<pre>
|
6
|
+
var x (x < 1);
|
7
|
+
alert("This 'is' \"code\"");
|
8
|
+
</pre>
|
9
|
+
* @name My Cool Library
|
10
|
+
* @author Joe Smith jsmith@company.com
|
11
|
+
* @version 0.1
|
12
|
+
*/
|
13
|
+
|
14
|
+
/**
|
15
|
+
* Gets the current foo
|
16
|
+
* @param {String} fooId The unique identifier for the foo.
|
17
|
+
* @return {Object} Returns the current foo.
|
18
|
+
*/
|
19
|
+
function getFoo(fooID){
|
20
|
+
}
|
@@ -0,0 +1,37 @@
|
|
1
|
+
/**
|
2
|
+
@constructor
|
3
|
+
@param columns The number of columns.
|
4
|
+
*/
|
5
|
+
function Layout(/**int*/columns){
|
6
|
+
/**
|
7
|
+
@param [id] The id of the element.
|
8
|
+
@param elName The name of the element.
|
9
|
+
*/
|
10
|
+
this.getElement = function(
|
11
|
+
/** string */ elName,
|
12
|
+
/** number|string */ id
|
13
|
+
) {
|
14
|
+
};
|
15
|
+
|
16
|
+
/**
|
17
|
+
@constructor
|
18
|
+
*/
|
19
|
+
this.Canvas = function(top, left, /**int*/width, height) {
|
20
|
+
/** Is it initiated yet? */
|
21
|
+
this.initiated = true;
|
22
|
+
}
|
23
|
+
|
24
|
+
this.rotate = function(/**nothing*/) {
|
25
|
+
}
|
26
|
+
|
27
|
+
/**
|
28
|
+
@param x
|
29
|
+
@param y
|
30
|
+
@param {zoppler} z*/
|
31
|
+
this.init = function(x, y, /**abbler*/z) {
|
32
|
+
/** The xyz. */
|
33
|
+
this.xyz = x+y+z;
|
34
|
+
this.getXyz = function() {
|
35
|
+
}
|
36
|
+
}
|
37
|
+
}
|
@@ -0,0 +1,17 @@
|
|
1
|
+
/** @constructor */
|
2
|
+
function Article() {
|
3
|
+
}
|
4
|
+
|
5
|
+
Article.prototype.init = function(title) {
|
6
|
+
/** the instance title */
|
7
|
+
this.title = title;
|
8
|
+
|
9
|
+
/** the static counter */
|
10
|
+
Article.counter = 1;
|
11
|
+
}
|
12
|
+
|
13
|
+
a = new Article();
|
14
|
+
a.Init("my title");
|
15
|
+
|
16
|
+
print(a.title);
|
17
|
+
print(Article.counter);
|