http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/7bb9e9a5/frameworks/js/FlexJS/src/org/apache/flex/html/beads/models/ArraySelectionModel.js ---------------------------------------------------------------------- diff --git a/frameworks/js/FlexJS/src/org/apache/flex/html/beads/models/ArraySelectionModel.js b/frameworks/js/FlexJS/src/org/apache/flex/html/beads/models/ArraySelectionModel.js index e9a979d..2a3ca53 100644 --- a/frameworks/js/FlexJS/src/org/apache/flex/html/beads/models/ArraySelectionModel.js +++ b/frameworks/js/FlexJS/src/org/apache/flex/html/beads/models/ArraySelectionModel.js @@ -45,116 +45,76 @@ org_apache_flex_html_beads_models_ArraySelectionModel.prototype.FLEXJS_CLASS_INF interfaces: [org_apache_flex_core_ISelectionModel] }; -/** - * @expose - * @param {Object} value The strand. - */ -org_apache_flex_html_beads_models_ArraySelectionModel.prototype. - set_strand = function(value) { - this.strand_ = value; -}; - - -/** - * @expose - * @return {Object} value The dataProvider. - */ -org_apache_flex_html_beads_models_ArraySelectionModel.prototype. - get_dataProvider = function() { - return this.dataProvider_; -}; - - -/** - * @expose - * @param {Object} value The dataProvider. - */ -org_apache_flex_html_beads_models_ArraySelectionModel.prototype. - set_dataProvider = function(value) { - this.dataProvider_ = value; - this.dispatchEvent('dataProviderChanged'); -}; - - -/** - * @expose - * @return {number} value The selected index. - */ -org_apache_flex_html_beads_models_ArraySelectionModel.prototype. - get_selectedIndex = function() { - return this.selectedIndex_; -}; - - -/** - * @expose - * @param {number} value The selected index. - */ -org_apache_flex_html_beads_models_ArraySelectionModel.prototype. - set_selectedIndex = function(value) { - this.selectedIndex_ = value; - this.dispatchEvent('selectedIndexChanged'); -}; - - -/** - * @expose - * @return {Object} value The selected item. - */ -org_apache_flex_html_beads_models_ArraySelectionModel.prototype. - get_selectedItem = function() { - var si; - - si = this.selectedIndex_; - - if (!this.dataProvider_ || si < 0 || - si >= this.dataProvider_.length) { - return null; - } - - return this.dataProvider_[si]; -}; - - -/** - * @expose - * @param {Object} value The selected item. - */ -org_apache_flex_html_beads_models_ArraySelectionModel.prototype. - set_selectedItem = function(value) { - // find item in dataProvider and set selectedIndex or -1 if not exists - - this.selectedIndex_ = -1; - var n = this.dataProvider_.length; - for (var i = 0; i < n; i++) { - var item = this.dataProvider_[i]; - if (item == value) { - this.selectedIndex_ = i; - break; - } - } - - this.dispatchEvent('selectedItemChanged'); - this.dispatchEvent('selectedIndexChanged'); -}; - - -/** - * @expose - * @return {String} The name of the field to use as a label. - */ -org_apache_flex_html_beads_models_ArraySelectionModel.prototype.get_labelField = -function() { - return this.labelField_; -}; - - -/** - * @expose - * @param {String} value The name of the field to use as a label. - */ -org_apache_flex_html_beads_models_ArraySelectionModel.prototype.set_labelField = -function(value) { - this.labelField_ = value; - this.dispatchEvent('labelFieldChanged'); -}; +Object.defineProperties(org_apache_flex_html_beads_models_ArraySelectionModel.prototype, { + 'strand': { + /** @this {org_apache_flex_html_beads_models_ArraySelectionModel} */ + set: function(value) { + this.strand_ = value; + } + }, + 'dataProvider': { + /** @this {org_apache_flex_html_beads_models_ArraySelectionModel} */ + get: function() { + return this.dataProvider_; + }, + /** @this {org_apache_flex_html_beads_models_ArraySelectionModel} */ + set: function(value) { + this.dataProvider_ = value; + this.dispatchEvent('dataProviderChanged'); + } + }, + 'selectedIndex': { + /** @this {org_apache_flex_html_beads_models_ArraySelectionModel} */ + get: function() { + return this.selectedIndex_; + }, + /** @this {org_apache_flex_html_beads_models_ArraySelectionModel} */ + set: function(value) { + this.selectedIndex_ = value; + this.dispatchEvent('selectedIndexChanged'); + } + }, + 'selectedItem': { + /** @this {org_apache_flex_html_beads_models_ArraySelectionModel} */ + get: function() { + var si; + + si = this.selectedIndex_; + + if (!this.dataProvider_ || si < 0 || + si >= this.dataProvider_.length) { + return null; + } + + return this.dataProvider_[si]; + }, + /** @this {org_apache_flex_html_beads_models_ArraySelectionModel} */ + set: function(value) { + // find item in dataProvider and set selectedIndex or -1 if not exists + + this.selectedIndex_ = -1; + var n = this.dataProvider_.length; + for (var i = 0; i < n; i++) { + var item = this.dataProvider_[i]; + if (item == value) { + this.selectedIndex_ = i; + break; + } + } + + this.dispatchEvent('selectedItemChanged'); + this.dispatchEvent('selectedIndexChanged'); + } + }, + 'labelField': { + /** @this {org_apache_flex_html_beads_models_ArraySelectionModel} */ + get: function() { + return this.labelField_; + }, + /** @this {org_apache_flex_html_beads_models_ArraySelectionModel} */ + set: function(value) { + this.labelField_ = value; + this.dispatchEvent('labelFieldChanged'); + } + } +});
http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/7bb9e9a5/frameworks/js/FlexJS/src/org/apache/flex/html/beads/models/DataGridModel.js ---------------------------------------------------------------------- diff --git a/frameworks/js/FlexJS/src/org/apache/flex/html/beads/models/DataGridModel.js b/frameworks/js/FlexJS/src/org/apache/flex/html/beads/models/DataGridModel.js index 8bf60f1..0f31c94 100644 --- a/frameworks/js/FlexJS/src/org/apache/flex/html/beads/models/DataGridModel.js +++ b/frameworks/js/FlexJS/src/org/apache/flex/html/beads/models/DataGridModel.js @@ -16,6 +16,7 @@ goog.provide('org_apache_flex_html_beads_models_DataGridModel'); goog.require('org_apache_flex_core_IDataGridModel'); goog.require('org_apache_flex_html_beads_models_ArraySelectionModel'); +goog.require('org_apache_flex_utils_Language'); @@ -48,32 +49,22 @@ org_apache_flex_html_beads_models_DataGridModel.prototype.FLEXJS_CLASS_INFO = interfaces: [org_apache_flex_core_IDataGridModel] }; -/** - * @expose - * @param {Object} value The strand. - */ -org_apache_flex_html_beads_models_DataGridModel.prototype. - set_strand = function(value) { - org_apache_flex_html_beads_models_DataGridModel.base(this, 'set_strand', value); - this.strand_ = value; -}; - - -/** - * @expose - * @param {Array} value Array of DataGridColumn instances. - */ -org_apache_flex_html_beads_models_DataGridModel.prototype. - set_columns = function(value) { - this.columns_ = value; -}; - - -/** - * @expose - * @return {Array} Array of DataGridColumn instances. - */ -org_apache_flex_html_beads_models_DataGridModel.prototype. - get_columns = function() { - return this.columns_; -}; +Object.defineProperties(org_apache_flex_html_beads_models_DataGridModel.prototype, { + 'strand': { + /** @this {org_apache_flex_html_beads_models_DataGridModel} */ + set: function(value) { + org_apache_flex_utils-Language(org_apache_flex_html_beads_models_DataGridModel, this, 'strand', value); + this.strand_ = value; + } + }, + 'columns': { + /** @this {org_apache_flex_html_beads_models_DataGridModel} */ + set: function(value) { + this.columns_ = value; + }, + /** @this {org_apache_flex_html_beads_models_DataGridModel} */ + get: function() { + return this.columns_; + } + } +}); http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/7bb9e9a5/frameworks/js/FlexJS/src/org/apache/flex/html/beads/models/ImageModel.js ---------------------------------------------------------------------- diff --git a/frameworks/js/FlexJS/src/org/apache/flex/html/beads/models/ImageModel.js b/frameworks/js/FlexJS/src/org/apache/flex/html/beads/models/ImageModel.js index 210a29e..e85f46f 100644 --- a/frameworks/js/FlexJS/src/org/apache/flex/html/beads/models/ImageModel.js +++ b/frameworks/js/FlexJS/src/org/apache/flex/html/beads/models/ImageModel.js @@ -41,32 +41,22 @@ org_apache_flex_html_beads_models_ImageModel.prototype.FLEXJS_CLASS_INFO = qName: 'org_apache_flex_html_beads_models_ImageModel'}] }; -/** - * @expose - * @param {Object} value The strand. - */ -org_apache_flex_html_beads_models_ImageModel.prototype. - set_strand = function(value) { - this.strand_ = value; -}; - - -/** - * @expose - * @return {Object} value The image source. - */ -org_apache_flex_html_beads_models_ImageModel.prototype. - get_source = function() { - return this.source; -}; - - -/** - * @expose - * @param {Object} value The image source. - */ -org_apache_flex_html_beads_models_ImageModel.prototype. - set_source = function(value) { - this.source = value; - this.dispatchEvent('sourceChanged'); -}; +Object.defineProperties(org_apache_flex_html_beads_models_ImageModel.prototype, { + 'strand': { + /** @this {org_apache_flex_html_beads_models_ImageModel} */ + set: function(value) { + this.strand_ = value; + } + }, + 'source': { + /** @this {org_apache_flex_html_beads_models_ImageModel} */ + get: function() { + return this.source; + }, + /** @this {org_apache_flex_html_beads_models_ImageModel} */ + set: function(value) { + this.source = value; + this.dispatchEvent('sourceChanged'); + } + } +}); http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/7bb9e9a5/frameworks/js/FlexJS/src/org/apache/flex/html/beads/models/ListPresentationModel.js ---------------------------------------------------------------------- diff --git a/frameworks/js/FlexJS/src/org/apache/flex/html/beads/models/ListPresentationModel.js b/frameworks/js/FlexJS/src/org/apache/flex/html/beads/models/ListPresentationModel.js index a38be51..3b8f24f 100644 --- a/frameworks/js/FlexJS/src/org/apache/flex/html/beads/models/ListPresentationModel.js +++ b/frameworks/js/FlexJS/src/org/apache/flex/html/beads/models/ListPresentationModel.js @@ -52,32 +52,22 @@ org_apache_flex_html_beads_models_ListPresentationModel.prototype.FLEXJS_CLASS_I interfaces: [org_apache_flex_core_IListPresentationModel] }; -/** - * @expose - * @param {Object} value The strand. - */ -org_apache_flex_html_beads_models_ListPresentationModel.prototype. - set_strand = function(value) { - this.strand_ = value; -}; - - -/** - * @expose - * @return {number} value The height of the rows. - */ -org_apache_flex_html_beads_models_ListPresentationModel.prototype. - get_rowHeight = function() { - return this.rowHeight_; -}; - - -/** - * @expose - * @param {number} value The height of the rows. - */ -org_apache_flex_html_beads_models_ListPresentationModel.prototype. - set_rowHeight = function(value) { - this.rowHeight_ = value; - this.dispatchEvent('rowHeightChanged'); -}; +Object.defineProperties(org_apache_flex_html_beads_models_ListPresentationModel.prototype, { + 'strand': { + /** @this {org_apache_flex_html_beads_models_ListPresentationModel} */ + set: function(value) { + this.strand_ = value; + } + }, + 'rowHeight': { + /** @this {org_apache_flex_html_beads_models_ListPresentationModel} */ + get: function() { + return this.rowHeight_; + }, + /** @this {org_apache_flex_html_beads_models_ListPresentationModel} */ + set: function(value) { + this.rowHeight_ = value; + this.dispatchEvent('rowHeightChanged'); + } + } +}); http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/7bb9e9a5/frameworks/js/FlexJS/src/org/apache/flex/html/beads/models/PanelModel.js ---------------------------------------------------------------------- diff --git a/frameworks/js/FlexJS/src/org/apache/flex/html/beads/models/PanelModel.js b/frameworks/js/FlexJS/src/org/apache/flex/html/beads/models/PanelModel.js index 092c1d6..6a6f3f8 100644 --- a/frameworks/js/FlexJS/src/org/apache/flex/html/beads/models/PanelModel.js +++ b/frameworks/js/FlexJS/src/org/apache/flex/html/beads/models/PanelModel.js @@ -56,82 +56,50 @@ org_apache_flex_html_beads_models_PanelModel.prototype.FLEXJS_CLASS_INFO = interfaces: [org_apache_flex_core_IBeadModel] }; -/** - * @expose - * @param {Object} value The strand. - */ -org_apache_flex_html_beads_models_PanelModel.prototype. - set_strand = function(value) { - this.strand_ = value; -}; - - -/** - * @expose - * @return {string} The title. - */ -org_apache_flex_html_beads_models_PanelModel.prototype. - get_title = function() { - return this.title_; -}; - - -/** - * @expose - * @param {string} value The title to set. - */ -org_apache_flex_html_beads_models_PanelModel.prototype. - set_title = function(value) { - if (this.title_ != value) { - this.title_ = value; - this.dispatchEvent('titleChange'); - } -}; - - -/** - * @expose - * @return {string} The HTML title. - */ -org_apache_flex_html_beads_models_PanelModel.prototype. - get_htmlTitle = function() { - return this.htmlTitle_; -}; - - -/** - * @expose - * @param {string} value The new HTML title. - */ -org_apache_flex_html_beads_models_PanelModel.prototype. - set_htmlTitle = function(value) { - if (this.htmlTitle_ != value) { - this.htmlTitle_ = value; - this.dispatchEvent('htmlTitleChange'); - } -}; - - -/** - * @expose - * @return {boolean} Returns true if the close button should appear in - * the TitleBar. - */ -org_apache_flex_html_beads_models_PanelModel.prototype. - get_showCloseButton = function() { - return this.showCloseButton_; -}; - - -/** - * @expose - * @param {boolean} value Determines if the close button shows (true) or - * not (false). - */ -org_apache_flex_html_beads_models_PanelModel.prototype. - set_showCloseButton = function(value) { - if (this.showCloseButton_ != value) { - this.showCloseButton_ = value; - this.dispatchEvent('showCloseButtonChange'); - } -}; +Object.defineProperties(org_apache_flex_html_beads_models_PanelModel.prototype, { + 'strand': { + /** @this {org_apache_flex_html_beads_models_PanelModel} */ + set: function(value) { + this.strand_ = value; + } + }, + 'title': { + /** @this {org_apache_flex_html_beads_models_PanelModel} */ + get: function() { + return this.title_; + }, + /** @this {org_apache_flex_html_beads_models_PanelModel} */ + set: function(value) { + if (this.title_ != value) { + this.title_ = value; + this.dispatchEvent('titleChange'); + } + } + }, + 'htmlTitle': { + /** @this {org_apache_flex_html_beads_models_PanelModel} */ + get: function() { + return this.htmlTitle_; + }, + /** @this {org_apache_flex_html_beads_models_PanelModel} */ + set: function(value) { + if (this.htmlTitle_ != value) { + this.htmlTitle_ = value; + this.dispatchEvent('htmlTitleChange'); + } + } + }, + 'showCloseButton': { + /** @this {org_apache_flex_html_beads_models_PanelModel} */ + get: function() { + return this.showCloseButton_; + }, + /** @this {org_apache_flex_html_beads_models_PanelModel} */ + set: function(value) { + if (this.showCloseButton_ != value) { + this.showCloseButton_ = value; + this.dispatchEvent('showCloseButtonChange'); + } + } + } +}); http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/7bb9e9a5/frameworks/js/FlexJS/src/org/apache/flex/html/beads/models/RangeModel.js ---------------------------------------------------------------------- diff --git a/frameworks/js/FlexJS/src/org/apache/flex/html/beads/models/RangeModel.js b/frameworks/js/FlexJS/src/org/apache/flex/html/beads/models/RangeModel.js index a3d7c9e..73d3dda 100644 --- a/frameworks/js/FlexJS/src/org/apache/flex/html/beads/models/RangeModel.js +++ b/frameworks/js/FlexJS/src/org/apache/flex/html/beads/models/RangeModel.js @@ -45,136 +45,86 @@ org_apache_flex_html_beads_models_RangeModel.prototype.FLEXJS_CLASS_INFO = qName: 'org_apache_flex_html_beads_models_RangeModel'}] }; -/** - * @expose - * @param {Object} value The strand. - */ -org_apache_flex_html_beads_models_RangeModel.prototype. - set_strand = function(value) { - this.strand_ = value; -}; - - -/** - * @expose - * @return {number} The current minimum value. - */ -org_apache_flex_html_beads_models_RangeModel.prototype. - get_minimum = function() { - return this.minimum_; -}; - - -/** - * @expose - * @param {number} value The new minimum value. - */ -org_apache_flex_html_beads_models_RangeModel.prototype. - set_minimum = function(value) { - if (this.minimum_ != value) { - this.minimum_ = value; - this.dispatchEvent('minimumChange'); - } -}; - - -/** - * @expose - * @return {number} The current maximu value. - */ -org_apache_flex_html_beads_models_RangeModel.prototype. - get_maximum = function() { - return this.maximum_; -}; - - -/** - * @expose - * @param {number} value The new maximum value. - */ -org_apache_flex_html_beads_models_RangeModel.prototype. - set_maximum = function(value) { - if (this.maximum_ != value) { - this.maximum_ = value; - this.dispatchEvent('maximumChange'); - } -}; - - -/** - * @expose - * @return {number} The current value. - */ -org_apache_flex_html_beads_models_RangeModel.prototype. - get_value = function() { - return this.value_; -}; - - -/** - * @expose - * @param {number} newValue The new value. - */ -org_apache_flex_html_beads_models_RangeModel.prototype. - set_value = function(newValue) { - if (this.value_ != newValue) { - - // value must lie within the boundaries of minimum & maximum - // and be on a step interval, so the value is adjusted to - // what is coming in. - newValue = Math.max(this.minimum_, newValue - this.stepSize_); - newValue = Math.min(this.maximum_, newValue + this.stepSize_); - this.value_ = this.snap(newValue); - - this.dispatchEvent('valueChange'); - } -}; - - -/** - * @expose - * @return {number} The current snapInterval value. - */ -org_apache_flex_html_beads_models_RangeModel.prototype. - get_snapInterval = function() { - return this.snapInterval_; -}; - - -/** - * @expose - * @param {number} value The new snapInterval value. - */ -org_apache_flex_html_beads_models_RangeModel.prototype. - set_snapInterval = function(value) { - if (this.snapInterval_ != value) { - this.snapInterval_ = value; - this.dispatchEvent('snapIntervalChange'); - } -}; - - -/** - * @expose - * @return {number} The current stepSize value. - */ -org_apache_flex_html_beads_models_RangeModel.prototype. - get_stepSize = function() { - return this.stepSize_; -}; - - -/** - * @expose - * @param {number} value The new stepSize value. - */ -org_apache_flex_html_beads_models_RangeModel.prototype. - set_stepSize = function(value) { - if (this.stepSize_ != value) { - this.stepSize_ = value; - this.dispatchEvent('stepSizeChange'); - } -}; +Object.defineProperties(org_apache_flex_html_beads_models_RangeModel.prototype, { + 'strand': { + /** @this {org_apache_flex_html_beads_models_RangeModel} */ + set: function(value) { + this.strand_ = value; + } + }, + 'minimum': { + /** @this {org_apache_flex_html_beads_models_RangeModel} */ + get: function() { + return this.minimum_; + }, + /** @this {org_apache_flex_html_beads_models_RangeModel} */ + set: function(value) { + if (this.minimum_ != value) { + this.minimum_ = value; + this.dispatchEvent('minimumChange'); + } + } + }, + 'maximum': { + /** @this {org_apache_flex_html_beads_models_RangeModel} */ + get: function() { + return this.maximum_; + }, + /** @this {org_apache_flex_html_beads_models_RangeModel} */ + set: function(value) { + if (this.maximum_ != value) { + this.maximum_ = value; + this.dispatchEvent('maximumChange'); + } + } + }, + 'value': { + /** @this {org_apache_flex_html_beads_models_RangeModel} */ + get: function() { + return this.value_; + }, + /** @this {org_apache_flex_html_beads_models_RangeModel} */ + set: function(newValue) { + if (this.value_ != newValue) { + + // value must lie within the boundaries of minimum & maximum + // and be on a step interval, so the value is adjusted to + // what is coming in. + newValue = Math.max(this.minimum_, newValue - this.stepSize_); + newValue = Math.min(this.maximum_, newValue + this.stepSize_); + this.value_ = this.snap(newValue); + + this.dispatchEvent('valueChange'); + } + } + }, + 'snapInterval': { + /** @this {org_apache_flex_html_beads_models_RangeModel} */ + get: function() { + return this.snapInterval_; + }, + /** @this {org_apache_flex_html_beads_models_RangeModel} */ + set: function(value) { + if (this.snapInterval_ != value) { + this.snapInterval_ = value; + this.dispatchEvent('snapIntervalChange'); + } + } + }, + 'stepSize': { + /** @this {org_apache_flex_html_beads_models_RangeModel} */ + get: function() { + return this.stepSize_; + }, + /** @this {org_apache_flex_html_beads_models_RangeModel} */ + set: function(value) { + if (this.stepSize_ != value) { + this.stepSize_ = value; + this.dispatchEvent('stepSizeChange'); + } + } + } +}); /** http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/7bb9e9a5/frameworks/js/FlexJS/src/org/apache/flex/html/beads/models/TextModel.js ---------------------------------------------------------------------- diff --git a/frameworks/js/FlexJS/src/org/apache/flex/html/beads/models/TextModel.js b/frameworks/js/FlexJS/src/org/apache/flex/html/beads/models/TextModel.js index f16a286..b361bad 100644 --- a/frameworks/js/FlexJS/src/org/apache/flex/html/beads/models/TextModel.js +++ b/frameworks/js/FlexJS/src/org/apache/flex/html/beads/models/TextModel.js @@ -45,32 +45,22 @@ org_apache_flex_html_beads_models_TextModel.prototype.FLEXJS_CLASS_INFO = interfaces: [org_apache_flex_core_ITextModel] }; -/** - * @expose - * @param {Object} value The strand. - */ -org_apache_flex_html_beads_models_TextModel.prototype. - set_strand = function(value) { - this.strand_ = value; -}; - - -/** - * @expose - * @return {Object} value The text. - */ -org_apache_flex_html_beads_models_TextModel.prototype. - get_text = function() { - return this.text_; -}; - - -/** - * @expose - * @param {Object} value The text. - */ -org_apache_flex_html_beads_models_TextModel.prototype. - set_text = function(value) { - this.text_ = value; - this.dispatchEvent('textChange'); -}; +Object.defineProperties(org_apache_flex_html_beads_models_TextModel.prototype, { + 'strand': { + /** @this {org_apache_flex_html_beads_models_TextModel} */ + set: function(value) { + this.strand_ = value; + } + }, + 'text': { + /** @this {org_apache_flex_html_beads_models_TextModel} */ + get: function() { + return this.text_; + }, + /** @this {org_apache_flex_html_beads_models_TextModel} */ + set: function(value) { + this.text_ = value; + this.dispatchEvent('textChange'); + } + } +}); http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/7bb9e9a5/frameworks/js/FlexJS/src/org/apache/flex/html/beads/models/TitleBarModel.js ---------------------------------------------------------------------- diff --git a/frameworks/js/FlexJS/src/org/apache/flex/html/beads/models/TitleBarModel.js b/frameworks/js/FlexJS/src/org/apache/flex/html/beads/models/TitleBarModel.js index 95085e4..f1a7a8a 100644 --- a/frameworks/js/FlexJS/src/org/apache/flex/html/beads/models/TitleBarModel.js +++ b/frameworks/js/FlexJS/src/org/apache/flex/html/beads/models/TitleBarModel.js @@ -59,82 +59,50 @@ org_apache_flex_html_beads_models_TitleBarModel.prototype.FLEXJS_CLASS_INFO = }; -/** - * @expose - * @param {Object} value The strand. - */ -org_apache_flex_html_beads_models_TitleBarModel.prototype. - set_strand = function(value) { - this.strand_ = value; -}; - - -/** - * @expose - * @return {string} The title. - */ -org_apache_flex_html_beads_models_TitleBarModel.prototype. - get_title = function() { - return this.title_; -}; - - -/** - * @expose - * @param {string} value The title to set. - */ -org_apache_flex_html_beads_models_TitleBarModel.prototype. - set_title = function(value) { - if (this.title_ != value) { - this.title_ = value; - this.dispatchEvent('titleChange'); - } -}; - - -/** - * @expose - * @return {string} The HTML title. - */ -org_apache_flex_html_beads_models_TitleBarModel.prototype. - get_htmlTitle = function() { - return this.htmlTitle_; -}; - - -/** - * @expose - * @param {string} value The new HTML title. - */ -org_apache_flex_html_beads_models_TitleBarModel.prototype. - set_htmlTitle = function(value) { - if (this.htmlTitle_ != value) { - this.htmlTitle_ = value; - this.dispatchEvent('htmlTitleChange'); - } -}; - - -/** - * @expose - * @return {boolean} Returns true if the close button should appear in - * the TitleBar. - */ -org_apache_flex_html_beads_models_TitleBarModel.prototype. - get_showCloseButton = function() { - return this.showCloseButton_; -}; - - -/** - * @expose - * @param {boolean} value Determines if the close button shows (true) or - * not (false). - */ -org_apache_flex_html_beads_models_TitleBarModel.prototype. - set_showCloseButton = function(value) { - if (this.showCloseButton_ != value) { - this.showCloseButton_ = value; - this.dispatchEvent('showCloseButtonChange'); - } -}; +Object.defineProperties(org_apache_flex_html_beads_models_TitleBarModel.prototype, { + 'strand': { + /** @this {org_apache_flex_html_beads_models_TitleBarModel} */ + set: function(value) { + this.strand_ = value; + } + }, + 'title': { + /** @this {org_apache_flex_html_beads_models_TitleBarModel} */ + get: function() { + return this.title_; + }, + /** @this {org_apache_flex_html_beads_models_TitleBarModel} */ + set: function(value) { + if (this.title_ != value) { + this.title_ = value; + this.dispatchEvent('titleChange'); + } + } + }, + 'htmlTitle': { + /** @this {org_apache_flex_html_beads_models_TitleBarModel} */ + get: function() { + return this.htmlTitle_; + }, + /** @this {org_apache_flex_html_beads_models_TitleBarModel} */ + set: function(value) { + if (this.htmlTitle_ != value) { + this.htmlTitle_ = value; + this.dispatchEvent('htmlTitleChange'); + } + } + }, + 'showCloseButton': { + /** @this {org_apache_flex_html_beads_models_TitleBarModel} */ + get: function() { + return this.showCloseButton_; + }, + /** @this {org_apache_flex_html_beads_models_TitleBarModel} */ + set: function(value) { + if (this.showCloseButton_ != value) { + this.showCloseButton_ = value; + this.dispatchEvent('showCloseButtonChange'); + } + } + } +}); http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/7bb9e9a5/frameworks/js/FlexJS/src/org/apache/flex/html/supportClasses/DataGridColumn.js ---------------------------------------------------------------------- diff --git a/frameworks/js/FlexJS/src/org/apache/flex/html/supportClasses/DataGridColumn.js b/frameworks/js/FlexJS/src/org/apache/flex/html/supportClasses/DataGridColumn.js index 0c30f26..78155f0 100644 --- a/frameworks/js/FlexJS/src/org/apache/flex/html/supportClasses/DataGridColumn.js +++ b/frameworks/js/FlexJS/src/org/apache/flex/html/supportClasses/DataGridColumn.js @@ -26,82 +26,46 @@ org_apache_flex_html_supportClasses_DataGridColumn = }; -/** - * @expose - * @return {mx_core_IFactory} The object factory for the itemRenderer. - */ -org_apache_flex_html_supportClasses_DataGridColumn.prototype.get_itemRenderer = -function() { - return this.itemRenderer_; -}; - - -/** - * @expose - * @param {mx_core_IFactory} value The object factory for the itemRenderer. - */ -org_apache_flex_html_supportClasses_DataGridColumn.prototype.set_itemRenderer = -function(value) { - this.itemRenderer_ = value; -}; - - -/** - * @expose - * @return {Number} The width of the column. - */ -org_apache_flex_html_supportClasses_DataGridColumn.prototype.get_columnWidth = -function() { - return this.columnWidth_; -}; - - -/** - * @expose - * @param {Number} value The width of the column. - */ -org_apache_flex_html_supportClasses_DataGridColumn.prototype.set_columnWidth = -function(value) { - this.columnWidth_ = value; -}; - - -/** - * @expose - * @return {String} The label for the column. - */ -org_apache_flex_html_supportClasses_DataGridColumn.prototype.get_label = -function() { - return this.label_; -}; - - -/** - * @expose - * @param {String} value The label for the column. - */ -org_apache_flex_html_supportClasses_DataGridColumn.prototype.set_label = -function(value) { - this.label_ = value; -}; - - -/** - * @expose - * @return {String} The field for the data for the column. - */ -org_apache_flex_html_supportClasses_DataGridColumn.prototype.get_dataField = -function() { - return this.dataField_; -}; - - -/** - * @expose - * @param {String} value The field for the data for the column. - */ -org_apache_flex_html_supportClasses_DataGridColumn.prototype.set_dataField = -function(value) { - this.dataField_ = value; -}; +Object.defineProperties(org_apache_flex_html_supportClasses_DataGridColumn.prototype, { + 'itemRenderer': { + /** @this {org_apache_flex_html_supportClasses_DataGridColumn} */ + get: function() { + return this.itemRenderer_; + }, + /** @this {org_apache_flex_html_supportClasses_DataGridColumn} */ + set: function(value) { + this.itemRenderer_ = value; + } + }, + 'columnWidth': { + /** @this {org_apache_flex_html_supportClasses_DataGridColumn} */ + get: function() { + return this.columnWidth_; + }, + /** @this {org_apache_flex_html_supportClasses_DataGridColumn} */ + set: function(value) { + this.columnWidth_ = value; + } + }, + 'label': { + /** @this {org_apache_flex_html_supportClasses_DataGridColumn} */ + get: function() { + return this.label_; + }, + /** @this {org_apache_flex_html_supportClasses_DataGridColumn} */ + set: function(value) { + this.label_ = value; + } + }, + 'dataField': { + /** @this {org_apache_flex_html_supportClasses_DataGridColumn} */ + get: function() { + return this.dataField_; + }, + /** @this {org_apache_flex_html_supportClasses_DataGridColumn} */ + set: function(value) { + this.dataField_ = value; + } + } +}); http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/7bb9e9a5/frameworks/js/FlexJS/src/org/apache/flex/html/supportClasses/UIItemRendererBase.js ---------------------------------------------------------------------- diff --git a/frameworks/js/FlexJS/src/org/apache/flex/html/supportClasses/UIItemRendererBase.js b/frameworks/js/FlexJS/src/org/apache/flex/html/supportClasses/UIItemRendererBase.js index 89bfc09..83bd86b 100644 --- a/frameworks/js/FlexJS/src/org/apache/flex/html/supportClasses/UIItemRendererBase.js +++ b/frameworks/js/FlexJS/src/org/apache/flex/html/supportClasses/UIItemRendererBase.js @@ -76,124 +76,62 @@ org_apache_flex_html_supportClasses_UIItemRendererBase.prototype.generateMXMLAtt }; -/** - * @expose - * @return {Object} The data being used for the itemRenderer. - */ -org_apache_flex_html_supportClasses_UIItemRendererBase.prototype.get_data = -function() { - return this.data_; -}; - - -/** - * @expose - * @param {Object} value The data to use for the itemRenderer. - */ -org_apache_flex_html_supportClasses_UIItemRendererBase.prototype.set_data = -function(value) { - this.data_ = value; -}; - - -/** - * @expose - * @return {String} The name of the field being used to display the label. - */ -org_apache_flex_html_supportClasses_UIItemRendererBase.prototype.get_labelField = -function() { - return this.labelField_; -}; - - -/** - * @expose - * @param {String} value The name of the field to use for the label. - */ -org_apache_flex_html_supportClasses_UIItemRendererBase.prototype.set_labelField = -function(value) { - this.labelField_ = value; -}; - - -/** - * @expose - * @return {Number} The index value set for this itemRenderer. - */ -org_apache_flex_html_supportClasses_UIItemRendererBase.prototype.get_index = -function() { - return this.index_; -}; - - -/** - * @expose - * @param {Number} value The row index for this itemRenderer. - */ -org_apache_flex_html_supportClasses_UIItemRendererBase.prototype.set_index = -function(value) { - this.index_ = value; -}; - - -/** - * @expose - * @return {Boolean} The current value of the hovered state. - */ -org_apache_flex_html_supportClasses_UIItemRendererBase.prototype.get_hovered = -function() { - return this.hovered_; -}; - - -/** - * @expose - * @param {Boolean} value Set to true if the itemRenderer should go into hovered state. - */ -org_apache_flex_html_supportClasses_UIItemRendererBase.prototype.set_hovered = -function(value) { - this.hovered_ = value; -}; - - -/** - * @expose - * @return {Boolean} Whether or not the itemRenderer is selected. - */ -org_apache_flex_html_supportClasses_UIItemRendererBase.prototype.get_selected = -function() { - return this.selected_; -}; - - -/** - * @expose - * @param {Boolean} value True if this itemRenderer instance is selected. - */ -org_apache_flex_html_supportClasses_UIItemRendererBase.prototype.set_selected = -function(value) { - this.selected_ = value; -}; - - -/** - * @expose - * @return {Boolean} The value of the down selection. - */ -org_apache_flex_html_supportClasses_UIItemRendererBase.prototype.get_down = -function() { - return this.down_; -}; - - -/** - * @expose - * @param {Boolean} value True if the mouse is in the down position. - */ -org_apache_flex_html_supportClasses_UIItemRendererBase.prototype.set_down = -function(value) { - this.down_ = value; -}; +Object.defineProperties(org_apache_flex_html_supportClasses_UIItemRendererBase.prototype, { + 'MXMLDescriptor': { + /** @this {org_apache_flex_html_supportClasses_UIItemRendererBase} */ + get: function() { + return null; + } + }, + 'data': { + get: function() { + return this.data_; + }, + set: function(value) { + this.data_ = value; + } + }, + 'labelField': { + get: function() { + return this.labelField_; + }, + set: function(value) { + this.labelField_ = value; + } + }, + 'index': { + get: function() { + return this.index_; + }, + set: function(value) { + this.index_ = value; + } + }, + 'hovered': { + get: function() { + return this.hovered_; + }, + set: function(value) { + this.hovered_ = value; + } + }, + 'selected': { + get: function() { + return this.selected_; + }, + set: function(value) { + this.selected_ = value; + } + }, + 'down': { + get: function() { + return this.down_; + }, + set: function(value) { + this.down_ = value; + } + } +}); /** @@ -221,13 +159,3 @@ org_apache_flex_html_supportClasses_UIItemRendererBase.prototype.adjustSize = function() { // handle in sub-class }; - - -Object.defineProperties(org_apache_flex_html_supportClasses_UIItemRendererBase.prototype, { - 'MXMLDescriptor': { - /** @this {org_apache_flex_html_supportClasses_UIItemRendererBase} */ - get: function() { - return null; - } - } -}); \ No newline at end of file http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/7bb9e9a5/frameworks/js/FlexJS/src/org/apache/flex/html5/RadioButton.js ---------------------------------------------------------------------- diff --git a/frameworks/js/FlexJS/src/org/apache/flex/html5/RadioButton.js b/frameworks/js/FlexJS/src/org/apache/flex/html5/RadioButton.js index efe24f6..084d198 100644 --- a/frameworks/js/FlexJS/src/org/apache/flex/html5/RadioButton.js +++ b/frameworks/js/FlexJS/src/org/apache/flex/html5/RadioButton.js @@ -49,61 +49,35 @@ org_apache_flex_html5_RadioButton.prototype.createElement = }; -/** - * @expose - * @return {string} The groupName getter. - */ -org_apache_flex_html5_RadioButton.prototype.get_groupName = - function() { - return this.element.childNodes.item(0).name; -}; - - -/** - * @expose - * @param {string} value The groupName setter. - */ -org_apache_flex_html5_RadioButton.prototype.set_groupName = - function(value) { - this.element.childNodes.item(0).name = value; -}; - - -/** - * @expose - * @return {string} The text getter. - */ -org_apache_flex_html5_RadioButton.prototype.get_text = - function() { - return this.element.childNodes.item(1).nodeValue; -}; - - -/** - * @expose - * @param {string} value The text setter. - */ -org_apache_flex_html5_RadioButton.prototype.set_text = - function(value) { - this.element.childNodes.item(1).nodeValue = value; -}; - - -/** - * @expose - * @return {boolean} The selected getter. - */ -org_apache_flex_html5_RadioButton.prototype.get_selected = - function() { - return this.element.childNodes.item(0).checked; -}; - - -/** - * @expose - * @param {boolean} value The selected setter. - */ -org_apache_flex_html5_RadioButton.prototype.set_selected = - function(value) { - this.element.childNodes.item(0).checked = value; -}; +Object.defineProperties(org_apache_flex_html5_RadioButton.prototype, { + 'groupName': { + /** @this {org_apache_flex_html5_RadioButton} */ + get: function() { + return this.element.childNodes.item(0).name; + }, + /** @this {org_apache_flex_html5_RadioButton} */ + set: function(value) { + this.element.childNodes.item(0).name = value; + } + }, + 'text' : { + /** @this {org_apache_flex_html5_RadioButton} */ + get: function() { + return this.element.childNodes.item(1).nodeValue; + }, + /** @this {org_apache_flex_html5_RadioButton} */ + set: function(value) { + this.element.childNodes.item(1).nodeValue = value; + } + }, + 'selected': { + /** @this {org_apache_flex_html5_RadioButton} */ + get: function() { + return this.element.childNodes.item(0).checked; + }, + /** @this {org_apache_flex_html5_RadioButton} */ + set: function(value) { + this.element.childNodes.item(0).checked = value; + } + } +}); http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/7bb9e9a5/frameworks/js/FlexJS/src/org/apache/flex/html5/TextButton.js ---------------------------------------------------------------------- diff --git a/frameworks/js/FlexJS/src/org/apache/flex/html5/TextButton.js b/frameworks/js/FlexJS/src/org/apache/flex/html5/TextButton.js index cf803e3..9e4d3f6 100644 --- a/frameworks/js/FlexJS/src/org/apache/flex/html5/TextButton.js +++ b/frameworks/js/FlexJS/src/org/apache/flex/html5/TextButton.js @@ -43,21 +43,15 @@ org_apache_flex_html5_TextButton.prototype.createElement = }; -/** - * @expose - * @return {string} The text getter. - */ -org_apache_flex_html5_TextButton.prototype.get_text = - function() { - return this.element.innerHTML; -}; - - -/** - * @expose - * @param {string} value The text setter. - */ -org_apache_flex_html5_TextButton.prototype.set_text = - function(value) { - this.element.innerHTML = value; -}; +Object.defineProperties(org_apache_flex_html5_TextButton.prototype, { + 'text': { + /** @this {org_apache_flex_html5_TextButton} */ + get: function() { + return this.element.innerHTML; + }, + /** @this {org_apache_flex_html5_TextButton} */ + set: function(value) { + this.element.innerHTML = value; + } + } +}); http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/7bb9e9a5/frameworks/js/FlexJS/src/org/apache/flex/jquery/RadioButton.js ---------------------------------------------------------------------- diff --git a/frameworks/js/FlexJS/src/org/apache/flex/jquery/RadioButton.js b/frameworks/js/FlexJS/src/org/apache/flex/jquery/RadioButton.js index 7728f94..986533a 100644 --- a/frameworks/js/FlexJS/src/org/apache/flex/jquery/RadioButton.js +++ b/frameworks/js/FlexJS/src/org/apache/flex/jquery/RadioButton.js @@ -15,6 +15,7 @@ goog.provide('org_apache_flex_jquery_RadioButton'); goog.require('org_apache_flex_core_UIBase'); +goog.require('org_apache_flex_utils_Language'); @@ -103,7 +104,7 @@ Object.defineProperties(org_apache_flex_jquery_RadioButton.prototype, { 'id': { /** @this {org_apache_flex_jquery_RadioButton} */ set: function(value) { - org_apache_flex_jquery_RadioButton.base(this, 'set_id', value); + org_apache_flex_utils_Language(org_apache_flex_jquery_RadioButton.base, this, 'id', value); this.labelFor.id = value; this.labelFor.htmlFor = value; } http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/7bb9e9a5/frameworks/js/FlexJS/src/org/apache/flex/jquery/TextButton.js ---------------------------------------------------------------------- diff --git a/frameworks/js/FlexJS/src/org/apache/flex/jquery/TextButton.js b/frameworks/js/FlexJS/src/org/apache/flex/jquery/TextButton.js index 88c1d3b..624c8eb 100644 --- a/frameworks/js/FlexJS/src/org/apache/flex/jquery/TextButton.js +++ b/frameworks/js/FlexJS/src/org/apache/flex/jquery/TextButton.js @@ -53,21 +53,15 @@ org_apache_flex_jquery_TextButton.prototype.addedToParent = }; -/** - * @expose - * @return {string} The text getter. - */ -org_apache_flex_jquery_TextButton.prototype.get_text = - function() { - return this.element.innerHTML; -}; - - -/** - * @expose - * @param {string} value The text setter. - */ -org_apache_flex_jquery_TextButton.prototype.set_text = - function(value) { - this.element.innerHTML = value; -}; +Object.defineProperties(org_apache_flex_jquery_TextButton.prototype, { + 'text': { + /** @this {org_apache_flex_jquery_TextButton} */ + get: function() { + return this.element.innerHTML; + }, + /** @this {org_apache_flex_jquery_TextButton} */ + set: function(value) { + this.element.innerHTML = value; + } + } +}); http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/7bb9e9a5/frameworks/js/FlexJS/src/org/apache/flex/jquery/ToggleTextButton.js ---------------------------------------------------------------------- diff --git a/frameworks/js/FlexJS/src/org/apache/flex/jquery/ToggleTextButton.js b/frameworks/js/FlexJS/src/org/apache/flex/jquery/ToggleTextButton.js index f21c620..de08c2e 100644 --- a/frameworks/js/FlexJS/src/org/apache/flex/jquery/ToggleTextButton.js +++ b/frameworks/js/FlexJS/src/org/apache/flex/jquery/ToggleTextButton.js @@ -15,6 +15,7 @@ goog.provide('org_apache_flex_jquery_ToggleTextButton'); goog.require('org_apache_flex_html_Button'); +goog.require('org_apache_flex_utils_Language'); @@ -96,7 +97,7 @@ Object.defineProperties(org_apache_flex_jquery_ToggleTextButton.prototype, { 'id': { /** @this {org_apache_flex_jquery_ToggleTextButton} */ set: function(value) { - org_apache_flex_jquery_ToggleTextButton.base(this, 'set_id', value); + org_apache_flex_utils_Language.superSetter(org_apache_flex_jquery_ToggleTextButton.base, this, 'id', value); this.labelFor.id = value; this.labelFor.htmlFor = value; } http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/7bb9e9a5/frameworks/js/FlexJS/src/org/apache/flex/maps/google/beads/MapView.js ---------------------------------------------------------------------- diff --git a/frameworks/js/FlexJS/src/org/apache/flex/maps/google/beads/MapView.js b/frameworks/js/FlexJS/src/org/apache/flex/maps/google/beads/MapView.js index 5088712..73915c6 100644 --- a/frameworks/js/FlexJS/src/org/apache/flex/maps/google/beads/MapView.js +++ b/frameworks/js/FlexJS/src/org/apache/flex/maps/google/beads/MapView.js @@ -37,29 +37,28 @@ FLEXJS_CLASS_INFO = interfaces: [org_apache_flex_core_IBeadView] }; -/** - * @expose - * @param {Object} value The new host. - */ -org_apache_flex_maps_google_beads_MapView.prototype.set_strand = -function(value) { +Object.defineProperties(org_apache_flex_maps_google_beads_MapView.prototype, { + 'strand': { + /** @this {org_apache_flex_maps_google_beads_MapView} */ + set: function(value) { + this.strand_ = value; - this.strand_ = value; + var token = this.strand_.token; + var src = 'https://maps.googleapis.com/maps/api/js?v=3.exp'; + if (token) + src += '&key=' + token; + src += '&libraries=places&sensor=false&callback=mapInit'; - var token = this.strand_.token; - var src = 'https://maps.googleapis.com/maps/api/js?v=3.exp'; - if (token) - src += '&key=' + token; - src += '&libraries=places&sensor=false&callback=mapInit'; + var script = document.createElement('script'); + script.type = 'text/javascript'; + script.src = src; - var script = document.createElement('script'); - script.type = 'text/javascript'; - script.src = src; - - window.mapView = this; - window['mapInit'] = function() { - this.mapView.strand_.finishInitalization(); - }; - document.head.appendChild(script); -}; + window.mapView = this; + window['mapInit'] = function() { + this.mapView.strand_.finishInitalization(); + }; + document.head.appendChild(script); + } + } +}); http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/7bb9e9a5/frameworks/js/FlexJS/src/org/apache/flex/maps/google/models/MapModel.js ---------------------------------------------------------------------- diff --git a/frameworks/js/FlexJS/src/org/apache/flex/maps/google/models/MapModel.js b/frameworks/js/FlexJS/src/org/apache/flex/maps/google/models/MapModel.js index 3956ab5..ffcf3aa 100644 --- a/frameworks/js/FlexJS/src/org/apache/flex/maps/google/models/MapModel.js +++ b/frameworks/js/FlexJS/src/org/apache/flex/maps/google/models/MapModel.js @@ -49,95 +49,47 @@ FLEXJS_CLASS_INFO = interfaces: [org_apache_flex_core_IBeadModel] }; -/** - * @expose - * @param {Object} value The strand. - */ -org_apache_flex_maps_google_models_MapModel.prototype. - set_strand = function(value) { - this.strand_ = value; -}; - - -/** - * @expose - * @return {Array} The search results list. - */ -org_apache_flex_maps_google_models_MapModel.prototype.get_searchResults = -function() { - return this._searchResults; -}; - - -/** - * @expose - * @param {Array} value A list of search results. - */ -org_apache_flex_maps_google_models_MapModel.prototype.set_searchResults = -function(value) { - this._searchResults = value; - this.dispatchEvent('searchResultsChanged'); -}; - - -/** - * @expose - * @return {Number} Map zoom level. - */ -org_apache_flex_maps_google_models_MapModel.prototype.get_zoom = -function() { - return this._zoom; -}; - - -/** - * @expose - * @param {Number} value Map zoom level. - */ -org_apache_flex_maps_google_models_MapModel.prototype.set_zoom = -function(value) { - this._zoom = value; - this.dispatchEvent('zoomChanged'); -}; - - -/** - * @expose - * @return {Object} The currently selected map Marker. - */ -org_apache_flex_maps_google_models_MapModel.prototype.get_selectedMarker = -function() { - return this._selectedMarker; -}; - - -/** - * @expose - * @param {Object} value A marker to be made the selected marker. - */ -org_apache_flex_maps_google_models_MapModel.prototype.set_selectedMarker = -function(value) { - this._selectedMarker = value; - this.dispatchEvent('selectedMarkerChanged'); -}; - - -/** - * @expose - * @return {Object} The map's current center. - */ -org_apache_flex_maps_google_models_MapModel.prototype.get_currentLocation = -function() { - return this._currentLocation; -}; - - -/** - * @expose - * @param {Object} value The map's new current center. - */ -org_apache_flex_maps_google_models_MapModel.prototype.set_currentLocation = -function(value) { - this._currentLocation = value; - this.dispatchEvent('currentLocationChanged'); -}; +Object.defineProperties(org_apache_flex_maps_google_models_MapModelv.prototype, { + 'strand': { + /** @this {org_apache_flex_maps_google_models_MapModel} */ + set: function(value) { + this.strand_ = value; + } + }, + 'searchResults': { + get: function() { + return this._searchResults; + }, + set: function(value) { + this._searchResults = value; + this.dispatchEvent('searchResultsChanged'); + } + }, + 'zoom': { + get: function() { + return this._zoom; + }, + set: function(value) { + this._zoom = value; + this.dispatchEvent('zoomChanged'); + } + }, + 'selectedMarker': { + get: function() { + return this._selectedMarker; + }, + set: function(value) { + this._selectedMarker = value; + this.dispatchEvent('selectedMarkerChanged'); + } + }, + 'currentLocation': { + get: function() { + return this._currentLocation; + }, + set: function(value) { + this._currentLocation = value; + this.dispatchEvent('currentLocationChanged'); + } + } +}); http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/7bb9e9a5/frameworks/js/FlexJS/src/org/apache/flex/net/dataConverters/LazyCollection.js ---------------------------------------------------------------------- diff --git a/frameworks/js/FlexJS/src/org/apache/flex/net/dataConverters/LazyCollection.js b/frameworks/js/FlexJS/src/org/apache/flex/net/dataConverters/LazyCollection.js index 06799a1..715edaf 100644 --- a/frameworks/js/FlexJS/src/org/apache/flex/net/dataConverters/LazyCollection.js +++ b/frameworks/js/FlexJS/src/org/apache/flex/net/dataConverters/LazyCollection.js @@ -70,88 +70,64 @@ org_apache_flex_net_dataConverters_LazyCollection.prototype.FLEXJS_CLASS_INFO = interfaces: [org_apache_flex_events_IEventDispatcher]}; -/** - * @expose - * @return {Object} value The input parser. - */ -org_apache_flex_net_dataConverters_LazyCollection.prototype.get_inputParser = - function() { - return this.inputParser_; -}; - - -/** - * @expose - * @param {Object} value The input parser. - */ -org_apache_flex_net_dataConverters_LazyCollection.prototype.set_inputParser = - function(value) { - this.inputParser_ = value; -}; - - -/** - * @expose - * @return {Object} value The input parser. - */ -org_apache_flex_net_dataConverters_LazyCollection.prototype.get_itemConverter = - function() { - return this.itemConverter_; -}; - - -/** - * @expose - * @param {Object} value The input parser. - */ -org_apache_flex_net_dataConverters_LazyCollection.prototype.set_itemConverter = - function(value) { - this.itemConverter_ = value; -}; +Object.defineProperties(org_apache_flex_net_dataConverters_LazyCollection.prototype, { + 'strand': { + /** @this {org_apache_flex_net_dataConverters_LazyCollection} */ + set: function(value) { + if (this.strand_ !== value) { + this.strand_ = value; + this.strand_.addEventListener('complete', + goog.bind(this.completeHandler, this)); + } + } + }, + 'length': { + /** @this {org_apache_flex_net_dataConverters_LazyCollection} */ + get: function() { + return this.rawData_ ? this.rawData_.length : 0; + } + }, + 'inputParser': { + /** @this {org_apache_flex_net_dataConverters_LazyCollection} */ + get: function() { + return this.inputParser_; + }, + /** @this {org_apache_flex_net_dataConverters_LazyCollection} */ + set: function(value) { + this.inputParser_ = value; + } + }, + 'itemConverter': { + /** @this {org_apache_flex_net_dataConverters_LazyCollection} */ + get: function() { + return this.itemConverter_; + }, + /** @this {org_apache_flex_net_dataConverters_LazyCollection} */ + set: function(value) { + this.itemConverter_ = value; + } + }, + 'id': { + /** @this {org_apache_flex_net_dataConverters_LazyCollection} */ + get: function() { + return this.id_; + }, + /** @this {org_apache_flex_net_dataConverters_LazyCollection} */ + set: function(value) { + if (this.id_ !== value) { + this.id_ = value; + // this.dispatchEvent(new Event('idChanged')); + } + } + } +}); /** * @expose * @type {string} */ -org_apache_flex_net_dataConverters_LazyCollection.prototype.id = ''; - - -/** - * @expose - * @return {string} The id. - */ -org_apache_flex_net_dataConverters_LazyCollection.prototype.get_id = - function() { - return this.id; -}; - - -/** - * @expose - * @param {string} value The new id. - */ -org_apache_flex_net_dataConverters_LazyCollection.prototype.set_id = - function(value) { - if (this.id !== value) { - this.id = value; - // this.dispatchEvent(new Event('idChanged')); - } -}; - - -/** - * @expose - * @param {Object} value The new host. - */ -org_apache_flex_net_dataConverters_LazyCollection.prototype.set_strand = - function(value) { - if (this.strand_ !== value) { - this.strand_ = value; - this.strand_.addEventListener('complete', - goog.bind(this.completeHandler, this)); - } -}; +org_apache_flex_net_dataConverters_LazyCollection.prototype.id_ = ''; /** @@ -180,13 +156,3 @@ org_apache_flex_net_dataConverters_LazyCollection.prototype.getItemAt = return this.data_[index]; }; - - -/** - * @expose - * @return {string} The number of items in the collection. - */ -org_apache_flex_net_dataConverters_LazyCollection.prototype.get_length = - function() { - return this.rawData_ ? this.rawData_.length : 0; -}; http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/7bb9e9a5/frameworks/js/FlexJS/src/org/apache/flex/svg/TextButton.js ---------------------------------------------------------------------- diff --git a/frameworks/js/FlexJS/src/org/apache/flex/svg/TextButton.js b/frameworks/js/FlexJS/src/org/apache/flex/svg/TextButton.js index 1300f5f..807cdf5 100644 --- a/frameworks/js/FlexJS/src/org/apache/flex/svg/TextButton.js +++ b/frameworks/js/FlexJS/src/org/apache/flex/svg/TextButton.js @@ -74,21 +74,15 @@ org_apache_flex_svg_TextButton.prototype.finalizeElement = }; -/** - * @expose - * @return {string} The text getter. - */ -org_apache_flex_svg_TextButton.prototype.get_text = - function() { - return this.element.getAttribute('label'); -}; - - -/** - * @expose - * @param {string} value The text setter. - */ -org_apache_flex_svg_TextButton.prototype.set_text = - function(value) { - this.element.setAttribute('label', value); -}; +Object.defineProperties(org_apache_flex_svg_TextButton.prototype, { + 'text': { + /** @this {org_apache_flex_svg_TextButton} */ + get: function() { + return this.element.getAttribute('label'); + }, + /** @this {org_apache_flex_svg_TextButton} */ + set: function(value) { + this.element.setAttribute('label', value); + } + } +}); http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/7bb9e9a5/frameworks/js/FlexJS/src/org/apache/flex/utils/MixinManager.js ---------------------------------------------------------------------- diff --git a/frameworks/js/FlexJS/src/org/apache/flex/utils/MixinManager.js b/frameworks/js/FlexJS/src/org/apache/flex/utils/MixinManager.js index 875fbe6..d33d64f 100644 --- a/frameworks/js/FlexJS/src/org/apache/flex/utils/MixinManager.js +++ b/frameworks/js/FlexJS/src/org/apache/flex/utils/MixinManager.js @@ -37,27 +37,23 @@ org_apache_flex_utils_MixinManager.prototype.FLEXJS_CLASS_INFO = interfaces: [org_apache_flex_core_IBead]}; -/** - * @expose - * @param {Object} value The new host. - */ -org_apache_flex_utils_MixinManager.prototype.set_strand = -function(value) { - this.strand_ = value; - - if (value) - { - if (typeof(value.info) == 'function') - { - var mixins = value.info()['mixins']; - if (mixins) - { - var n = mixins.length; - for (var i = 0; i < n; i++) - { - mixins[i].init(value); - } - } - } - } -}; +Object.defineProperties(org_apache_flex_utils_MixinManager.prototype, { + 'strand': { + /** @this {org_apache_flex_utils_MixinManager} */ + set: function(value) { + this.strand_ = value; + + if (value) { + if (typeof(value.info) == 'function') { + var mixins = value.info()['mixins']; + if (mixins) { + var n = mixins.length; + for (var i = 0; i < n; i++) { + mixins[i].init(value); + } + } + } + } + } + } +}); http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/7bb9e9a5/frameworks/js/FlexJS/src/org/apache/flex/utils/PointUtils.js ---------------------------------------------------------------------- diff --git a/frameworks/js/FlexJS/src/org/apache/flex/utils/PointUtils.js b/frameworks/js/FlexJS/src/org/apache/flex/utils/PointUtils.js index 0cb0216..f42aae7 100644 --- a/frameworks/js/FlexJS/src/org/apache/flex/utils/PointUtils.js +++ b/frameworks/js/FlexJS/src/org/apache/flex/utils/PointUtils.js @@ -49,7 +49,7 @@ org_apache_flex_utils_PointUtils.globalToLocal = do { x -= element.offsetLeft; y -= element.offsetTop; - if (local.get_parent) { + if (local.hasOwnProperty('parent')) { local = local.parent; element = local.element; } else { @@ -75,7 +75,7 @@ org_apache_flex_utils_PointUtils.localToGlobal = do { x += element.offsetLeft; y += element.offsetTop; - if (local.get_parent) { + if (local.hasOwnProperty('parent')) { local = local.parent; element = local.element; } else { http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/7bb9e9a5/frameworks/js/FlexJS/src/org/apache/flex/utils/ViewSourceContextMenuOption.js ---------------------------------------------------------------------- diff --git a/frameworks/js/FlexJS/src/org/apache/flex/utils/ViewSourceContextMenuOption.js b/frameworks/js/FlexJS/src/org/apache/flex/utils/ViewSourceContextMenuOption.js index e7cc836..efe2e3b 100644 --- a/frameworks/js/FlexJS/src/org/apache/flex/utils/ViewSourceContextMenuOption.js +++ b/frameworks/js/FlexJS/src/org/apache/flex/utils/ViewSourceContextMenuOption.js @@ -35,10 +35,10 @@ org_apache_flex_utils_ViewSourceContextMenuOption.prototype.FLEXJS_CLASS_INFO = qName: 'org_apache_flex_utils_ViewSourceContextMenuOption'}] }; -/** - * @param {Object} value The strand (owner) of the bead. - */ -org_apache_flex_utils_ViewSourceContextMenuOption.prototype.set_strand = - function(value) { -}; +Object.defineProperties(org_apache_flex_utils_ViewSourceContextMenuOption.prototype, { + 'strand': { + /** @this {org_apache_flex_utils_ViewSourceContextMenuOption} */ + set: function(value) {} + } +});