You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@flex.apache.org by ah...@apache.org on 2015/04/09 01:05:26 UTC
[07/47] git commit: [flex-asjs] [refs/heads/develop] - manual
conversion to Object.defineProperties. Needs major cleanup before it will
work
http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/5344e8ba/frameworks/js/FlexJS/src/org/apache/flex/core/graphics/GraphicsContainer.js
----------------------------------------------------------------------
diff --git a/frameworks/js/FlexJS/src/org/apache/flex/core/graphics/GraphicsContainer.js b/frameworks/js/FlexJS/src/org/apache/flex/core/graphics/GraphicsContainer.js
index 7db0225..ca67517 100644
--- a/frameworks/js/FlexJS/src/org/apache/flex/core/graphics/GraphicsContainer.js
+++ b/frameworks/js/FlexJS/src/org/apache/flex/core/graphics/GraphicsContainer.js
@@ -40,15 +40,6 @@ org_apache_flex_core_graphics_GraphicsContainer.prototype.FLEXJS_CLASS_INFO =
/**
* @expose
- * @return {number} The number of child elements.
- */
-org_apache_flex_core_graphics_GraphicsContainer.prototype.get_numChildren = function() {
- return this.internalChildren().length;
- };
-
-
-/**
- * @expose
*/
org_apache_flex_core_graphics_GraphicsContainer.prototype.removeAllElements = function() {
var svg = this.element;
@@ -58,48 +49,45 @@ org_apache_flex_core_graphics_GraphicsContainer.prototype.removeAllElements = fu
};
-/**
- * @override
- */
-org_apache_flex_core_graphics_GraphicsContainer.prototype.set_width = function(value) {
- org_apache_flex_core_graphics_GraphicsContainer.base(this, 'set_width', value);
- this.element.setAttribute('width', String(value) + 'px');
- this.element.style.width = String(value) + 'px';
-};
-
-
-/**
- * @override
- */
-org_apache_flex_core_graphics_GraphicsContainer.prototype.set_height = function(value) {
- org_apache_flex_core_graphics_GraphicsContainer.base(this, 'set_height', value);
- this.element.setAttribute('height', String(value) + 'px');
- this.element.style.height = String(value) + 'px';
-};
-
-
-/**
- * @override
- */
-org_apache_flex_core_graphics_GraphicsContainer.prototype.set_x = function(value) {
- org_apache_flex_core_graphics_GraphicsContainer.base(this, 'set_x', value);
- this.element.setAttribute('x', String(value) + 'px');
- this.element.style.position = 'absolute';
- this.element.style.left = String(value) + 'px';
- this.element.offsetLeft = value;
-};
-
-
-/**
- * @override
- */
-org_apache_flex_core_graphics_GraphicsContainer.prototype.set_y = function(value) {
- org_apache_flex_core_graphics_GraphicsContainer.base(this, 'set_y', value);
- this.element.setAttribute('y', String(value) + 'px');
- this.element.style.position = 'absolute';
- this.element.style.top = String(value) + 'px';
- this.element.offsetTop = value;
-};
+Object.defineProperties(org_apache_flex_core_graphics_GraphicsContainer.prototype, {
+ 'numChildren': {
+ get: function() {
+ return this.internalChildren().length;
+ }
+ },
+ 'width': {
+ set: function(value) {
+ org_apache_flex_utils_Language.superSetter(org_apache_flex_core_graphics_GraphicsContainer, this, 'width', value);
+ this.element.setAttribute('width', String(value) + 'px');
+ this.element.style.width = String(value) + 'px';
+ }
+ },
+ 'height': {
+ set: function(value) {
+ org_apache_flex_utils_Language.superSetter(org_apache_flex_core_graphics_GraphicsContainer, this, 'height', value);
+ this.element.setAttribute('height', String(value) + 'px');
+ this.element.style.height = String(value) + 'px';
+ }
+ },
+ 'x': {
+ set: function(value) {
+ org_apache_flex_core_graphics_GraphicsContainer.base(org_apache_flex_core_graphics_GraphicsContainer, this, 'x', value);
+ this.element.setAttribute('x', String(value) + 'px');
+ this.element.style.position = 'absolute';
+ this.element.style.left = String(value) + 'px';
+ this.element.offsetLeft = value;
+ }
+ },
+ 'y': {
+ set: function(value) {
+ org_apache_flex_core_graphics_GraphicsContainer.base(this, 'set_y', value);
+ this.element.setAttribute('y', String(value) + 'px');
+ this.element.style.position = 'absolute';
+ this.element.style.top = String(value) + 'px';
+ this.element.offsetTop = value;
+ }
+ }
+});
/**
http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/5344e8ba/frameworks/js/FlexJS/src/org/apache/flex/core/graphics/LinearGradient.js
----------------------------------------------------------------------
diff --git a/frameworks/js/FlexJS/src/org/apache/flex/core/graphics/LinearGradient.js b/frameworks/js/FlexJS/src/org/apache/flex/core/graphics/LinearGradient.js
index 0d41a7a..e4472e4 100644
--- a/frameworks/js/FlexJS/src/org/apache/flex/core/graphics/LinearGradient.js
+++ b/frameworks/js/FlexJS/src/org/apache/flex/core/graphics/LinearGradient.js
@@ -42,22 +42,17 @@ goog.inherits(org_apache_flex_core_graphics_LinearGradient, org_apache_flex_core
org_apache_flex_core_graphics_LinearGradient.prototype._scaleX = 1.0;
-/**
- * @expose
- * @return {number}
- */
-org_apache_flex_core_graphics_LinearGradient.prototype.get_scaleX = function() {
- return this._scaleX;
-};
-
-
-/**
- * @expose
- * @param {number} value
- */
-org_apache_flex_core_graphics_LinearGradient.prototype.set_scaleX = function(value) {
- this._scaleX = value;
-};
+Object.defineProperties(org_apache_flex_core_graphics_LinearGradient.prototype, {
+ 'scaleX': {
+ get: function() {
+ return this._scaleX;
+ },
+ set: function(value) {
+ this._scaleX = value;
+ }
+ }
+});
+
/**
http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/5344e8ba/frameworks/js/FlexJS/src/org/apache/flex/core/graphics/Path.js
----------------------------------------------------------------------
diff --git a/frameworks/js/FlexJS/src/org/apache/flex/core/graphics/Path.js b/frameworks/js/FlexJS/src/org/apache/flex/core/graphics/Path.js
index 293a481..9c8a239 100644
--- a/frameworks/js/FlexJS/src/org/apache/flex/core/graphics/Path.js
+++ b/frameworks/js/FlexJS/src/org/apache/flex/core/graphics/Path.js
@@ -45,22 +45,16 @@ org_apache_flex_core_graphics_Path.prototype.FLEXJS_CLASS_INFO =
qName: 'org_apache_flex_core_graphics_Path' }] };
-/**
- * @expose
- * @param {string} v The string representation of the path data.
- */
-org_apache_flex_core_graphics_Path.prototype.set_data = function(v) {
- this.data_ = v;
-};
-
-
-/**
- * @expose
- * @return {string} The string representation of the path data.
- */
-org_apache_flex_core_graphics_Path.prototype.get_data = function() {
- return this.data_;
-};
+Object.defineProperties(org_apache_flex_core_graphics_LinearGradient.prototype, {
+ 'data': {
+ set: function(v) {
+ this.data_ = v;
+ },
+ get: function() {
+ return this.data_;
+ }
+ }
+});
/**
http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/5344e8ba/frameworks/js/FlexJS/src/org/apache/flex/core/graphics/SolidColor.js
----------------------------------------------------------------------
diff --git a/frameworks/js/FlexJS/src/org/apache/flex/core/graphics/SolidColor.js b/frameworks/js/FlexJS/src/org/apache/flex/core/graphics/SolidColor.js
index 309905a..d857a5b 100644
--- a/frameworks/js/FlexJS/src/org/apache/flex/core/graphics/SolidColor.js
+++ b/frameworks/js/FlexJS/src/org/apache/flex/core/graphics/SolidColor.js
@@ -49,38 +49,24 @@ org_apache_flex_core_graphics_SolidColor.prototype.FLEXJS_CLASS_INFO =
interfaces: [org_apache_flex_core_graphics_IFill] };
-/**
- * @expose
- * @return {number} color.
- */
-org_apache_flex_core_graphics_SolidColor.prototype.get_color = function() {
- return this.color_;
-};
-
-
-/**
- * @param {number} value color.
- */
-org_apache_flex_core_graphics_SolidColor.prototype.set_color = function(value) {
- this.color_ = value;
-};
-
-
-/**
- * @expose
- * @return {number} alpha.
- */
-org_apache_flex_core_graphics_SolidColor.prototype.get_alpha = function() {
- return this.alpha_;
-};
-
-
-/**
- * @param {number} value alpha.
- */
-org_apache_flex_core_graphics_SolidColor.prototype.set_alpha = function(value) {
- this.alpha_ = value;
-};
+Object.defineProperties(org_apache_flex_core_graphics_SolidColor.prototype, {
+ 'color': {
+ get: function() {
+ return this.color_;
+ },
+ set: function(value) {
+ this.color_ = value;
+ }
+ },
+ 'alpha': {
+ get: function() {
+ return this.alpha_;
+ },
+ set: function(value) {
+ this.alpha_ = value;
+ }
+ }
+});
/**
http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/5344e8ba/frameworks/js/FlexJS/src/org/apache/flex/core/graphics/SolidColorStroke.js
----------------------------------------------------------------------
diff --git a/frameworks/js/FlexJS/src/org/apache/flex/core/graphics/SolidColorStroke.js b/frameworks/js/FlexJS/src/org/apache/flex/core/graphics/SolidColorStroke.js
index 0e1f026..0a7e569 100644
--- a/frameworks/js/FlexJS/src/org/apache/flex/core/graphics/SolidColorStroke.js
+++ b/frameworks/js/FlexJS/src/org/apache/flex/core/graphics/SolidColorStroke.js
@@ -55,55 +55,32 @@ org_apache_flex_core_graphics_SolidColorStroke.prototype.FLEXJS_CLASS_INFO =
qName: 'org_apache_flex_core_graphics_SolidColorStroke' }] };
-/**
- * @expose
- * @return {number} color.
- */
-org_apache_flex_core_graphics_SolidColorStroke.prototype.get_color = function() {
- return this.color_;
-};
-
-
-/**
- * @param {number} value color.
- */
-org_apache_flex_core_graphics_SolidColorStroke.prototype.set_color = function(value) {
- this.color_ = value;
-};
-
-
-/**
- * @expose
- * @return {number} alpha.
- */
-org_apache_flex_core_graphics_SolidColorStroke.prototype.get_alpha = function() {
- return this.alpha_;
-};
-
-
-/**
- * @param {number} value alpha.
- */
-org_apache_flex_core_graphics_SolidColorStroke.prototype.set_alpha = function(value) {
- this.alpha_ = value;
-};
-
-
-/**
- * @expose
- * @return {number} weight.
- */
-org_apache_flex_core_graphics_SolidColorStroke.prototype.get_weight = function() {
- return this.weight_;
-};
-
-
-/**
- * @param {number} value weight.
- */
-org_apache_flex_core_graphics_SolidColorStroke.prototype.set_weight = function(value) {
- this.weight_ = value;
-};
+Object.defineProperties(org_apache_flex_core_graphics_SolidColorStroke.prototype, {
+ 'color': {
+ get: function() {
+ return this.color_;
+ },
+ set: function(value) {
+ this.color_ = value;
+ }
+ },
+ 'alpha': {
+ get: function() {
+ return this.alpha_;
+ },
+ set: function(value) {
+ this.alpha_ = value;
+ }
+ },
+ 'weight': {
+ get: function() {
+ return this.weight_;
+ },
+ set: function(value) {
+ this.weight_ = value;
+ }
+ }
+});
/**
http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/5344e8ba/frameworks/js/FlexJS/src/org/apache/flex/createjs/Label.js
----------------------------------------------------------------------
diff --git a/frameworks/js/FlexJS/src/org/apache/flex/createjs/Label.js b/frameworks/js/FlexJS/src/org/apache/flex/createjs/Label.js
index 3cb9867..77139da 100644
--- a/frameworks/js/FlexJS/src/org/apache/flex/createjs/Label.js
+++ b/frameworks/js/FlexJS/src/org/apache/flex/createjs/Label.js
@@ -47,21 +47,14 @@ org_apache_flex_createjs_Label.prototype.createElement =
};
-/**
- * @expose
- * @return {string} The text getter.
- */
-org_apache_flex_createjs_Label.prototype.get_text = function() {
- return this.element.text;
-};
-
-
-/**
- * @expose
- * @param {string} value The text setter.
- */
-org_apache_flex_createjs_Label.prototype.set_text =
- function(value) {
- this.element.text = value;
- this.element.getStage().update();
-};
+Object.defineProperties(org_apache_flex_createjs_Label.prototype, {
+ 'text': {
+ get: function() {
+ return this.element.text;
+ },
+ set: function(value) {
+ this.element.text = value;
+ this.element.getStage().update();
+ }
+ }
+});
http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/5344e8ba/frameworks/js/FlexJS/src/org/apache/flex/createjs/core/UIBase.js
----------------------------------------------------------------------
diff --git a/frameworks/js/FlexJS/src/org/apache/flex/createjs/core/UIBase.js b/frameworks/js/FlexJS/src/org/apache/flex/createjs/core/UIBase.js
index cf479f5..5e7c830 100644
--- a/frameworks/js/FlexJS/src/org/apache/flex/createjs/core/UIBase.js
+++ b/frameworks/js/FlexJS/src/org/apache/flex/createjs/core/UIBase.js
@@ -56,44 +56,55 @@ org_apache_flex_createjs_core_UIBase.prototype.createElement =
};
-/**
- * @expose
- * @param {number} pixels The pixel count from the left edge.
- */
-org_apache_flex_createjs_core_UIBase.prototype.set_x = function(pixels) {
- this.positioner.x = pixels;
- this.element.getStage().update();
-};
-
-
-/**
- * @expose
- * @param {number} pixels The pixel count from the top edge.
- */
-org_apache_flex_createjs_core_UIBase.prototype.set_y = function(pixels) {
- this.positioner.y = pixels;
- this.element.getStage().update();
-};
-
-
-/**
- * @expose
- * @param {number} pixels The pixel count from the left edge.
- */
-org_apache_flex_createjs_core_UIBase.prototype.set_width = function(pixels) {
- this.positioner.width = pixels;
- this.element.getStage().update();
-};
-
-
-/**
- * @expose
- * @param {number} pixels The pixel count from the top edge.
- */
-org_apache_flex_createjs_core_UIBase.prototype.set_height = function(pixels) {
- this.positioner.height = pixels;
- this.element.getStage().update();
-};
+Object.defineProperties(org_apache_flex_createjs_Label.prototype, {
+ 'x': {
+ set: function(pixels) {
+ this.positioner.x = pixels;
+ this.element.getStage().update();
+ }
+ },
+ 'y': {
+ set: function(pixels) {
+ this.positioner.y = pixels;
+ this.element.getStage().update();
+ }
+ },
+ 'width': {
+ set: function(pixels) {
+ this.positioner.width = pixels;
+ this.element.getStage().update();
+ }
+ },
+ 'height': {
+ set: function(pixels) {
+ this.positioner.height = pixels;
+ this.element.getStage().update();
+ }
+ },
+ 'id': {
+ get: function() {
+ return this.name;
+ },
+ set: function(value) {
+ if (this.name !== value) {
+ this.element.name = value;
+ this.name = value;
+ this.dispatchEvent('idChanged');
+ }
+ }
+ },
+ 'model': {
+ get: function() {
+ return this.model;
+ },
+ set: function(value) {
+ if (this.model !== value) {
+ this.addBead(value);
+ this.dispatchEvent('modelChanged');
+ }
+ }
+ }
+});
/**
@@ -102,55 +113,8 @@ org_apache_flex_createjs_core_UIBase.prototype.set_height = function(pixels) {
*/
org_apache_flex_createjs_core_UIBase.prototype.id = null;
-
-/**
- * @expose
- * @return {string} The id.
- */
-org_apache_flex_createjs_core_UIBase.prototype.get_id = function() {
- return this.name;
-};
-
-
-/**
- * @expose
- * @param {object} value The new id.
- */
-org_apache_flex_createjs_core_UIBase.prototype.set_id = function(value) {
- if (this.name !== value)
- {
- this.element.name = value;
- this.name = value;
- this.dispatchEvent('idChanged');
- }
-};
-
-
/**
* @expose
* @type {object}
*/
org_apache_flex_createjs_core_UIBase.prototype.model = null;
-
-
-/**
- * @expose
- * @return {object} The model.
- */
-org_apache_flex_createjs_core_UIBase.prototype.get_model = function() {
- return this.model;
-};
-
-
-/**
- * @expose
- * @param {object} value The new model.
- */
-org_apache_flex_createjs_core_UIBase.prototype.set_model = function(value) {
- if (this.model !== value)
- {
- this.addBead(value);
- this.dispatchEvent('modelChanged');
- }
-};
-
http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/5344e8ba/frameworks/js/FlexJS/src/org/apache/flex/events/Event.js
----------------------------------------------------------------------
diff --git a/frameworks/js/FlexJS/src/org/apache/flex/events/Event.js b/frameworks/js/FlexJS/src/org/apache/flex/events/Event.js
index 9aaef19..74203c6 100644
--- a/frameworks/js/FlexJS/src/org/apache/flex/events/Event.js
+++ b/frameworks/js/FlexJS/src/org/apache/flex/events/Event.js
@@ -71,28 +71,20 @@ org_apache_flex_events_Event.prototype.init = function(type) {
};
-/**
- * @expose
- * @return {string} The event type.
- */
-org_apache_flex_events_Event.prototype.get_type = function() {
- return this.type;
-};
-
-
-/**
- * @expose
- * @return {Object|undefined} The event target.
- */
-org_apache_flex_events_Event.prototype.get_target = function() {
- return this.target;
-};
-
-
-/**
- * @expose
- * @return {Object|undefined} The event currentTarget.
- */
-org_apache_flex_events_Event.prototype.get_currentTarget = function() {
- return this.currentTarget;
-};
+Object.defineProperties(org_apache_flex_createjs_Label.prototype, {
+ 'type': {
+ get: function() {
+ return this.type;
+ }
+ },
+ 'target': {
+ get: function() {
+ return this.target;
+ }
+ },
+ 'currentTarget': {
+ get: function() {
+ return this.currentTarget;
+ }
+ }
+});
http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/5344e8ba/frameworks/js/FlexJS/src/org/apache/flex/html/Alert.js
----------------------------------------------------------------------
diff --git a/frameworks/js/FlexJS/src/org/apache/flex/html/Alert.js b/frameworks/js/FlexJS/src/org/apache/flex/html/Alert.js
index 7154dc4..e954d99 100644
--- a/frameworks/js/FlexJS/src/org/apache/flex/html/Alert.js
+++ b/frameworks/js/FlexJS/src/org/apache/flex/html/Alert.js
@@ -116,51 +116,29 @@ org_apache_flex_html_Alert.show =
};
-/**
- * @return {string} The message to be displayed in the title bar.
- */
-org_apache_flex_html_Alert.prototype.get_title = function()
- {
- return this.titleBar.title;
-};
-
-
-/**
- * @param {string} value The message to be displayed in the title bar.
- */
-org_apache_flex_html_Alert.prototype.set_title =
- function(value)
- {
- this.titleBar.title = value;
-};
-
-
-/**
- * @return {string} The message to be displayed.
- */
-org_apache_flex_html_Alert.prototype.get_text = function()
- {
- return this.message.text;
-};
-
-
-/**
- * @param {string} value The message to be displayed.
- */
-org_apache_flex_html_Alert.prototype.set_text =
- function(value)
- {
- this.message.text = value;
-};
-
-
-/**
- * @return {number} The button options.
- */
-org_apache_flex_html_Alert.prototype.get_flags = function()
- {
- return this.flags;
-};
+Object.defineProperties(org_apache_flex_html_Alert.prototype, {
+ 'title': {
+ get: function() {
+ return this.titleBar.title;
+ },
+ set: function(value) {
+ this.titleBar.title = value;
+ }
+ },
+ 'text': {
+ get: function() {
+ return this.message.text;
+ },
+ set: function(value) {
+ this.message.text = value;
+ }
+ },
+ 'flags': {
+ get: function() {
+ return this.flags;
+ }
+ }
+});
/**
http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/5344e8ba/frameworks/js/FlexJS/src/org/apache/flex/html/CheckBox.js
----------------------------------------------------------------------
diff --git a/frameworks/js/FlexJS/src/org/apache/flex/html/CheckBox.js b/frameworks/js/FlexJS/src/org/apache/flex/html/CheckBox.js
index 8c542bd..942c4bc 100644
--- a/frameworks/js/FlexJS/src/org/apache/flex/html/CheckBox.js
+++ b/frameworks/js/FlexJS/src/org/apache/flex/html/CheckBox.js
@@ -61,40 +61,21 @@ org_apache_flex_html_CheckBox.prototype.createElement =
};
-/**
- * @expose
- * @return {string} The text getter.
- */
-org_apache_flex_html_CheckBox.prototype.get_text = function() {
- return this.element.childNodes.item(1).nodeValue;
-};
-
-
-/**
- * @expose
- * @param {string} value The text setter.
- */
-org_apache_flex_html_CheckBox.prototype.set_text =
- function(value) {
- this.element.childNodes.item(1).nodeValue = value;
-};
-
-
-/**
- * @expose
- * @return {boolean} The selected getter.
- */
-org_apache_flex_html_CheckBox.prototype.get_selected =
- function() {
- return this.element.childNodes.item(0).checked;
-};
-
-
-/**
- * @expose
- * @param {boolean} value The selected setter.
- */
-org_apache_flex_html_CheckBox.prototype.set_selected =
- function(value) {
- this.element.childNodes.item(0).checked = value;
-};
+Object.defineProperties(org_apache_flex_html_CheckBox.prototype, {
+ 'text': {
+ get: function() {
+ return this.element.childNodes.item(1).nodeValue;
+ },
+ set: function(value) {
+ this.element.childNodes.item(1).nodeValue = value;
+ }
+ },
+ 'selected': {
+ get: function() {
+ return this.element.childNodes.item(0).checked;
+ },
+ set: function(value) {
+ this.element.childNodes.item(0).checked = value;
+ }
+ }
+});
http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/5344e8ba/frameworks/js/FlexJS/src/org/apache/flex/html/ComboBox.js
----------------------------------------------------------------------
diff --git a/frameworks/js/FlexJS/src/org/apache/flex/html/ComboBox.js b/frameworks/js/FlexJS/src/org/apache/flex/html/ComboBox.js
index 800f7c1..4c3d771 100644
--- a/frameworks/js/FlexJS/src/org/apache/flex/html/ComboBox.js
+++ b/frameworks/js/FlexJS/src/org/apache/flex/html/ComboBox.js
@@ -191,20 +191,13 @@ org_apache_flex_html_ComboBox.prototype.set_dataProvider =
};
-/**
- * @expose
- * @return {string} The text getter.
- */
-org_apache_flex_html_ComboBox.prototype.get_text = function() {
- return this.element.childNodes.item(0).value;
-};
-
-
-/**
- * @expose
- * @param {string} value The text setter.
- */
-org_apache_flex_html_ComboBox.prototype.set_text =
- function(value) {
- this.element.childNodes.item(0).value = value;
-};
+Object.defineProperties(org_apache_flex_html_CheckBox.prototype, {
+ 'text': {
+ get: function() {
+ return this.element.childNodes.item(0).value;
+ },
+ set: function(value) {
+ this.element.childNodes.item(0).value = value;
+ }
+ }
+});
http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/5344e8ba/frameworks/js/FlexJS/src/org/apache/flex/html/ImageAndTextButton.js
----------------------------------------------------------------------
diff --git a/frameworks/js/FlexJS/src/org/apache/flex/html/ImageAndTextButton.js b/frameworks/js/FlexJS/src/org/apache/flex/html/ImageAndTextButton.js
index c9efb28..37fea09 100644
--- a/frameworks/js/FlexJS/src/org/apache/flex/html/ImageAndTextButton.js
+++ b/frameworks/js/FlexJS/src/org/apache/flex/html/ImageAndTextButton.js
@@ -62,44 +62,26 @@ org_apache_flex_html_ImageAndTextButton.prototype.createElement =
};
-/**
- * @expose
- * @return {string} The text getter.
- */
-org_apache_flex_html_ImageAndTextButton.prototype.get_text = function() {
- return this._text;
-};
-
-
-/**
- * @expose
- * @param {string} value The text setter.
- */
-org_apache_flex_html_ImageAndTextButton.prototype.set_text =
- function(value) {
- this._text = value;
- this.setInnerHTML();
-};
-
-
-/**
- * @expose
- * @return {string} The image url.
- */
-org_apache_flex_html_ImageAndTextButton.prototype.get_image = function() {
- return this._src;
-};
-
-
-/**
- * @expose
- * @param {string} value The image url.
- */
-org_apache_flex_html_ImageAndTextButton.prototype.set_image =
- function(value) {
- this._src = value;
- this.setInnerHTML();
-};
+Object.defineProperties(org_apache_flex_html_ImageAndTextButton.prototype, {
+ 'text': {
+ get: function() {
+ return this._text;
+ },
+ set: function(value) {
+ this._text = value;
+ this.setInnerHTML();
+ }
+ },
+ 'image': {
+ get: function() {
+ return this._src;
+ },
+ set: function(value) {
+ this._src = value;
+ this.setInnerHTML();
+ }
+ }
+});
/**
http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/5344e8ba/frameworks/js/FlexJS/src/org/apache/flex/html/Label.js
----------------------------------------------------------------------
diff --git a/frameworks/js/FlexJS/src/org/apache/flex/html/Label.js b/frameworks/js/FlexJS/src/org/apache/flex/html/Label.js
index 9375221..f6b3a1d 100644
--- a/frameworks/js/FlexJS/src/org/apache/flex/html/Label.js
+++ b/frameworks/js/FlexJS/src/org/apache/flex/html/Label.js
@@ -43,37 +43,21 @@ org_apache_flex_html_Label.prototype.FLEXJS_CLASS_INFO =
qName: 'org_apache_flex_html_Label' }] };
-/**
- * @expose
- * @return {string} The text getter.
- */
-org_apache_flex_html_Label.prototype.get_text = function() {
- return this.element.innerHTML;
-};
-
-
-/**
- * @expose
- * @param {string} value The text setter.
- */
-org_apache_flex_html_Label.prototype.set_text = function(value) {
- this.element.innerHTML = value;
-};
-
-
-/**
- * @expose
- * @return {string} The html getter.
- */
-org_apache_flex_html_Label.prototype.get_html = function() {
- return this.element.innerHTML;
-};
-
-
-/**
- * @expose
- * @param {string} value The html setter.
- */
-org_apache_flex_html_Label.prototype.set_html = function(value) {
- this.element.innerHTML = value;
-};
+Object.defineProperties(org_apache_flex_html_Label.prototype, {
+ 'text': {
+ get: function() {
+ return this.element.innerHTML;
+ },
+ set: function(value) {
+ this.element.innerHTML = value;
+ }
+ },
+ 'html': {
+ get: function() {
+ return this.element.innerHTML;
+ },
+ set: function(value) {
+ this.element.innerHTML = value;
+ }
+ }
+});
http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/5344e8ba/frameworks/js/FlexJS/src/org/apache/flex/html/MultilineLabel.js
----------------------------------------------------------------------
diff --git a/frameworks/js/FlexJS/src/org/apache/flex/html/MultilineLabel.js b/frameworks/js/FlexJS/src/org/apache/flex/html/MultilineLabel.js
index 9dbb507..b4ba8da 100644
--- a/frameworks/js/FlexJS/src/org/apache/flex/html/MultilineLabel.js
+++ b/frameworks/js/FlexJS/src/org/apache/flex/html/MultilineLabel.js
@@ -43,37 +43,21 @@ org_apache_flex_html_MultilineLabel.prototype.FLEXJS_CLASS_INFO =
qName: 'org_apache_flex_html_MultilineLabel' }] };
-/**
- * @expose
- * @return {string} The text getter.
- */
-org_apache_flex_html_MultilineLabel.prototype.get_text = function() {
- return this.element.innerHTML;
-};
-
-
-/**
- * @expose
- * @param {string} value The text setter.
- */
-org_apache_flex_html_MultilineLabel.prototype.set_text = function(value) {
- this.element.innerHTML = value;
-};
-
-
-/**
- * @expose
- * @return {string} The html getter.
- */
-org_apache_flex_html_MultilineLabel.prototype.get_html = function() {
- return this.element.innerHTML;
-};
-
-
-/**
- * @expose
- * @param {string} value The html setter.
- */
-org_apache_flex_html_MultilineLabel.prototype.set_html = function(value) {
- this.element.innerHTML = value;
-};
+Object.defineProperties(org_apache_flex_html_MultilineLabel.prototype, {
+ 'text': {
+ get: function() {
+ return this.element.innerHTML;
+ },
+ set: function(value) {
+ this.element.innerHTML = value;
+ }
+ },
+ 'html': {
+ get: function() {
+ return this.element.innerHTML;
+ },
+ set: function(value) {
+ this.element.innerHTML = value;
+ }
+ }
+});
http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/5344e8ba/frameworks/js/FlexJS/src/org/apache/flex/html/Panel.js
----------------------------------------------------------------------
diff --git a/frameworks/js/FlexJS/src/org/apache/flex/html/Panel.js b/frameworks/js/FlexJS/src/org/apache/flex/html/Panel.js
index 6477ca5..d4d20b0 100644
--- a/frameworks/js/FlexJS/src/org/apache/flex/html/Panel.js
+++ b/frameworks/js/FlexJS/src/org/apache/flex/html/Panel.js
@@ -138,64 +138,34 @@ org_apache_flex_html_Panel.prototype.addedToParent =
};
-/**
- * @expose
- * @return {boolean} The showCloseButton getter.
- */
-org_apache_flex_html_Panel.prototype.get_showCloseButton = function() {
- return this.model.showCloseButton;
-};
-
-
-/**
- * @expose
- * @param {boolean} value The showCloseButton setter.
- */
-org_apache_flex_html_Panel.prototype.set_showCloseButton =
- function(value) {
- this.model.showCloseButton = value;
-};
-
-
-/**
- * @expose
- * @return {string} The title getter.
- */
-org_apache_flex_html_Panel.prototype.get_title = function() {
- return this.model.title;
-};
-
-
-/**
- * @expose
- * @param {string} value The title setter.
- */
-org_apache_flex_html_Panel.prototype.set_title =
-function(value) {
- this.model.title = value;
-};
-
-
-/**
- * @expose
- * @return {Array} The controlBar getter.
- */
-org_apache_flex_html_Panel.prototype.get_controlBar =
- function() {
- return this.controlBarChildren;
-};
-
-
-/**
- * @expose
- * @param {Array} value The controlBar setter.
- */
-org_apache_flex_html_Panel.prototype.set_controlBar =
- function(value) {
- this.controlBarChildren = value;
-
- for (var i = 0; i < value.length; i++) {
- var item = value[i];
- this.controlBar.addElement(item);
- }
-};
+Object.defineProperties(org_apache_flex_html_Panel.prototype, {
+ 'showCloseButton': {
+ get: function() {
+ return this.model.showCloseButton;
+ },
+ set: function(value) {
+ this.model.showCloseButton = value;
+ }
+ },
+ 'title': {
+ get: function() {
+ return this.model.title;
+ },
+ set: function(value) {
+ this.model.title = value;
+ }
+ },
+ 'controlBar': {
+ get: function() {
+ return this.controlBarChildren;
+ },
+ set: function(value) {
+ this.controlBarChildren = value;
+
+ for (var i = 0; i < value.length; i++) {
+ var item = value[i];
+ this.controlBar.addElement(item);
+ }
+ }
+ }
+});
http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/5344e8ba/frameworks/js/FlexJS/src/org/apache/flex/html/RadioButton.js
----------------------------------------------------------------------
diff --git a/frameworks/js/FlexJS/src/org/apache/flex/html/RadioButton.js b/frameworks/js/FlexJS/src/org/apache/flex/html/RadioButton.js
index 8fad4e5..9989df5 100644
--- a/frameworks/js/FlexJS/src/org/apache/flex/html/RadioButton.js
+++ b/frameworks/js/FlexJS/src/org/apache/flex/html/RadioButton.js
@@ -87,132 +87,73 @@ org_apache_flex_html_RadioButton.prototype.initSkin =
};
-/**
- * @override
- */
-org_apache_flex_html_RadioButton.prototype.set_id = function(value) {
- org_apache_flex_html_RadioButton.base(this, 'set_id', value);
- this.labelFor.id = value;
- this.input.id = value;
-};
-
-
-/**
- * @expose
- * @return {string} The groupName getter.
- */
-org_apache_flex_html_RadioButton.prototype.get_groupName =
- function() {
- return this.input.name;
-};
-
-
-/**
- * @expose
- * @param {string} value The groupName setter.
- */
-org_apache_flex_html_RadioButton.prototype.set_groupName =
- function(value) {
- this.input.name = value;
-};
-
-
-/**
- * @expose
- * @return {string} The text getter.
- */
-org_apache_flex_html_RadioButton.prototype.get_text =
- function() {
- return this.textNode.nodeValue;
-};
-
-
-/**
- * @expose
- * @param {string} value The text setter.
- */
-org_apache_flex_html_RadioButton.prototype.set_text =
- function(value) {
- this.textNode.nodeValue = value;
-};
-
-
-/**
- * @expose
- * @return {boolean} The selected getter.
- */
-org_apache_flex_html_RadioButton.prototype.get_selected =
- function() {
- return this.input.checked;
-};
-
-
-/**
- * @expose
- * @param {boolean} value The selected setter.
- */
-org_apache_flex_html_RadioButton.prototype.set_selected =
- function(value) {
- this.input.checked = value;
-};
-
-
-/**
- * @expose
- * @return {Object} The value getter.
- */
-org_apache_flex_html_RadioButton.prototype.get_value =
- function() {
- return this.input.value;
-};
-
-
-/**
- * @expose
- * @param {Object} value The value setter.
- */
-org_apache_flex_html_RadioButton.prototype.set_value =
- function(value) {
- this.input.value = value;
-};
-
-
-/**
- * @expose
- * @return {Object} The value of the selected RadioButton.
- */
-org_apache_flex_html_RadioButton.prototype.get_selectedValue =
- function() {
- var buttons, groupName, i, n;
-
- groupName = this.input.name;
- buttons = document.getElementsByName(groupName);
- n = buttons.length;
-
- for (i = 0; i < n; i++) {
- if (buttons[i].checked) {
- return buttons[i].value;
- }
- }
- return null;
-};
-
-
-/**
- * @expose
- * @param {Object} value The value of the selected RadioButton.
- */
-org_apache_flex_html_RadioButton.prototype.set_selectedValue =
- function(value) {
- var buttons, groupName, i, n;
-
- groupName = this.input.name;
- buttons = document.getElementsByName(groupName);
- n = buttons.length;
- for (i = 0; i < n; i++) {
- if (buttons[i].value === value) {
- buttons[i].checked = true;
- break;
- }
- }
-};
+Object.defineProperties(org_apache_flex_html_RadioButton.prototype, {
+ 'id': {
+ set: function(value) {
+ org_apache_flex_utils_Language.superSetter(org_apache_flex_html_RadioButton, this, 'id', value);
+ this.labelFor.id = value;
+ this.input.id = value;
+ }
+ },
+ 'groupName': {
+ get: function() {
+ return this.input.name;
+ },
+ set: function(value) {
+ this.input.name = value;
+ }
+ },
+ 'text': {
+ get: function() {
+ return this.textNode.nodeValue;
+ },
+ set: function(value) {
+ this.textNode.nodeValue = value;
+ }
+ },
+ 'selected': {
+ get: function() {
+ return this.input.checked;
+ },
+ set: function(value) {
+ this.input.checked = value;
+ }
+ },
+ 'value': {
+ get: function() {
+ return this.input.value;
+ },
+ set: function(value) {
+ this.input.value = value;
+ }
+ },
+ 'selectedValue': {
+ get: function() {
+ var buttons, groupName, i, n;
+
+ groupName = this.input.name;
+ buttons = document.getElementsByName(groupName);
+ n = buttons.length;
+
+ for (i = 0; i < n; i++) {
+ if (buttons[i].checked) {
+ return buttons[i].value;
+ }
+ }
+ return null;
+ },
+ set: function(value) {
+ var buttons, groupName, i, n;
+
+ groupName = this.input.name;
+ buttons = document.getElementsByName(groupName);
+ n = buttons.length;
+ for (i = 0; i < n; i++) {
+ if (buttons[i].value === value) {
+ buttons[i].checked = true;
+ break;
+ }
+ }
+ }
+ }
+});
http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/5344e8ba/frameworks/js/FlexJS/src/org/apache/flex/html/Spinner.js
----------------------------------------------------------------------
diff --git a/frameworks/js/FlexJS/src/org/apache/flex/html/Spinner.js b/frameworks/js/FlexJS/src/org/apache/flex/html/Spinner.js
index 873d651..cd53fcc 100644
--- a/frameworks/js/FlexJS/src/org/apache/flex/html/Spinner.js
+++ b/frameworks/js/FlexJS/src/org/apache/flex/html/Spinner.js
@@ -97,95 +97,52 @@ org_apache_flex_html_Spinner.prototype.set_value =
};
-/**
- * @expose
- * @return {number} The minimum value.
- */
-org_apache_flex_html_Spinner.prototype.get_minimum = function() {
- return this.minimum_;
-};
-
-
-/**
- * @expose
- * @param {number} value The new minimum value.
- */
-org_apache_flex_html_Spinner.prototype.set_minimum =
- function(value) {
- if (value != this.minimum_) {
- this.minimum_ = value;
- this.dispatchEvent('minimumChanged');
- }
-};
-
-
-/**
- * @expose
- * @return {number} The maximum value.
- */
-org_apache_flex_html_Spinner.prototype.get_maximum =
- function() {
- return this.maximum_;
-};
-
-
-/**
- * @expose
- * @param {number} value The new maximum setter.
- */
-org_apache_flex_html_Spinner.prototype.set_maximum =
- function(value) {
- if (value != this.maximum_) {
- this.maximum_ = value;
- this.dispatchEvent('maximumChanged');
- }
-};
-
-
-/**
- * @expose
- * @return {number} The snapInterval.
- */
-org_apache_flex_html_Spinner.prototype.get_snapInterval =
- function() {
- return this.snapInterval_;
-};
-
-
-/**
- * @expose
- * @param {number} value The new snapInterval value.
- */
-org_apache_flex_html_Spinner.prototype.set_snapInterval =
- function(value) {
- if (value != this.snapInterval_) {
- this.snapInterval_ = value;
- this.dispatchEvent('snapIntervalChanged');
- }
-};
-
-
-/**
- * @expose
- * @return {number} The stepSize.
- */
-org_apache_flex_html_Spinner.prototype.get_stepSize =
- function() {
- return this.stepSize_;
-};
-
-
-/**
- * @expose
- * @param {number} value The new stepSize value.
- */
-org_apache_flex_html_Spinner.prototype.set_stepSize =
- function(value) {
- if (value != this.stepSize_) {
- this.stepSize_ = value;
- this.dispatchEvent('stepSizeChanged');
- }
-};
+Object.defineProperties(org_apache_flex_html_Spinner.prototype, {
+ 'minimum': {
+ get: function() {
+ return this.minimum_;
+ },
+ set: function(value) {
+ if (value != this.minimum_) {
+ this.minimum_ = value;
+ this.dispatchEvent('minimumChanged');
+ }
+ }
+ },
+ 'maximum': {
+ get: function() {
+ return this.maximum_;
+ },
+ set: function(value) {
+ if (value != this.maximum_) {
+ this.maximum_ = value;
+ this.dispatchEvent('maximumChanged');
+ }
+ }
+ },
+ 'snapInterval': {
+ get: function() {
+ return this.snapInterval_;
+ },
+ set: function(value) {
+ if (value != this.snapInterval_) {
+ this.snapInterval_ = value;
+ this.dispatchEvent('snapIntervalChanged');
+ }
+ }
+ },
+ 'stepSize': {
+ get: function() {
+ return this.stepSize_;
+ },
+ set: function(value) {
+ if (value != this.stepSize_) {
+ this.stepSize_ = value;
+ this.dispatchEvent('stepSizeChanged');
+ }
+ }
+ }
+});
/**
http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/5344e8ba/frameworks/js/FlexJS/src/org/apache/flex/html/TextArea.js
----------------------------------------------------------------------
diff --git a/frameworks/js/FlexJS/src/org/apache/flex/html/TextArea.js b/frameworks/js/FlexJS/src/org/apache/flex/html/TextArea.js
index aaba67e..3accf39 100644
--- a/frameworks/js/FlexJS/src/org/apache/flex/html/TextArea.js
+++ b/frameworks/js/FlexJS/src/org/apache/flex/html/TextArea.js
@@ -53,20 +53,13 @@ org_apache_flex_html_TextArea.prototype.createElement =
};
-/**
- * @expose
- * @return {string} The text getter.
- */
-org_apache_flex_html_TextArea.prototype.get_text = function() {
- return this.element.value;
-};
-
-
-/**
- * @expose
- * @param {string} value The text setter.
- */
-org_apache_flex_html_TextArea.prototype.set_text =
- function(value) {
- this.element.value = value;
-};
+Object.defineProperties(org_apache_flex_html_TextArea.prototype, {
+ 'text': {
+ get: function() {
+ return this.element.value;
+ },
+ set: function(value) {
+ this.element.value = value;
+ }
+ }
+});
http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/5344e8ba/frameworks/js/FlexJS/src/org/apache/flex/html/TextButton.js
----------------------------------------------------------------------
diff --git a/frameworks/js/FlexJS/src/org/apache/flex/html/TextButton.js b/frameworks/js/FlexJS/src/org/apache/flex/html/TextButton.js
index 1442327..0dce8f8 100644
--- a/frameworks/js/FlexJS/src/org/apache/flex/html/TextButton.js
+++ b/frameworks/js/FlexJS/src/org/apache/flex/html/TextButton.js
@@ -39,20 +39,13 @@ org_apache_flex_html_TextButton.prototype.FLEXJS_CLASS_INFO =
qName: 'org_apache_flex_html_TextButton'}] };
-/**
- * @expose
- * @return {string} The text getter.
- */
-org_apache_flex_html_TextButton.prototype.get_text = function() {
- return this.element.innerHTML;
-};
-
-
-/**
- * @expose
- * @param {string} value The text setter.
- */
-org_apache_flex_html_TextButton.prototype.set_text =
- function(value) {
- this.element.innerHTML = value;
-};
+Object.defineProperties(org_apache_flex_html_TextButton.prototype, {
+ 'text': {
+ get: function() {
+ return this.element.innerHTML;
+ },
+ set: function(value) {
+ this.element.innerHTML = value;
+ }
+ }
+});
http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/5344e8ba/frameworks/js/FlexJS/src/org/apache/flex/html/TextInput.js
----------------------------------------------------------------------
diff --git a/frameworks/js/FlexJS/src/org/apache/flex/html/TextInput.js b/frameworks/js/FlexJS/src/org/apache/flex/html/TextInput.js
index b6fb306..b86c315 100644
--- a/frameworks/js/FlexJS/src/org/apache/flex/html/TextInput.js
+++ b/frameworks/js/FlexJS/src/org/apache/flex/html/TextInput.js
@@ -57,23 +57,17 @@ org_apache_flex_html_TextInput.prototype.createElement = function() {
};
-/**
- * @expose
- * @return {string} The text getter.
- */
-org_apache_flex_html_TextInput.prototype.get_text = function() {
- return this.element.value;
-};
-
-
-/**
- * @expose
- * @param {string} value The text setter.
- */
-org_apache_flex_html_TextInput.prototype.set_text = function(value) {
- this.element.value = value;
- this.dispatchEvent(new org_apache_flex_events_Event('textChange'));
-};
+Object.defineProperties(org_apache_flex_html_TextButton.prototype, {
+ 'text': {
+ get: function() {
+ return this.element.value;
+ },
+ set: function(value) {
+ this.element.value = value;
+ this.dispatchEvent(new org_apache_flex_events_Event('textChange'));
+ }
+ },
+});
/**
http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/5344e8ba/frameworks/js/FlexJS/src/org/apache/flex/html/ToggleTextButton.js
----------------------------------------------------------------------
diff --git a/frameworks/js/FlexJS/src/org/apache/flex/html/ToggleTextButton.js b/frameworks/js/FlexJS/src/org/apache/flex/html/ToggleTextButton.js
index 22bfda7..4373cef 100644
--- a/frameworks/js/FlexJS/src/org/apache/flex/html/ToggleTextButton.js
+++ b/frameworks/js/FlexJS/src/org/apache/flex/html/ToggleTextButton.js
@@ -47,56 +47,36 @@ org_apache_flex_html_ToggleTextButton.prototype.FLEXJS_CLASS_INFO =
qName: 'org_apache_flex_html_ToggleTextButton'}] };
-/**
- * @expose
- * @return {string} The text getter.
- */
-org_apache_flex_html_ToggleTextButton.prototype.get_text = function() {
- return this.element.innerHTML;
-};
-
-
-/**
- * @expose
- * @param {string} value The text setter.
- */
-org_apache_flex_html_ToggleTextButton.prototype.set_text =
- function(value) {
- this.element.innerHTML = value;
-};
-
-
-/**
- * @expose
- * @return {boolean} The selected getter.
- */
-org_apache_flex_html_ToggleTextButton.prototype.get_selected =
- function() {
- return this.selected_;
-};
-
-
-/**
- * @expose
- * @param {boolean} value The selected setter.
- */
-org_apache_flex_html_ToggleTextButton.prototype.set_selected =
- function(value) {
- if (this.selected_ != value) {
- this.selected_ = value;
-
- var className = this.className;
- if (value) {
- if (className.indexOf(this.SELECTED) == className.length - this.SELECTED.length)
- this.className = className.substring(0, className.length - this.SELECTED.length);
- }
- else {
- if (className.indexOf(this.SELECTED) == -1)
- this.className = className + this.SELECTED;
- }
-
- }
-};
+Object.defineProperties(org_apache_flex_html_TextButton.prototype, {
+ 'text': {
+ get: function() {
+ return this.element.innerHTML;
+ },
+ set: function(value) {
+ this.element.innerHTML = value;
+ }
+ },
+ 'selected': {
+ get: function() {
+ return this.selected_;
+ },
+ set: function(value) {
+ if (this.selected_ != value) {
+ this.selected_ = value;
+
+ var className = this.className;
+ if (value) {
+ if (className.indexOf(this.SELECTED) == className.length - this.SELECTED.length)
+ this.className = className.substring(0, className.length - this.SELECTED.length);
+ }
+ else {
+ if (className.indexOf(this.SELECTED) == -1)
+ this.className = className + this.SELECTED;
+ }
+ }
+ }
+ }
+});
/**
http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/5344e8ba/frameworks/js/FlexJS/src/org/apache/flex/html/accessories/NumericOnlyTextInputBead.js
----------------------------------------------------------------------
diff --git a/frameworks/js/FlexJS/src/org/apache/flex/html/accessories/NumericOnlyTextInputBead.js b/frameworks/js/FlexJS/src/org/apache/flex/html/accessories/NumericOnlyTextInputBead.js
index f602571..0fa28a7 100644
--- a/frameworks/js/FlexJS/src/org/apache/flex/html/accessories/NumericOnlyTextInputBead.js
+++ b/frameworks/js/FlexJS/src/org/apache/flex/html/accessories/NumericOnlyTextInputBead.js
@@ -44,13 +44,16 @@ org_apache_flex_html_accessories_NumericOnlyTextInputBead.prototype.FLEXJS_CLASS
* @expose
* @param {Object} value The new host.
*/
-org_apache_flex_html_accessories_NumericOnlyTextInputBead.
- prototype.set_strand = function(value) {
- if (this.strand_ !== value) {
- this.strand_ = value;
- value.addEventListener('keypress', goog.bind(this.validateInput, this));
- }
-};
+Object.defineProperties(org_apache_flex_html_accessories_NumericOnlyTextInputBead.prototype, {
+ 'strand': {
+ set: function(value) {
+ if (this.strand_ !== value) {
+ this.strand_ = value;
+ value.addEventListener('keypress', goog.bind(this.validateInput, this));
+ }
+ }
+ }
+});
/**
http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/5344e8ba/frameworks/js/FlexJS/src/org/apache/flex/html/accessories/PasswordInputBead.js
----------------------------------------------------------------------
diff --git a/frameworks/js/FlexJS/src/org/apache/flex/html/accessories/PasswordInputBead.js b/frameworks/js/FlexJS/src/org/apache/flex/html/accessories/PasswordInputBead.js
index 84ac89b..6c30516 100644
--- a/frameworks/js/FlexJS/src/org/apache/flex/html/accessories/PasswordInputBead.js
+++ b/frameworks/js/FlexJS/src/org/apache/flex/html/accessories/PasswordInputBead.js
@@ -40,14 +40,13 @@ org_apache_flex_html_accessories_PasswordInputBead.prototype.FLEXJS_CLASS_INFO =
qName: 'org_apache_flex_html_accessories_PasswordInputBead' }] };
-/**
- * @expose
- * @param {Object} value The new host.
- */
-org_apache_flex_html_accessories_PasswordInputBead.
- prototype.set_strand = function(value) {
- if (this.strand_ !== value) {
- this.strand_ = value;
- value.element.type = 'password';
- }
-};
+Object.defineProperties(org_apache_flex_html_accessories_PasswordInputBead.prototype, {
+ 'strand': {
+ set: function(value) {
+ if (this.strand_ !== value) {
+ this.strand_ = value;
+ value.element.type = 'password';
+ }
+ }
+ }
+});
http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/5344e8ba/frameworks/js/FlexJS/src/org/apache/flex/html/beads/DataItemRendererFactoryForArrayData.js
----------------------------------------------------------------------
diff --git a/frameworks/js/FlexJS/src/org/apache/flex/html/beads/DataItemRendererFactoryForArrayData.js b/frameworks/js/FlexJS/src/org/apache/flex/html/beads/DataItemRendererFactoryForArrayData.js
index 0bd17f2..5dcdd63 100644
--- a/frameworks/js/FlexJS/src/org/apache/flex/html/beads/DataItemRendererFactoryForArrayData.js
+++ b/frameworks/js/FlexJS/src/org/apache/flex/html/beads/DataItemRendererFactoryForArrayData.js
@@ -58,62 +58,49 @@ org_apache_flex_html_beads_DataItemRendererFactoryForArrayData.
prototype.itemRendererClass_ = null;
-/**
- * @expose
- * @param {Object} value The component strand.
- */
-org_apache_flex_html_beads_DataItemRendererFactoryForArrayData.
- prototype.set_strand = function(value) {
- this.strand_ = value;
-
- this.model = value.getBeadByType(
- org_apache_flex_html_beads_models_ArraySelectionModel);
-
- this.listView = value.getBeadByType(
- org_apache_flex_html_beads_ListView);
- this.dataGroup = this.listView.dataGroup;
-
- this.model.addEventListener('dataProviderChanged',
- goog.bind(this.dataProviderChangedHandler, this));
-
- if (org_apache_flex_core_ValuesManager.valuesImpl.getValue && !this.itemRendererFactory_) {
- /**
- * @type {Function}
- */
- var c = /** @type {Function} */ (org_apache_flex_core_ValuesManager.valuesImpl.getValue(this.strand_,
- 'iItemRendererClassFactory'));
- this.itemRendererFactory_ = new c();
- this.strand_.addBead(this.itemRendererFactory_);
- }
-
- this.dataProviderChangedHandler(null);
-};
-
-
-/**
- * @expose
- * @return {Object} The itemRenderer.
- */
-org_apache_flex_html_beads_DataItemRendererFactoryForArrayData.
- prototype.get_itemRendererClass = function() {
- if (org_apache_flex_core_ValuesManager.valuesImpl.getValue && !this.itemRendererClass_) {
- var c = org_apache_flex_core_ValuesManager.valuesImpl.getValue(this.strand_, 'iItemRenderer');
- if (c) {
- this.itemRendererClass_ = c;
- }
- }
- return this.itemRendererClass_;
-};
-
-
-/**
- * @expose
- * @param {Object} value class to use for the item renderer.
- */
-org_apache_flex_html_beads_DataItemRendererFactoryForArrayData.
- prototype.set_itemRendererClass = function(value) {
- this.itemRendererClass_ = value;
-};
+Object.defineProperties(org_apache_flex_html_beads_DataItemRendererFactoryForArrayData.prototype, {
+ 'strand': {
+ set: function(value) {
+ this.strand_ = value;
+
+ this.model = value.getBeadByType(
+ org_apache_flex_html_beads_models_ArraySelectionModel);
+
+ this.listView = value.getBeadByType(
+ org_apache_flex_html_beads_ListView);
+ this.dataGroup = this.listView.dataGroup;
+
+ this.model.addEventListener('dataProviderChanged',
+ goog.bind(this.dataProviderChangedHandler, this));
+
+ if (org_apache_flex_core_ValuesManager.valuesImpl.getValue && !this.itemRendererFactory_) {
+ /**
+ * @type {Function}
+ */
+ var c = /** @type {Function} */ (org_apache_flex_core_ValuesManager.valuesImpl.getValue(this.strand_,
+ 'iItemRendererClassFactory'));
+ this.itemRendererFactory_ = new c();
+ this.strand_.addBead(this.itemRendererFactory_);
+ }
+
+ this.dataProviderChangedHandler(null);
+ }
+ },
+ 'itemRendererClass': {
+ get: function() {
+ if (org_apache_flex_core_ValuesManager.valuesImpl.getValue && !this.itemRendererClass_) {
+ var c = org_apache_flex_core_ValuesManager.valuesImpl.getValue(this.strand_, 'iItemRenderer');
+ if (c) {
+ this.itemRendererClass_ = c;
+ }
+ }
+ return this.itemRendererClass_;
+ },
+ set: function(value) {
+ this.itemRendererClass_ = value;
+ }
+ }
+});
/**
http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/5344e8ba/frameworks/js/FlexJS/src/org/apache/flex/html/beads/ListView.js
----------------------------------------------------------------------
diff --git a/frameworks/js/FlexJS/src/org/apache/flex/html/beads/ListView.js b/frameworks/js/FlexJS/src/org/apache/flex/html/beads/ListView.js
index 9f7dd4a..2428fdf 100644
--- a/frameworks/js/FlexJS/src/org/apache/flex/html/beads/ListView.js
+++ b/frameworks/js/FlexJS/src/org/apache/flex/html/beads/ListView.js
@@ -141,48 +141,30 @@ org_apache_flex_html_beads_ListView.prototype.
};
-/**
- * @expose
- * @return {Object} The view that contains the layout objects.
- */
-org_apache_flex_html_beads_ListView.prototype.get_contentView = function() {
- return this.dataGroup_;
-};
-
-
-/**
- * @expose
- * @return {Object} The border for the layout area.
- */
-org_apache_flex_html_beads_ListView.prototype.get_border = function() {
- return null;
-};
-
-
-/**
- * @expose
- * @return {Object} The vertical scrollbar.
- */
-org_apache_flex_html_beads_ListView.prototype.get_vScrollBar = function() {
- return null;
-};
-
-
-/**
- * @expose
- * @param {Object} value The vertical scrollbar.
- */
-org_apache_flex_html_beads_ListView.prototype.set_vScrollBar = function(value) {
-};
-
-
-/**
- * @expose
- * @return {Object} The view that can be resized.
- */
-org_apache_flex_html_beads_ListView.prototype.get_resizeableView = function() {
- return this;
-};
+Object.defineProperties(org_apache_flex_html_beads_ListView.prototype, {
+ 'contentView': {
+ get: function() {
+ return this.dataGroup_;
+ }
+ },
+ 'border': {
+ get: function() {
+ return null;
+ }
+ },
+ 'vScrollBar': {
+ get: function() {
+ return null;
+ },
+ set: function(value) {
+ }
+ },
+ 'resizeableView': {
+ get: function() {
+ return this;
+ }
+ }
+});
/**
http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/5344e8ba/frameworks/js/FlexJS/src/org/apache/flex/html/beads/TextItemRendererFactoryForArrayData.js
----------------------------------------------------------------------
diff --git a/frameworks/js/FlexJS/src/org/apache/flex/html/beads/TextItemRendererFactoryForArrayData.js b/frameworks/js/FlexJS/src/org/apache/flex/html/beads/TextItemRendererFactoryForArrayData.js
index 76c3544..3033f6f 100644
--- a/frameworks/js/FlexJS/src/org/apache/flex/html/beads/TextItemRendererFactoryForArrayData.js
+++ b/frameworks/js/FlexJS/src/org/apache/flex/html/beads/TextItemRendererFactoryForArrayData.js
@@ -47,26 +47,25 @@ org_apache_flex_html_beads_TextItemRendererFactoryForArrayData.
interfaces: [org_apache_flex_core_IItemRenderer] };
-/**
- * @expose
- * @param {Object} value The component strand.
- */
-org_apache_flex_html_beads_TextItemRendererFactoryForArrayData.
- prototype.set_strand = function(value) {
- this.strand_ = value;
+Object.defineProperties(org_apache_flex_html_beads_TextItemRendererFactoryForArrayData.prototype, {
+ 'strand': {
+ set: function(value) {
+ this.strand_ = value;
- this.model = value.getBeadByType(
- org_apache_flex_html_beads_models_ArraySelectionModel);
+ this.model = value.getBeadByType(
+ org_apache_flex_html_beads_models_ArraySelectionModel);
- this.listView = value.getBeadByType(
- org_apache_flex_html_beads_ListView);
- this.dataGroup = this.listView.dataGroup;
+ this.listView = value.getBeadByType(
+ org_apache_flex_html_beads_ListView);
+ this.dataGroup = this.listView.dataGroup;
- this.model.addEventListener('dataProviderChanged',
- goog.bind(this.dataProviderChangedHandler, this));
+ this.model.addEventListener('dataProviderChanged',
+ goog.bind(this.dataProviderChangedHandler, this));
- this.dataProviderChangedHandler(null);
-};
+ this.dataProviderChangedHandler(null);
+ }
+ }
+});
/**
http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/5344e8ba/frameworks/js/FlexJS/src/org/apache/flex/html/beads/controllers/ItemRendererMouseController.js
----------------------------------------------------------------------
diff --git a/frameworks/js/FlexJS/src/org/apache/flex/html/beads/controllers/ItemRendererMouseController.js b/frameworks/js/FlexJS/src/org/apache/flex/html/beads/controllers/ItemRendererMouseController.js
index fec6fad..617adeb 100644
--- a/frameworks/js/FlexJS/src/org/apache/flex/html/beads/controllers/ItemRendererMouseController.js
+++ b/frameworks/js/FlexJS/src/org/apache/flex/html/beads/controllers/ItemRendererMouseController.js
@@ -37,25 +37,25 @@ org_apache_flex_html_beads_controllers_ItemRendererMouseController.prototype.FLE
interfaces: [org_apache_flex_core_IBeadController] };
-/**
- * @expose
- * @param {Object} value The strand for this component.
- */
-org_apache_flex_html_beads_controllers_ItemRendererMouseController.prototype.set_strand = function(value) {
- this.strand_ = value;
+Object.defineProperties(org_apache_flex_html_beads_controllers_ItemRendererMouseController.prototype, {
+ 'strand': {
+ set: function(value) {
+ this.strand_ = value;
- goog.events.listen(this.strand_.element, goog.events.EventType.MOUSEOVER,
- goog.bind(this.handleMouseOver, this));
+ goog.events.listen(this.strand_.element, goog.events.EventType.MOUSEOVER,
+ goog.bind(this.handleMouseOver, this));
- goog.events.listen(this.strand_.element, goog.events.EventType.MOUSEOUT,
- goog.bind(this.handleMouseOut, this));
+ goog.events.listen(this.strand_.element, goog.events.EventType.MOUSEOUT,
+ goog.bind(this.handleMouseOut, this));
- goog.events.listen(this.strand_.element, goog.events.EventType.MOUSEDOWN,
- goog.bind(this.handleMouseDown, this));
+ goog.events.listen(this.strand_.element, goog.events.EventType.MOUSEDOWN,
+ goog.bind(this.handleMouseDown, this));
- goog.events.listen(this.strand_.element, goog.events.EventType.MOUSEUP,
- goog.bind(this.handleMouseUp, this));
-};
+ goog.events.listen(this.strand_.element, goog.events.EventType.MOUSEUP,
+ goog.bind(this.handleMouseUp, this));
+ }
+ }
+});
/**
http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/5344e8ba/frameworks/js/FlexJS/src/org/apache/flex/html/beads/controllers/ListSingleSelectionMouseController.js
----------------------------------------------------------------------
diff --git a/frameworks/js/FlexJS/src/org/apache/flex/html/beads/controllers/ListSingleSelectionMouseController.js b/frameworks/js/FlexJS/src/org/apache/flex/html/beads/controllers/ListSingleSelectionMouseController.js
index 6ee9dc6..8770bf6 100644
--- a/frameworks/js/FlexJS/src/org/apache/flex/html/beads/controllers/ListSingleSelectionMouseController.js
+++ b/frameworks/js/FlexJS/src/org/apache/flex/html/beads/controllers/ListSingleSelectionMouseController.js
@@ -39,23 +39,22 @@ org_apache_flex_html_beads_controllers_ListSingleSelectionMouseController.protot
interfaces: [org_apache_flex_core_IBeadController] };
-/**
- * @expose
- * ListSingleSelectionMouseController}
- * @param {Object} value The strand for this component.
- */
-org_apache_flex_html_beads_controllers_ListSingleSelectionMouseController.prototype.set_strand = function(value) {
- this.strand_ = value;
+Object.defineProperties(org_apache_flex_html_beads_controllers_ListSingleSelectionMouseController.prototype, {
+ 'strand': {
+ set: function(value) {
+ this.strand_ = value;
- this.model = value.getBeadByType(
- org_apache_flex_html_beads_models_ArraySelectionModel);
- this.listView = value.getBeadByType(
- org_apache_flex_html_beads_ListView);
+ this.model = value.getBeadByType(
+ org_apache_flex_html_beads_models_ArraySelectionModel);
+ this.listView = value.getBeadByType(
+ org_apache_flex_html_beads_ListView);
- this.dataGroup = this.listView.dataGroup;
- this.dataGroup.addEventListener('selected',
- goog.bind(this.selectedHandler, this));
-};
+ this.dataGroup = this.listView.dataGroup;
+ this.dataGroup.addEventListener('selected',
+ goog.bind(this.selectedHandler, this));
+ }
+ }
+});
/**
http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/5344e8ba/frameworks/js/FlexJS/src/org/apache/flex/html/beads/controllers/SliderMouseController.js
----------------------------------------------------------------------
diff --git a/frameworks/js/FlexJS/src/org/apache/flex/html/beads/controllers/SliderMouseController.js b/frameworks/js/FlexJS/src/org/apache/flex/html/beads/controllers/SliderMouseController.js
index 4493ddc..eb58d58 100644
--- a/frameworks/js/FlexJS/src/org/apache/flex/html/beads/controllers/SliderMouseController.js
+++ b/frameworks/js/FlexJS/src/org/apache/flex/html/beads/controllers/SliderMouseController.js
@@ -37,26 +37,24 @@ org_apache_flex_html_beads_controllers_SliderMouseController.prototype.FLEXJS_CL
qName: 'org_apache_flex_html_beads_controllers_SliderMouseController' }] };
-/**
- * @expose
- * SliderMouseController}
- * @param {Object} value The strand.
- */
-org_apache_flex_html_beads_controllers_SliderMouseController.
- prototype.set_strand = function(value) {
- this.strand_ = value;
+Object.defineProperties(org_apache_flex_html_beads_controllers_SliderMouseController.prototype, {
+ 'strand': {
+ set: function(value) {
+ this.strand_ = value;
- this.track = this.strand_.getBeadByType(
- org_apache_flex_html_beads_SliderTrackView);
- this.thumb = this.strand_.getBeadByType(
- org_apache_flex_html_beads_SliderThumbView);
+ this.track = this.strand_.getBeadByType(
+ org_apache_flex_html_beads_SliderTrackView);
+ this.thumb = this.strand_.getBeadByType(
+ org_apache_flex_html_beads_SliderThumbView);
- goog.events.listen(this.track.element, goog.events.EventType.CLICK,
+ goog.events.listen(this.track.element, goog.events.EventType.CLICK,
this.handleTrackClick, false, this);
- goog.events.listen(this.thumb.element, goog.events.EventType.MOUSEDOWN,
+ goog.events.listen(this.thumb.element, goog.events.EventType.MOUSEDOWN,
this.handleThumbDown, false, this);
-};
+ }
+ }
+});
/**
http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/5344e8ba/frameworks/js/FlexJS/src/org/apache/flex/html/beads/controllers/SpinnerMouseController.js
----------------------------------------------------------------------
diff --git a/frameworks/js/FlexJS/src/org/apache/flex/html/beads/controllers/SpinnerMouseController.js b/frameworks/js/FlexJS/src/org/apache/flex/html/beads/controllers/SpinnerMouseController.js
index 5bce99c..340317a 100644
--- a/frameworks/js/FlexJS/src/org/apache/flex/html/beads/controllers/SpinnerMouseController.js
+++ b/frameworks/js/FlexJS/src/org/apache/flex/html/beads/controllers/SpinnerMouseController.js
@@ -36,24 +36,22 @@ org_apache_flex_html_beads_controllers_SpinnerMouseController.prototype.FLEXJS_C
qName: 'org_apache_flex_html_beads_controllers_SpinnerMouseController' }] };
-/**
- * @expose
- * SpinnerMouseController}
- * @param {Object} value The strand.
- */
-org_apache_flex_html_beads_controllers_SpinnerMouseController.
- prototype.set_strand = function(value) {
- this.strand_ = value;
-
- this.incrementButton = this.strand_.incrementButton;
- this.decrementButton = this.strand_.decrementButton;
-
- goog.events.listen(this.incrementButton.element, goog.events.EventType.CLICK,
- goog.bind(this.handleIncrementClick, this));
-
- goog.events.listen(this.decrementButton.element, goog.events.EventType.CLICK,
- goog.bind(this.handleDecrementClick, this));
-};
+Object.defineProperties(org_apache_flex_html_beads_controllers_SpinnerMouseController.prototype, {
+ 'strand': {
+ set: function(value) {
+ this.strand_ = value;
+
+ this.incrementButton = this.strand_.incrementButton;
+ this.decrementButton = this.strand_.decrementButton;
+
+ goog.events.listen(this.incrementButton.element, goog.events.EventType.CLICK,
+ goog.bind(this.handleIncrementClick, this));
+
+ goog.events.listen(this.decrementButton.element, goog.events.EventType.CLICK,
+ goog.bind(this.handleDecrementClick, this));
+ }
+ }
+});
/**
http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/5344e8ba/frameworks/js/FlexJS/src/org/apache/flex/html/beads/layouts/NonVirtualBasicLayout.js
----------------------------------------------------------------------
diff --git a/frameworks/js/FlexJS/src/org/apache/flex/html/beads/layouts/NonVirtualBasicLayout.js b/frameworks/js/FlexJS/src/org/apache/flex/html/beads/layouts/NonVirtualBasicLayout.js
index f705adc..f02734d 100644
--- a/frameworks/js/FlexJS/src/org/apache/flex/html/beads/layouts/NonVirtualBasicLayout.js
+++ b/frameworks/js/FlexJS/src/org/apache/flex/html/beads/layouts/NonVirtualBasicLayout.js
@@ -43,35 +43,28 @@ org_apache_flex_html_beads_layouts_NonVirtualBasicLayout.prototype.FLEXJS_CLASS_
interfaces: [org_apache_flex_core_IBeadLayout] };
-/**
- * @expose
- * @param {Object} value The new host.
- */
-org_apache_flex_html_beads_layouts_NonVirtualBasicLayout.
- prototype.set_strand = function(value) {
- if (this.strand_ !== value) {
- this.strand_ = value;
- if (this.strand_.isWidthSizedToContent() &&
- this.strand_.isHeightSizedToContent())
- this.addOtherListeners();
- else {
- this.strand_.addEventListener('heightChanged',
- goog.bind(this.changeHandler, this));
- this.strand_.addEventListener('widthChanged',
- goog.bind(this.changeHandler, this));
- this.strand_.addEventListener('sizeChanged',
- goog.bind(this.sizeChangeHandler, this));
-
- // in JS, we won't always get size/width/height change
- // events because we let the browser layout based on
- // %'s and don't convert to pixels, so listen to the
- // other events anyway.
- /* if (!isNaN(this.strand_.explicitWidth) &&
- !isNaN(this.strand_.explicitHeight))*/
- this.addOtherListeners();
- }
- }
-};
+Object.defineProperties(org_apache_flex_html_beads_layouts_NonVirtualBasicLayout.prototype, {
+ 'strand': {
+ set: function(value) {
+ if (this.strand_ !== value) {
+ this.strand_ = value;
+ if (this.strand_.isWidthSizedToContent() &&
+ this.strand_.isHeightSizedToContent())
+ this.addOtherListeners();
+ else {
+ this.strand_.addEventListener('heightChanged',
+ goog.bind(this.changeHandler, this));
+ this.strand_.addEventListener('widthChanged',
+ goog.bind(this.changeHandler, this));
+ this.strand_.addEventListener('sizeChanged',
+ goog.bind(this.sizeChangeHandler, this));
+
+ this.addOtherListeners();
+ }
+ }
+ }
+ }
+});
/**
http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/5344e8ba/frameworks/js/FlexJS/src/org/apache/flex/html/beads/layouts/NonVirtualBasicScrollingLayout.js
----------------------------------------------------------------------
diff --git a/frameworks/js/FlexJS/src/org/apache/flex/html/beads/layouts/NonVirtualBasicScrollingLayout.js b/frameworks/js/FlexJS/src/org/apache/flex/html/beads/layouts/NonVirtualBasicScrollingLayout.js
index af85336..03359d6 100644
--- a/frameworks/js/FlexJS/src/org/apache/flex/html/beads/layouts/NonVirtualBasicScrollingLayout.js
+++ b/frameworks/js/FlexJS/src/org/apache/flex/html/beads/layouts/NonVirtualBasicScrollingLayout.js
@@ -40,20 +40,19 @@ org_apache_flex_html_beads_layouts_NonVirtualBasicScrollingLayout.prototype.FLEX
interfaces: [org_apache_flex_core_IBeadLayout] };
-/**
- * @expose
- * @param {Object} value The new host.
- */
-org_apache_flex_html_beads_layouts_NonVirtualBasicScrollingLayout.
- prototype.set_strand = function(value) {
- if (this.strand_ !== value) {
- this.strand_ = value;
- this.strand_.addEventListener('childrenAdded',
- goog.bind(this.changeHandler, this));
- this.strand_.addEventListener('layoutNeeded',
- goog.bind(this.changeHandler, this));
- }
-};
+Object.defineProperties(org_apache_flex_html_beads_layouts_NonVirtualBasicScrollingLayout.prototype, {
+ 'strand': {
+ set: function(value) {
+ if (this.strand_ !== value) {
+ this.strand_ = value;
+ this.strand_.addEventListener('childrenAdded',
+ goog.bind(this.changeHandler, this));
+ this.strand_.addEventListener('layoutNeeded',
+ goog.bind(this.changeHandler, this));
+ }
+ }
+ }
+});
/**
http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/5344e8ba/frameworks/js/FlexJS/src/org/apache/flex/html/beads/layouts/NonVirtualVerticalLayout.js
----------------------------------------------------------------------
diff --git a/frameworks/js/FlexJS/src/org/apache/flex/html/beads/layouts/NonVirtualVerticalLayout.js b/frameworks/js/FlexJS/src/org/apache/flex/html/beads/layouts/NonVirtualVerticalLayout.js
index 747a1f9..b15aa99 100644
--- a/frameworks/js/FlexJS/src/org/apache/flex/html/beads/layouts/NonVirtualVerticalLayout.js
+++ b/frameworks/js/FlexJS/src/org/apache/flex/html/beads/layouts/NonVirtualVerticalLayout.js
@@ -40,30 +40,29 @@ org_apache_flex_html_beads_layouts_NonVirtualVerticalLayout.prototype.FLEXJS_CLA
interfaces: [org_apache_flex_core_IBeadLayout] };
-/**
- * @expose
- * @param {Object} value The new host.
- */
-org_apache_flex_html_beads_layouts_NonVirtualVerticalLayout.
- prototype.set_strand = function(value) {
- if (this.strand_ !== value) {
- this.strand_ = value;
- if (this.strand_.isWidthSizedToContent() &&
- this.strand_.isHeightSizedToContent())
- this.addOtherListeners();
- else {
- this.strand_.addEventListener('heightChanged',
- goog.bind(this.changeHandler, this));
- this.strand_.addEventListener('widthChanged',
- goog.bind(this.changeHandler, this));
- this.strand_.addEventListener('sizeChanged',
- goog.bind(this.sizeChangeHandler, this));
- if (!isNaN(this.strand_.explicitWidth) &&
- !isNaN(this.strand_.explicitHeight))
- this.addOtherListeners();
- }
- }
-};
+Object.defineProperties(org_apache_flex_html_beads_layouts_NonVirtualVerticalLayout.prototype, {
+ 'strand': {
+ set: function(value) {
+ if (this.strand_ !== value) {
+ this.strand_ = value;
+ if (this.strand_.isWidthSizedToContent() &&
+ this.strand_.isHeightSizedToContent())
+ this.addOtherListeners();
+ else {
+ this.strand_.addEventListener('heightChanged',
+ goog.bind(this.changeHandler, this));
+ this.strand_.addEventListener('widthChanged',
+ goog.bind(this.changeHandler, this));
+ this.strand_.addEventListener('sizeChanged',
+ goog.bind(this.sizeChangeHandler, this));
+ if (!isNaN(this.strand_.explicitWidth) &&
+ !isNaN(this.strand_.explicitHeight))
+ this.addOtherListeners();
+ }
+ }
+ }
+ }
+});
/**
http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/5344e8ba/frameworks/js/FlexJS/src/org/apache/flex/html/beads/layouts/NonVirtualVerticalScrollingLayout.js
----------------------------------------------------------------------
diff --git a/frameworks/js/FlexJS/src/org/apache/flex/html/beads/layouts/NonVirtualVerticalScrollingLayout.js b/frameworks/js/FlexJS/src/org/apache/flex/html/beads/layouts/NonVirtualVerticalScrollingLayout.js
index 79c4c6e..9a969e9 100644
--- a/frameworks/js/FlexJS/src/org/apache/flex/html/beads/layouts/NonVirtualVerticalScrollingLayout.js
+++ b/frameworks/js/FlexJS/src/org/apache/flex/html/beads/layouts/NonVirtualVerticalScrollingLayout.js
@@ -39,12 +39,12 @@ org_apache_flex_html_beads_layouts_NonVirtualVerticalScrollingLayout.prototype.F
interfaces: [org_apache_flex_core_IBeadLayout] };
-/**
- * @expose
- * @param {Object} value The new host.
- */
-org_apache_flex_html_beads_layouts_NonVirtualVerticalScrollingLayout.prototype.set_strand = function(value) {
- if (this.strand_ !== value) {
- this.strand_ = value;
- }
-};
+Object.defineProperties(org_apache_flex_html_beads_layouts_NonVirtualVerticalLayout.prototype, {
+ 'strand': {
+ set: function(value) {
+ if (this.strand_ !== value) {
+ this.strand_ = value;
+ }
+ }
+ }
+});
http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/5344e8ba/frameworks/js/FlexJS/src/org/apache/flex/html/supportClasses/ButtonBarButtonItemRenderer.js
----------------------------------------------------------------------
diff --git a/frameworks/js/FlexJS/src/org/apache/flex/html/supportClasses/ButtonBarButtonItemRenderer.js b/frameworks/js/FlexJS/src/org/apache/flex/html/supportClasses/ButtonBarButtonItemRenderer.js
index bca880d..0fc0bd6 100644
--- a/frameworks/js/FlexJS/src/org/apache/flex/html/supportClasses/ButtonBarButtonItemRenderer.js
+++ b/frameworks/js/FlexJS/src/org/apache/flex/html/supportClasses/ButtonBarButtonItemRenderer.js
@@ -70,43 +70,29 @@ org_apache_flex_html_supportClasses_ButtonBarButtonItemRenderer.
};
-/**
- * @expose
- * @param {Object} value The strand.
- */
-org_apache_flex_html_supportClasses_ButtonBarButtonItemRenderer.
- prototype.set_strand = function(value) {
-
- this.strand_ = value;
-};
-
-
-/**
- * @expose
- * @return {Object} The strand.
- */
-org_apache_flex_html_supportClasses_ButtonBarButtonItemRenderer.
- prototype.get_strand = function() {
- return this.strand_;
-};
-
-
-/**
- * @expose
- * @param {Object} value The text to display.
- */
-org_apache_flex_html_supportClasses_ButtonBarButtonItemRenderer.
- prototype.set_data = function(value) {
-
- org_apache_flex_html_supportClasses_ButtonBarButtonItemRenderer.base(this, 'set_data', value);
-
- if (value.hasOwnProperty('label')) {
- this.button.innerHTML = value.label;
- }
- else if (value.hasOwnProperty('title')) {
- this.button.innerHTML = value.title;
- }
- else {
- this.button.innerHTML = value;
- }
-};
+Object.defineProperties(org_apache_flex_html_supportClasses_ButtonBarButtonItemRenderer.prototype, {
+ 'strand': {
+ set: function(value) {
+ this.strand_ = value;
+ },
+ get: function() {
+ return this.strand_;
+ }
+ },
+ 'data': {
+ set: function(value) {
+
+ org_apache_flex_html_supportClasses_ButtonBarButtonItemRenderer.base(this, 'set_data', value);
+
+ if (value.hasOwnProperty('label')) {
+ this.button.innerHTML = value.label;
+ }
+ else if (value.hasOwnProperty('title')) {
+ this.button.innerHTML = value.title;
+ }
+ else {
+ this.button.innerHTML = value;
+ }
+ }
+ }
+});
http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/5344e8ba/frameworks/js/FlexJS/src/org/apache/flex/html/supportClasses/DataItemRenderer.js
----------------------------------------------------------------------
diff --git a/frameworks/js/FlexJS/src/org/apache/flex/html/supportClasses/DataItemRenderer.js b/frameworks/js/FlexJS/src/org/apache/flex/html/supportClasses/DataItemRenderer.js
index 0e4d912..bd9ecf7 100644
--- a/frameworks/js/FlexJS/src/org/apache/flex/html/supportClasses/DataItemRenderer.js
+++ b/frameworks/js/FlexJS/src/org/apache/flex/html/supportClasses/DataItemRenderer.js
@@ -69,89 +69,52 @@ org_apache_flex_html_supportClasses_DataItemRenderer.
};
-/**
- * @expose
- * @return {Object} The item renderer's parent.
- */
-org_apache_flex_html_supportClasses_DataItemRenderer.
- prototype.get_itemRendererParent = function() {
- return this.rendererParent_;
-};
-
-
-/**
- * @expose
- * @param {Object} value The item renderer's parent.
- */
-org_apache_flex_html_supportClasses_DataItemRenderer.
- prototype.set_itemRendererParent = function(value) {
- this.rendererParent_ = value;
-};
-
-
-/**
- * @expose
- * @param {Object} value The renderer's index.
- */
-org_apache_flex_html_supportClasses_DataItemRenderer.
- prototype.set_index = function(value) {
- this.index_ = value;
-};
-
-
-/**
- * @expose
- * @param {string} value The name of field to use.
- */
-org_apache_flex_html_supportClasses_DataItemRenderer.
- prototype.set_dataField = function(value) {
-
- this.dataField_ = value;
-};
-
-
-/**
- * @expose
- * @return {string} The name of the field to use.
- */
-org_apache_flex_html_supportClasses_DataItemRenderer.
- prototype.get_dataField = function() {
-
- return this.dataField_;
-};
-
-
-/**
- * @override
- * @param {Boolean} value The selection state.
- */
-org_apache_flex_html_supportClasses_DataItemRenderer.
- prototype.set_selected = function(value) {
- this.selected_ = value;
-
- if (value) {
- this.backgroundView.style.backgroundColor = '#9C9C9C';
- } else {
- this.backgroundView.style.backgroundColor = null;
- }
-};
-
-
-/**
- * @override
- * @param {Boolean} value The hovered state.
- */
-org_apache_flex_html_supportClasses_DataItemRenderer.
- prototype.set_hovered = function(value) {
- this.hovered_ = value;
-
- if (value) {
- this.backgroundView.style.backgroundColor = '#ECECEC';
- } else {
- if (this.selected_) {
- this.backgroundView.style.backgroundColor = '#9C9C9C';
- } else {
- this.backgroundView.style.backgroundColor = null;
- }
- }
-};
+Object.defineProperties(org_apache_flex_html_supportClasses_DataItemRenderer.prototype, {
+ 'itemRendererParent': {
+ get: function() {
+ return this.rendererParent_;
+ },
+ set: function(value) {
+ this.rendererParent_ = value;
+ }
+ },
+ 'index': {
+ set: function(value) {
+ this.index_ = value;
+ }
+ },
+ 'dataField': {
+ set: function(value) {
+ this.dataField_ = value;
+ },
+ get: function() {
+ return this.dataField_;
+ }
+ },
+ 'selected': {
+ set: function(value) {
+ this.selected_ = value;
+
+ if (value) {
+ this.backgroundView.style.backgroundColor = '#9C9C9C';
+ } else {
+ this.backgroundView.style.backgroundColor = null;
+ }
+ }
+ },
+ 'hovered': {
+ set: function(value) {
+ this.hovered_ = value;
+
+ if (value) {
+ this.backgroundView.style.backgroundColor = '#ECECEC';
+ } else {
+ if (this.selected_) {
+ this.backgroundView.style.backgroundColor = '#9C9C9C';
+ } else {
+ this.backgroundView.style.backgroundColor = null;
+ }
+ }
+ }
+ }
+});
http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/5344e8ba/frameworks/js/FlexJS/src/org/apache/flex/html/supportClasses/NonVirtualDataGroup.js
----------------------------------------------------------------------
diff --git a/frameworks/js/FlexJS/src/org/apache/flex/html/supportClasses/NonVirtualDataGroup.js b/frameworks/js/FlexJS/src/org/apache/flex/html/supportClasses/NonVirtualDataGroup.js
index 970c693..a5de69b 100644
--- a/frameworks/js/FlexJS/src/org/apache/flex/html/supportClasses/NonVirtualDataGroup.js
+++ b/frameworks/js/FlexJS/src/org/apache/flex/html/supportClasses/NonVirtualDataGroup.js
@@ -44,14 +44,20 @@ org_apache_flex_html_supportClasses_NonVirtualDataGroup.prototype.FLEXJS_CLASS_I
qName: 'org_apache_flex_html_supportClasses_NonVirtualDataGroup' }] };
-/**
- * @expose
- * @param {Object} value The strand.
- */
-org_apache_flex_html_supportClasses_NonVirtualDataGroup.
- prototype.set_strand = function(value) {
- this.strand_ = value;
-};
+Object.defineProperties(org_apache_flex_html_supportClasses_NonVirtualDataGroup.prototype, {
+ 'strand': {
+ set: function(value) {
+ this.strand_ = value;
+ }
+ },
+ 'numElements': {
+ get: function() {
+
+ var n = this.element.childNodes.length;
+ return n;
+ }
+ }
+});
/**
@@ -102,18 +108,6 @@ org_apache_flex_html_supportClasses_NonVirtualDataGroup.
/**
* @expose
- * @return {number} The number of child nodes in the group.
- */
-org_apache_flex_html_supportClasses_NonVirtualDataGroup.
- prototype.get_numElements = function() {
-
- var n = this.element.childNodes.length;
- return n;
-};
-
-
-/**
- * @expose
* @param {number} index The index of the desired element.
* @return {Object} The element at the given index.
*/
http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/5344e8ba/frameworks/js/FlexJS/src/org/apache/flex/html/supportClasses/StringItemRenderer.js
----------------------------------------------------------------------
diff --git a/frameworks/js/FlexJS/src/org/apache/flex/html/supportClasses/StringItemRenderer.js b/frameworks/js/FlexJS/src/org/apache/flex/html/supportClasses/StringItemRenderer.js
index 1d4a974..4377bad 100644
--- a/frameworks/js/FlexJS/src/org/apache/flex/html/supportClasses/StringItemRenderer.js
+++ b/frameworks/js/FlexJS/src/org/apache/flex/html/supportClasses/StringItemRenderer.js
@@ -70,108 +70,54 @@ org_apache_flex_html_supportClasses_StringItemRenderer.
};
-/**
- * @expose
- * @param {Object} value The strand.
- */
-org_apache_flex_html_supportClasses_StringItemRenderer.
- prototype.set_strand = function(value) {
-
- this.strand_ = value;
-};
-
-
-/**
- * @expose
- * @return {Object} The strand.
- */
-org_apache_flex_html_supportClasses_StringItemRenderer.
- prototype.get_strand = function() {
- return this.strand_;
-};
-
-
-/**
- * @expose
- * @return {Object} The item renderer's parent.
- */
-org_apache_flex_html_supportClasses_StringItemRenderer.
- prototype.get_itemRendererParent = function() {
- return this.rendererParent_;
-};
-
-
-/**
- * @expose
- * @param {Object} value The item renderer's parent.
- */
-org_apache_flex_html_supportClasses_StringItemRenderer.
- prototype.set_itemRendererParent = function(value) {
- this.rendererParent_ = value;
-};
-
-
-/**
- * @expose
- * @param {Object} value The renderer's index.
- */
-org_apache_flex_html_supportClasses_StringItemRenderer.
- prototype.set_index = function(value) {
- this.index_ = value;
-};
-
-
-/**
- * @expose
- * @param {Object} value The text to display.
- */
-org_apache_flex_html_supportClasses_StringItemRenderer.
- prototype.set_text = function(value) {
-
- this.element.innerHTML = value;
-};
-
-
-/**
- * @expose
- * @return {Object} The text being displayed.
- */
-org_apache_flex_html_supportClasses_StringItemRenderer.
- prototype.get_text = function() {
-
- return this.element.innerHTML;
-};
-
-
-/**
- * @expose
- * @param {Object} value The text to display.
- */
-org_apache_flex_html_supportClasses_StringItemRenderer.
- prototype.set_data = function(value) {
-
- org_apache_flex_html_supportClasses_StringItemRenderer.base(this, 'set_data', value);
-
- if (this.labelField) {
- this.element.innerHTML = String(value[this.labelField]);
- }
- else if (this.dataField) {
- this.element.innerHTML = String(value[this.dataField]);
- }
- else if (value.toString) {
- this.element.innerHTML = value.toString();
- } else {
- this.element.innerHTML = String(value);
- }
-};
-
-
-/**
- * @expose
- * @return {Object} The text being displayed.
- */
-org_apache_flex_html_supportClasses_StringItemRenderer.
- prototype.get_data = function() {
-
- return this.element.innerHTML;
-};
+Object.defineProperties(org_apache_flex_html_supportClasses_StringItemRenderer.prototype, {
+ 'strand': {
+ set: function(value) {
+ this.strand_ = value;
+ },
+ get: function() {
+ return this.strand_;
+ }
+ },
+ 'itemRendererParent': {
+ get: function() {
+ return this.rendererParent_;
+ },
+ set: function(value) {
+ this.rendererParent_ = value;
+ }
+ },
+ 'index': {
+ set: function(value) {
+ this.index_ = value;
+ }
+ },
+ 'text': {
+ set: function(value) {
+ this.element.innerHTML = value;
+ },
+ get: function() {
+ return this.element.innerHTML;
+ }
+ },
+ 'data': {
+ set: function(value) {
+ org_apache_flex_html_supportClasses_StringItemRenderer.base(this, 'set_data', value);
+
+ if (this.labelField) {
+ this.element.innerHTML = String(value[this.labelField]);
+ }
+ else if (this.dataField) {
+ this.element.innerHTML = String(value[this.dataField]);
+ }
+ else if (value.toString) {
+ this.element.innerHTML = value.toString();
+ } else {
+ this.element.innerHTML = String(value);
+ }
+ },
+ get: function() {
+ return this.element.innerHTML;
+ }
+ }
+});
http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/5344e8ba/frameworks/js/FlexJS/src/org/apache/flex/html5/CheckBox.js
----------------------------------------------------------------------
diff --git a/frameworks/js/FlexJS/src/org/apache/flex/html5/CheckBox.js b/frameworks/js/FlexJS/src/org/apache/flex/html5/CheckBox.js
index ebf79a0..2e4ec8b 100644
--- a/frameworks/js/FlexJS/src/org/apache/flex/html5/CheckBox.js
+++ b/frameworks/js/FlexJS/src/org/apache/flex/html5/CheckBox.js
@@ -49,40 +49,21 @@ org_apache_flex_html5_CheckBox.prototype.createElement =
};
-/**
- * @expose
- * @return {string} The text getter.
- */
-org_apache_flex_html5_CheckBox.prototype.get_text = function() {
- return this.element.childNodes.item(1).nodeValue;
-};
-
-
-/**
- * @expose
- * @param {string} value The text setter.
- */
-org_apache_flex_html5_CheckBox.prototype.set_text =
- function(value) {
- this.element.childNodes.item(1).nodeValue = value;
-};
-
-
-/**
- * @expose
- * @return {boolean} The selected getter.
- */
-org_apache_flex_html5_CheckBox.prototype.get_selected =
- function() {
- return this.element.childNodes.item(0).checked;
-};
-
-
-/**
- * @expose
- * @param {boolean} value The selected setter.
- */
-org_apache_flex_html5_CheckBox.prototype.set_selected =
- function(value) {
- this.element.childNodes.item(0).checked = value;
-};
+Object.defineProperties(org_apache_flex_html5_CheckBox.prototype, {
+ 'text': {
+ get: function() {
+ return this.element.childNodes.item(1).nodeValue;
+ },
+ set: function(value) {
+ this.element.childNodes.item(1).nodeValue = value;
+ }
+ },
+ selected: {
+ get: function() {
+ return this.element.childNodes.item(0).checked;
+ },
+ set: function(value) {
+ this.element.childNodes.item(0).checked = value;
+ }
+ }
+});
http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/5344e8ba/frameworks/js/FlexJS/src/org/apache/flex/html5/ComboBox.js
----------------------------------------------------------------------
diff --git a/frameworks/js/FlexJS/src/org/apache/flex/html5/ComboBox.js b/frameworks/js/FlexJS/src/org/apache/flex/html5/ComboBox.js
index 72dd41c..4b36bbc 100644
--- a/frameworks/js/FlexJS/src/org/apache/flex/html5/ComboBox.js
+++ b/frameworks/js/FlexJS/src/org/apache/flex/html5/ComboBox.js
@@ -166,31 +166,18 @@ org_apache_flex_html5_ComboBox.prototype.buttonClicked =
};
-/**
- * @override
- * @expose
- * @param {Array.<Object>} value The collection of data.
- */
-org_apache_flex_html5_ComboBox.prototype.set_dataProvider =
- function(value) {
- this.dataProvider = value;
-};
-
-
-/**
- * @expose
- * @return {string} The text getter.
- */
-org_apache_flex_html5_ComboBox.prototype.get_text = function() {
- return this.element.childNodes.item(0).value;
-};
-
-
-/**
- * @expose
- * @param {string} value The text setter.
- */
-org_apache_flex_html5_ComboBox.prototype.set_text =
- function(value) {
- this.element.childNodes.item(0).value = value;
-};
+Object.defineProperties(org_apache_flex_html5_ComboBox.prototype, {
+ 'dataProvider': {
+ set: function(value) {
+ this.dataProvider = value;
+ }
+ },
+ 'text': {
+ get: function() {
+ return this.element.childNodes.item(0).value;
+ },
+ set: function(value) {
+ this.element.childNodes.item(0).value = value;
+ }
+ }
+});
http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/5344e8ba/frameworks/js/FlexJS/src/org/apache/flex/html5/Label.js
----------------------------------------------------------------------
diff --git a/frameworks/js/FlexJS/src/org/apache/flex/html5/Label.js b/frameworks/js/FlexJS/src/org/apache/flex/html5/Label.js
index 05030a3..c4bf43d 100644
--- a/frameworks/js/FlexJS/src/org/apache/flex/html5/Label.js
+++ b/frameworks/js/FlexJS/src/org/apache/flex/html5/Label.js
@@ -42,20 +42,13 @@ org_apache_flex_html5_Label.prototype.createElement =
};
-/**
- * @expose
- * @return {string} The text getter.
- */
-org_apache_flex_html5_Label.prototype.get_text = function() {
- return this.element.innerHTML;
-};
-
-
-/**
- * @expose
- * @param {string} value The text setter.
- */
-org_apache_flex_html5_Label.prototype.set_text =
- function(value) {
- this.element.innerHTML = value;
-};
+Object.defineProperties(org_apache_flex_html5_Label.prototype, {
+ 'text': {
+ get: function() {
+ return this.element.innerHTML;
+ },
+ set: function(value) {
+ this.element.innerHTML = value;
+ }
+ }
+});