jsduck 3.10.0 → 3.10.1

Sign up to get free protection for your applications and to get access to all the features.
data/opt/example.js DELETED
@@ -1,149 +0,0 @@
1
- /**
2
- * An example class showcasing the features of JSDuck.
3
- *
4
- * **Markdown** is supported thoughout the [docs][1].
5
- *
6
- * Link to {@link Ext.form.field.Text external class} and
7
- * {@link Ext.form.field.Text#reset its method}.
8
- * Link to {@link #setSize method of this class}.
9
- *
10
- * {@img some/path.png Alt text}
11
- *
12
- * An embedded live example:
13
- *
14
- * @example
15
- * Ext.create('Ext.master.Switch', {
16
- * text: 'Click me, please!',
17
- * handler: function() {
18
- * alert('You clicked me!')
19
- * }
20
- * });
21
- *
22
- * **Note:** this is not a fully working example. When you run it
23
- * through JSDuck you will get warnings about a lot of missing classes
24
- * that this example class references, additionally it doesn't make
25
- * sense for singleton class to have static methods.
26
- *
27
- * [1]: http://docs.sencha.com/ext-js/4.0/
28
- */
29
- Ext.define('Ext.master.Switch', {
30
- // These are all detected automatically
31
- // No need to use @extends, @alternateClassName, @mixin, @alias, @singleton
32
- extend: 'Ext.button.Button',
33
- alternateClassName: 'Ext.MasterSwitch',
34
- mixins: {
35
- observable: 'Ext.util.Observable',
36
- floating: 'Ext.util.Floating'
37
- },
38
- alias: 'widget.masterswitch',
39
- singleton: true,
40
-
41
- /**
42
- * @cfg {String} [text="Click Me!"]
43
- * A config option with explicit type, name, and default value.
44
- */
45
-
46
- config: {
47
- /**
48
- * @cfg
49
- * A config option with type, name, and default value
50
- * auto-detected. Additionally docs for getIcon and setIcon
51
- * accessor methods are generated.
52
- * @accessor
53
- */
54
- icon: "some/file.png"
55
- },
56
-
57
- /**
58
- * @cfg {String} name (required)
59
- * A very importand config option that must be specified.
60
- */
61
-
62
- /**
63
- * @property {Object} size
64
- * A property with explicit type name and name.
65
- * It's an object containing the following fields:
66
- * @property {Number} size.width The width.
67
- * @property {Number} size.height The height.
68
- */
69
-
70
- /**
71
- * A property with auto-detected type and name.
72
- */
73
- disabled: false,
74
-
75
- /**
76
- * Constructor documentation.
77
- * @param {Object} [cfg] An optional config object
78
- */
79
- constructor: function(cfg) {
80
- Ext.apply(this, cfg || {});
81
- this.addEvents(
82
- /**
83
- * @event
84
- * Fired when button clicked.
85
- * @param {Ext.master.Switch} this
86
- * @param {Number} times The number of times clicked.
87
- */
88
- "click"
89
- );
90
- },
91
-
92
- /**
93
- * Sets the size.
94
- * @param {Object} size An object describing width and height:
95
- * @param {Number} [size.width=0] The width.
96
- * @param {Number} [size.height=0] The height.
97
- */
98
- setSize: function(size) {
99
- this.size = size;
100
- },
101
-
102
- /**
103
- * Returns the size of component.
104
- * @return {Object} Object with properties:
105
- * @return {Number} return.width The width.
106
- * @return {Number} return.height The height.
107
- * @method
108
- */
109
- getSize: (function() {
110
- return function() { return this.size; };
111
- })(),
112
-
113
- statics: {
114
- /**
115
- * Filters out subcomponents.
116
- * @param {Function} fn Callback function.
117
- * @param {Ext.Component} fn.cmp The component parameter.
118
- * @param {Number} fn.index Component index parameter.
119
- * @param {Boolean} fn.return The return value of callback
120
- * must be true to include the component, false to exclude.
121
- * @param {Object} scope Scope for the callback.
122
- * @return {Ext.Component[]} Array of components.
123
- * @static
124
- */
125
- filter: function(fn, scope) {
126
- return this.items.filter(fn, scope);
127
- }
128
- },
129
-
130
- inheritableStatics: {
131
- /**
132
- * Achieves something.
133
- * @static
134
- * @inheritable
135
- */
136
- doSomething: function() {
137
- }
138
- }
139
- });
140
-
141
- Ext.apply(Ext, {
142
- /**
143
- * A method belonging to Ext.
144
- * @member Ext
145
- * @method
146
- * @inheritdoc Ext.master.Switch#setSize
147
- */
148
- setMasterSwitchSize: Ext.master.Switch.setSize
149
- });