merge defineprop to develop. The merge broke some stuff so use later commits
Project: http://git-wip-us.apache.org/repos/asf/flex-asjs/repo Commit: http://git-wip-us.apache.org/repos/asf/flex-asjs/commit/1a5ba33d Tree: http://git-wip-us.apache.org/repos/asf/flex-asjs/tree/1a5ba33d Diff: http://git-wip-us.apache.org/repos/asf/flex-asjs/diff/1a5ba33d Branch: refs/heads/develop Commit: 1a5ba33d9ee4c544c1898047faaba504411fdc2b Parents: 7f179c9 26e2667 Author: Alex Harui <[email protected]> Authored: Wed Apr 8 10:14:01 2015 -0700 Committer: Alex Harui <[email protected]> Committed: Wed Apr 8 10:14:01 2015 -0700 ---------------------------------------------------------------------- .../FlexJSStore/src/ProductJSONItemConverter.as | 2 +- .../apache/flex/core/ApplicationDataBinding.as | 8 +- .../org/apache/flex/core/BindableCSSStyles.as | 26 - .../apache/flex/core/ContainerDataBinding.as | 14 +- .../flex/core/MXMLBeadViewBaseDataBinding.as | 8 +- .../src/org/apache/flex/core/SimpleCSSStyles.as | 26 - .../flex/core/StatesWithTransitionsImpl.as | 20 +- .../src/org/apache/flex/effects/Fade.as | 2 +- .../src/org/apache/flex/effects/Move.as | 6 +- .../src/org/apache/flex/effects/Resize.as | 2 +- .../src/org/apache/flex/effects/Wipe.as | 2 +- .../src/org/apache/flex/core/DataBindingBase.as | 41 -- .../org/apache/flex/events/EventDispatcher.as | 30 - .../js/FlexJS/src/org/apache/cordova/Weinre.js | 50 +- .../src/org/apache/flex/binding/BindingBase.js | 50 +- .../src/org/apache/flex/binding/ChainBinding.js | 45 +- .../org/apache/flex/binding/ConstantBinding.js | 36 +- .../org/apache/flex/binding/GenericBinding.js | 54 +- .../org/apache/flex/binding/SimpleBinding.js | 49 +- .../org/apache/flex/charts/core/ChartBase.js | 31 +- .../org/apache/flex/charts/core/IAxisBead.js | 52 +- .../src/org/apache/flex/charts/core/IChart.js | 17 +- .../flex/charts/core/IChartItemRenderer.js | 91 +-- .../org/apache/flex/charts/core/IChartSeries.js | 68 +- .../flex/charts/core/IHorizontalAxisBead.js | 37 +- .../flex/charts/core/IVerticalAxisBead.js | 38 +- .../charts/supportClasses/ChartAxisGroup.js | 34 +- .../charts/supportClasses/ChartDataGroup.js | 6 +- .../src/org/apache/flex/core/Application.js | 32 +- .../src/org/apache/flex/core/BeadViewBase.js | 36 +- .../src/org/apache/flex/core/CallLaterBead.js | 21 +- .../src/org/apache/flex/core/ContainerBase.js | 136 ++-- .../src/org/apache/flex/core/DataBindingBase.js | 49 -- .../src/org/apache/flex/core/FilledRectangle.js | 38 +- .../src/org/apache/flex/core/FormatBase.js | 121 ++-- .../org/apache/flex/core/HTMLElementWrapper.js | 136 +--- .../js/FlexJS/src/org/apache/flex/core/IBead.js | 15 +- .../FlexJS/src/org/apache/flex/core/IChild.js | 10 +- .../src/org/apache/flex/core/IContentView.js | 68 +- .../src/org/apache/flex/core/IFormatBead.js | 44 +- .../src/org/apache/flex/core/ILayoutParent.js | 52 +- .../apache/flex/core/IListPresentationModel.js | 19 +- .../apache/flex/core/ISelectableItemRenderer.js | 95 +-- .../src/org/apache/flex/core/ISelectionModel.js | 57 +- .../src/org/apache/flex/core/ITextModel.js | 19 +- .../flex/core/ItemRendererClassFactory.js | 51 +- .../FlexJS/src/org/apache/flex/core/ListBase.js | 99 +-- .../org/apache/flex/core/SimpleCSSValuesImpl.js | 27 +- .../org/apache/flex/core/SimpleStatesImpl.js | 98 +-- .../FlexJS/src/org/apache/flex/core/UIBase.js | 719 ++++++++----------- .../src/org/apache/flex/core/ValuesManager.js | 31 +- .../FlexJS/src/org/apache/flex/core/ViewBase.js | 169 ++--- .../org/apache/flex/core/ViewBaseDataBinding.js | 61 +- .../src/org/apache/flex/core/graphics/Circle.js | 38 +- .../org/apache/flex/core/graphics/Ellipse.js | 10 +- .../apache/flex/core/graphics/GradientBase.js | 137 ++-- .../apache/flex/core/graphics/GradientEntry.js | 103 ++- .../apache/flex/core/graphics/GraphicShape.js | 74 +- .../flex/core/graphics/GraphicsContainer.js | 104 +-- .../src/org/apache/flex/core/graphics/Line.js | 2 +- .../apache/flex/core/graphics/LinearGradient.js | 45 +- .../src/org/apache/flex/core/graphics/Path.js | 35 +- .../src/org/apache/flex/core/graphics/Rect.js | 10 +- .../org/apache/flex/core/graphics/SolidColor.js | 60 +- .../flex/core/graphics/SolidColorStroke.js | 88 +-- .../src/org/apache/flex/createjs/Application.js | 2 +- .../src/org/apache/flex/createjs/CheckBox.js | 66 +- .../src/org/apache/flex/createjs/Label.js | 32 +- .../src/org/apache/flex/createjs/TextButton.js | 31 +- .../src/org/apache/flex/createjs/core/UIBase.js | 147 ++-- .../org/apache/flex/createjs/core/ViewBase.js | 34 +- .../org/apache/flex/effects/PlatformWiper.js | 72 +- .../src/org/apache/flex/events/BrowserEvent.js | 152 ++++ .../src/org/apache/flex/events/DragEvent.js | 19 +- .../src/org/apache/flex/events/ElementEvents.js | 47 ++ .../FlexJS/src/org/apache/flex/events/Event.js | 27 - .../org/apache/flex/events/EventDispatcher.js | 47 +- .../src/org/apache/flex/events/MouseEvent.js | 18 +- .../js/FlexJS/src/org/apache/flex/html/Alert.js | 156 ++-- .../src/org/apache/flex/html/ButtonBar.js | 6 +- .../FlexJS/src/org/apache/flex/html/CheckBox.js | 61 +- .../src/org/apache/flex/html/CloseButton.js | 4 +- .../FlexJS/src/org/apache/flex/html/ComboBox.js | 47 +- .../src/org/apache/flex/html/DropDownList.js | 89 ++- .../js/FlexJS/src/org/apache/flex/html/Image.js | 33 +- .../org/apache/flex/html/ImageAndTextButton.js | 64 +- .../js/FlexJS/src/org/apache/flex/html/Label.js | 58 +- .../js/FlexJS/src/org/apache/flex/html/List.js | 130 ++-- .../src/org/apache/flex/html/MultilineLabel.js | 58 +- .../src/org/apache/flex/html/NumericStepper.js | 169 ++--- .../js/FlexJS/src/org/apache/flex/html/Panel.js | 101 ++- .../src/org/apache/flex/html/RadioButton.js | 214 +++--- .../src/org/apache/flex/html/SimpleList.js | 120 ++-- .../FlexJS/src/org/apache/flex/html/Slider.js | 174 ++--- .../FlexJS/src/org/apache/flex/html/Spinner.js | 188 ++--- .../FlexJS/src/org/apache/flex/html/TextArea.js | 30 +- .../src/org/apache/flex/html/TextButton.js | 30 +- .../src/org/apache/flex/html/TextInput.js | 32 +- .../FlexJS/src/org/apache/flex/html/TitleBar.js | 64 +- .../org/apache/flex/html/ToggleTextButton.js | 84 +-- .../accessories/NumericOnlyTextInputBead.js | 23 +- .../flex/html/accessories/PasswordInputBead.js | 23 +- .../flex/html/accessories/TextPromptBead.js | 54 +- .../org/apache/flex/html/beads/ButtonBarView.js | 22 +- .../org/apache/flex/html/beads/ContainerView.js | 36 +- .../DataItemRendererFactoryForArrayData.js | 112 ++- .../apache/flex/html/beads/ImageButtonView.js | 18 +- .../src/org/apache/flex/html/beads/ImageView.js | 30 +- .../src/org/apache/flex/html/beads/ListView.js | 198 +++-- .../src/org/apache/flex/html/beads/PanelView.js | 96 ++- .../flex/html/beads/ScrollingContainerView.js | 87 +-- .../apache/flex/html/beads/SliderThumbView.js | 51 +- .../apache/flex/html/beads/SliderTrackView.js | 51 +- .../flex/html/beads/TextInputWithBorderView.js | 17 +- .../TextItemRendererFactoryForArrayData.js | 39 +- .../controllers/ItemRendererMouseController.js | 42 +- .../ListSingleSelectionMouseController.js | 35 +- .../beads/controllers/SliderMouseController.js | 54 +- .../beads/controllers/SpinnerMouseController.js | 46 +- .../flex/html/beads/layouts/ButtonBarLayout.js | 95 ++- .../html/beads/layouts/NonVirtualBasicLayout.js | 59 +- .../layouts/NonVirtualBasicScrollingLayout.js | 37 +- .../beads/layouts/NonVirtualHorizontalLayout.js | 51 +- .../beads/layouts/NonVirtualVerticalLayout.js | 47 +- .../NonVirtualVerticalScrollingLayout.js | 20 +- .../flex/html/beads/layouts/TileLayout.js | 150 ++-- .../html/beads/models/ArraySelectionModel.js | 189 ++--- .../flex/html/beads/models/DataGridModel.js | 51 +- .../apache/flex/html/beads/models/ImageModel.js | 54 +- .../html/beads/models/ListPresentationModel.js | 50 +- .../apache/flex/html/beads/models/PanelModel.js | 130 ++-- .../apache/flex/html/beads/models/RangeModel.js | 224 +++--- .../apache/flex/html/beads/models/TextModel.js | 50 +- .../flex/html/beads/models/TitleBarModel.js | 130 ++-- .../ButtonBarButtonItemRenderer.js | 76 +- .../flex/html/supportClasses/DataGridColumn.js | 124 ++-- .../html/supportClasses/DataItemRenderer.js | 149 ++-- .../html/supportClasses/NonVirtualDataGroup.js | 44 +- .../html/supportClasses/StringItemRenderer.js | 176 ++--- .../html/supportClasses/UIItemRendererBase.js | 201 ++---- .../src/org/apache/flex/html5/CheckBox.js | 61 +- .../src/org/apache/flex/html5/ComboBox.js | 54 +- .../FlexJS/src/org/apache/flex/html5/Label.js | 30 +- .../src/org/apache/flex/html5/RadioButton.js | 93 +-- .../src/org/apache/flex/html5/TextArea.js | 30 +- .../src/org/apache/flex/html5/TextButton.js | 31 +- .../src/org/apache/flex/html5/TextInput.js | 30 +- .../src/org/apache/flex/jquery/CheckBox.js | 61 +- .../src/org/apache/flex/jquery/RadioButton.js | 218 +++--- .../src/org/apache/flex/jquery/TextButton.js | 31 +- .../org/apache/flex/jquery/ToggleTextButton.js | 105 ++- .../src/org/apache/flex/maps/google/Map.js | 37 +- .../apache/flex/maps/google/beads/MapView.js | 44 +- .../apache/flex/maps/google/models/MapModel.js | 141 ++-- .../src/org/apache/flex/net/BinaryUploader.js | 347 ++++----- .../src/org/apache/flex/net/HTTPService.js | 385 ++++------ .../org/apache/flex/net/JSONItemConverter.js | 32 - .../flex/net/dataConverters/LazyCollection.js | 147 ++-- .../src/org/apache/flex/svg/TextButton.js | 31 +- .../src/org/apache/flex/utils/BinaryData.js | 77 +- .../src/org/apache/flex/utils/Language.js | 58 +- .../apache/flex/utils/MXMLDataInterpreter.js | 69 +- .../src/org/apache/flex/utils/MixinManager.js | 41 +- .../src/org/apache/flex/utils/PointUtils.js | 8 +- .../FlexJS/src/org/apache/flex/utils/Timer.js | 91 +-- .../FlexJS/src/org/apache/flex/utils/UIUtils.js | 16 +- .../flex/utils/ViewSourceContextMenuOption.js | 15 +- 167 files changed, 4929 insertions(+), 6855 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/1a5ba33d/frameworks/js/FlexJS/src/org/apache/flex/core/ContainerBase.js ---------------------------------------------------------------------- diff --cc frameworks/js/FlexJS/src/org/apache/flex/core/ContainerBase.js index 778d61b,314d1c5..87758f3 --- a/frameworks/js/FlexJS/src/org/apache/flex/core/ContainerBase.js +++ b/frameworks/js/FlexJS/src/org/apache/flex/core/ContainerBase.js @@@ -120,17 -119,8 +119,8 @@@ org_apache_flex_core_ContainerBase.prot /** * @expose - * @return {Array} An array of descriptors. - */ - org_apache_flex_core_ContainerBase.prototype.get_MXMLDescriptor = function() { - return this.mxmlDescriptor; - }; - - - /** - * @expose * @param {Object} doc The document. - * @param {Array} desc The descriptor data; + * @param {Array} desc The descriptor data. */ org_apache_flex_core_ContainerBase.prototype.setMXMLDescriptor = function(doc, desc) { http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/1a5ba33d/frameworks/js/FlexJS/src/org/apache/flex/core/HTMLElementWrapper.js ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/1a5ba33d/frameworks/js/FlexJS/src/org/apache/flex/core/UIBase.js ---------------------------------------------------------------------- diff --cc frameworks/js/FlexJS/src/org/apache/flex/core/UIBase.js index 24c9cb6,3be140a..61a0015 --- a/frameworks/js/FlexJS/src/org/apache/flex/core/UIBase.js +++ b/frameworks/js/FlexJS/src/org/apache/flex/core/UIBase.js @@@ -363,216 -353,288 +353,289 @@@ org_apache_flex_core_UIBase.prototype.r }; - /** - * @expose - * @param {number} alpha The alpha or opacity. - */ - org_apache_flex_core_UIBase.prototype.set_alpha = function(alpha) { - this.positioner.style.opacity = alpha; - }; - - - /** - * @expose - * @return {number} The alpha or opacity. - */ - org_apache_flex_core_UIBase.prototype.get_alpha = function() { - var stralpha = this.positioner.style.opacity; - var alpha = parseFloat(stralpha); - return alpha; - }; - - - /** - * @expose - * @param {number} pixels The pixel count from the left edge. - */ - org_apache_flex_core_UIBase.prototype.set_x = function(pixels) { - this.positioner.style.position = 'absolute'; - this.positioner.style.left = pixels.toString() + 'px'; - }; - - - /** - * @expose - * @return {number} The pixel count from the left edge. - */ - org_apache_flex_core_UIBase.prototype.get_x = function() { - var strpixels = this.positioner.style.left; - var pixels = parseFloat(strpixels); - if (isNaN(pixels)) - pixels = this.positioner.offsetLeft; - return pixels; - }; - - - /** - * @expose - * @param {number} pixels The pixel count from the top edge. - */ - org_apache_flex_core_UIBase.prototype.set_y = function(pixels) { - this.positioner.style.position = 'absolute'; - this.positioner.style.top = pixels.toString() + 'px'; - }; - - - /** - * @expose - * @return {number} The pixel count from the top edge. - */ - org_apache_flex_core_UIBase.prototype.get_y = function() { - var strpixels = this.positioner.style.top; - var pixels = parseFloat(strpixels); - if (isNaN(pixels)) - pixels = this.positioner.offsetTop; - return pixels; - }; - - - /** - * @expose - * @param {number} pixels The pixel count from the left edge. - */ - org_apache_flex_core_UIBase.prototype.set_width = function(pixels) { - this.set_explicitWidth(pixels); - this.setWidth(pixels); - }; - - - /** - * @expose - * @return {number} The width of the object in pixels. - */ - org_apache_flex_core_UIBase.prototype.get_width = function() { - var pixels; - var strpixels = this.positioner.style.width; - if (strpixels !== null && strpixels.indexOf('%') != -1) - pixels = NaN; - else - pixels = parseFloat(strpixels); - if (isNaN(pixels)) { - pixels = this.positioner.offsetWidth; - if (pixels === 0 && this.positioner.scrollWidth !== 0) { - // invisible child elements cause offsetWidth to be 0. - pixels = this.positioner.scrollWidth; + Object.defineProperties(org_apache_flex_core_UIBase.prototype, { + /** @expose */ + beads: { + /** @this {org_apache_flex_core_UIBase} */ + set: function(value) { + this.mxmlBeads_ = value; + } + }, + /** @expose */ + numElements: { + /** @this {org_apache_flex_core_UIBase} */ + get: function() { + var children = this.internalChildren(); + return children.length; + } + }, + /** @expose */ + parent: { + /** @this {org_apache_flex_core_UIBase} */ + get: function() { + var p = this.positioner.parentNode; + var wrapper = p.flexjs_wrapper; + return wrapper; + } + }, + /** @expose */ + alpha: { + /** @this {org_apache_flex_core_UIBase} */ + set: function(alpha) { + this.positioner.style.opacity = alpha; + }, + /** @this {org_apache_flex_core_UIBase} */ + get: function() { + var stralpha = this.positioner.style.opacity; + var alpha = parseFloat(stralpha); + return alpha; + } + }, + /** @expose */ + x: { + /** @this {org_apache_flex_core_UIBase} */ + set: function(pixels) { + this.positioner.style.position = 'absolute'; + this.positioner.style.left = pixels.toString() + 'px'; + }, + /** @this {org_apache_flex_core_UIBase} */ + get: function() { + var strpixels = this.positioner.style.left; + var pixels = parseFloat(strpixels); + if (isNaN(pixels)) + pixels = this.positioner.offsetLeft; + return pixels; + } + }, + /** @expose */ + y: { + /** @this {org_apache_flex_core_UIBase} */ + set: function(pixels) { + this.positioner.style.position = 'absolute'; + this.positioner.style.top = pixels.toString() + 'px'; + }, + /** @this {org_apache_flex_core_UIBase} */ + get: function() { + var strpixels = this.positioner.style.top; + var pixels = parseFloat(strpixels); + if (isNaN(pixels)) + pixels = this.positioner.offsetTop; + return pixels; + } + }, + /** @expose */ + width: { + /** @this {org_apache_flex_core_UIBase} */ + set: function(pixels) { + this.explicitWidth = pixels; + this.setWidth(pixels); + }, + /** @this {org_apache_flex_core_UIBase} */ + get: function() { + var pixels; + var strpixels = this.positioner.style.width; + if (strpixels !== null && strpixels.indexOf('%') != -1) + pixels = NaN; + else + pixels = parseFloat(strpixels); + if (isNaN(pixels)) { + pixels = this.positioner.offsetWidth; + if (pixels === 0 && this.positioner.scrollWidth !== 0) { + // invisible child elements cause offsetWidth to be 0. + pixels = this.positioner.scrollWidth; + } + } + return pixels; + } + }, + /** @expose */ + explicitWidth: { + /** @this {org_apache_flex_core_UIBase} */ + set: function(pixels) { + this.explicitWidth_ = pixels; + if (!isNaN(pixels)) + this.percentWidth_ = NaN; + }, + /** @this {org_apache_flex_core_UIBase} */ + get: function() { + return this.explicitWidth_; + } + }, + /** @expose */ + percentWidth: { + /** @this {org_apache_flex_core_UIBase} */ + set: function(pixels) { + this.percentWidth_ = pixels; + this.positioner.style.width = pixels.toString() + '%'; + if (!isNaN(pixels)) + this.explicitWidth_ = NaN; + }, + /** @this {org_apache_flex_core_UIBase} */ + get: function() { + return this.percentWidth_; + } + }, + /** @expose */ + height: { + /** @this {org_apache_flex_core_UIBase} */ + set: function(pixels) { + this.explicitHeight = pixels; + this.setHeight(pixels); + }, + /** @this {org_apache_flex_core_UIBase} */ + get: function() { + var pixels; + var strpixels = this.positioner.style.height; + if (strpixels !== null && strpixels.indexOf('%') != -1) + pixels = NaN; + else + pixels = parseFloat(strpixels); + if (isNaN(pixels)) { + pixels = this.positioner.offsetHeight; + if (pixels === 0 && this.positioner.scrollHeight !== 0) { + // invisible child elements cause offsetHeight to be 0. + pixels = this.positioner.scrollHeight; + } + } + return pixels; + } + }, + /** @expose */ + explicitHeight: { + /** @this {org_apache_flex_core_UIBase} */ + set: function(pixels) { + this.explicitHeight_ = pixels; + if (!isNaN(pixels)) + this.percentHeight_ = NaN; + }, + /** @this {org_apache_flex_core_UIBase} */ + get: function() { + return this.explicitHeight_; + } + }, + /** @expose */ + percentHeight: { + /** @this {org_apache_flex_core_UIBase} */ + set: function(pixels) { + this.percentHeight_ = pixels; + this.positioner.style.height = pixels.toString() + '%'; + if (!isNaN(pixels)) + this.explicitHeight_ = NaN; + }, + /** @this {org_apache_flex_core_UIBase} */ + get: function() { + return this.percentHeight_; + } + }, + /** @expose */ + id: { + /** @this {org_apache_flex_core_UIBase} */ + get: function() { + return this.id_; + }, + /** @this {org_apache_flex_core_UIBase} */ + set: function(value) { + if (this.id_ !== value) { + this.element.id = value; + this.id_ = value; + this.dispatchEvent('idChanged'); + } + } + }, + /** @expose */ + className: { + /** @this {org_apache_flex_core_UIBase} */ + get: function() { + return this.className_; + }, + /** @this {org_apache_flex_core_UIBase} */ + set: function(value) { + if (this.className_ !== value) { + this.element.className = this.typeNames ? value + ' ' + this.typeNames : value; + this.className_ = value; + this.dispatchEvent('classNameChanged'); + } + } + }, + /** @expose */ + model: { + /** @this {org_apache_flex_core_UIBase} */ + get: function() { + if (this.model_ == null) { + // addbead will set _model + if (org_apache_flex_core_ValuesManager.valuesImpl.getValue) { + /** + * @type {Function} + */ + var m = /** @type {Function} */ (org_apache_flex_core_ValuesManager.valuesImpl. + getValue(this, 'iBeadModel')); + var b = new m(); + this.addBead(b); + } + } + return this.model_; + }, + /** @this {org_apache_flex_core_UIBase} */ + set: function(value) { + if (this.model_ !== value) { + this.addBead(value); + this.dispatchEvent('modelChanged'); + } + } + }, + /** @expose */ + style: { + /** @this {org_apache_flex_core_UIBase} */ + get: function() { + return this.style_; + }, + /** @this {org_apache_flex_core_UIBase} */ + set: function(value) { + if (this.style_ !== value) { + if (typeof(value) == 'string') + value = org_apache_flex_core_ValuesManager.valuesImpl.parseStyles(value); + this.style_ = value; + if (value.addEventListener) + value.addEventListener(org_apache_flex_events_ValueChangeEvent.VALUE_CHANGE, + goog.bind(this.styleChangeHandler, this)); + this.dispatchEvent('stylesChanged'); + } + } + }, + /** @expose */ + visible: { + /** @this {org_apache_flex_core_UIBase} */ + get: function() { + return this.positioner.style.display !== 'none'; + }, + /** @this {org_apache_flex_core_UIBase} */ + set: function(value) { + var oldValue = this.positioner.style.display !== 'none'; + if (value !== oldValue) { + if (!value) { + this.lastDisplay_ = this.positioner.style.display; + this.positioner.style.display = 'none'; + this.dispatchEvent(new org_apache_flex_events_Event('hide')); + } else { + if (this.lastDisplay_) { + this.positioner.style.display = this.lastDisplay_; + } else { - this.positioner.style.display = 'block'; ++ this.positioner.style.display = this.positioner.internalDisplay; + } + this.dispatchEvent(new org_apache_flex_events_Event('show')); + } ++ this.dispatchEvent(new org_apache_flex_events_Event('visibleChanged')); + } + } + }, + /** @expose */ + topMostEventDispatcher: { + /** @this {org_apache_flex_core_UIBase} */ + get: function() { + return document.body.flexjs_wrapper; + } } - } - return pixels; - }; - - - /** - * @expose - * @param {number} pixels The pixel count from the left edge. - */ - org_apache_flex_core_UIBase.prototype.set_explicitWidth = function(pixels) { - this.explicitWidth_ = pixels; - if (!isNaN(pixels)) - this.percentWidth_ = NaN; - }; - - - /** - * @expose - * @return {number} The width of the object in pixels. - */ - org_apache_flex_core_UIBase.prototype.get_explicitWidth = function() { - return this.explicitWidth_; - }; - - - /** - * @expose - * @param {number} pixels The percent width of the object. - */ - org_apache_flex_core_UIBase.prototype.set_percentWidth = function(pixels) { - this.percentWidth_ = pixels; - this.positioner.style.width = pixels.toString() + '%'; - if (!isNaN(pixels)) - this.explicitWidth_ = NaN; - }; - - - /** - * @expose - * @return {number} The percent width of the object. - */ - org_apache_flex_core_UIBase.prototype.get_percentWidth = function() { - return this.percentWidth_; - }; - - - /** - * @expose - * @param {number} pixels The pixel count from the top edge. - */ - org_apache_flex_core_UIBase.prototype.set_height = function(pixels) { - this.set_explicitHeight(pixels); - this.setHeight(pixels); - }; - - - /** - * @expose - * @return {number} The height of the object in pixels. - */ - org_apache_flex_core_UIBase.prototype.get_height = function() { - var pixels; - var strpixels = this.positioner.style.height; - if (strpixels !== null && strpixels.indexOf('%') != -1) - pixels = NaN; - else - pixels = parseFloat(strpixels); - if (isNaN(pixels)) { - pixels = this.positioner.offsetHeight; - if (pixels === 0 && this.positioner.scrollHeight !== 0) { - // invisible child elements cause offsetHeight to be 0. - pixels = this.positioner.scrollHeight; - } - } - return pixels; - }; - - - /** - * @expose - * @param {number} pixels The height of the object in pixels. - */ - org_apache_flex_core_UIBase.prototype.set_explicitHeight = function(pixels) { - this.explicitHeight_ = pixels; - if (!isNaN(pixels)) - this.percentHeight_ = NaN; - }; - - - /** - * @expose - * @return {number} The height of the object in pixels. - */ - org_apache_flex_core_UIBase.prototype.get_explicitHeight = function() { - return this.explicitHeight_; - }; - - - /** - * @expose - * @param {number} pixels The percentage height. - */ - org_apache_flex_core_UIBase.prototype.set_percentHeight = function(pixels) { - this.percentHeight_ = pixels; - this.positioner.style.height = pixels.toString() + '%'; - if (!isNaN(pixels)) - this.explicitHeight_ = NaN; - }; - - - /** - * @expose - * @return {number} The percentage height of the object. - */ - org_apache_flex_core_UIBase.prototype.get_percentHeight = function() { - return this.percentHeight_; - }; + }); /** @@@ -805,45 -741,5 +742,3 @@@ org_apache_flex_core_UIBase.prototype.s newStyle[value.propertyName] = value.newValue; org_apache_flex_core_ValuesManager.valuesImpl.applyStyles(this, newStyle); }; - - - /** - * @expose - * @return {boolean} True if visible. - */ - org_apache_flex_core_UIBase.prototype.get_visible = function() { - return this.positioner.style.display !== 'none'; - }; - - - /** - * @expose - * @param {boolean} value The new model. - */ - org_apache_flex_core_UIBase.prototype.set_visible = function(value) { - var oldValue = this.positioner.style.display !== 'none'; - if (value !== oldValue) { - if (!value) { - this.lastDisplay_ = this.positioner.style.display; - this.positioner.style.display = 'none'; - this.dispatchEvent(new org_apache_flex_events_Event('hide')); - } else { - if (this.lastDisplay_) { - this.positioner.style.display = this.lastDisplay_; - } else { - this.positioner.style.display = this.positioner.internalDisplay; - } - this.dispatchEvent(new org_apache_flex_events_Event('show')); - } - this.dispatchEvent(new org_apache_flex_events_Event('visibleChanged')); - } - }; -- -- - /** - * @expose - * @return {Object} The top most EventDispatcher. - */ - org_apache_flex_core_UIBase.prototype.get_topMostEventDispatcher = function() { - return document.body.flexjs_wrapper; - }; http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/1a5ba33d/frameworks/js/FlexJS/src/org/apache/flex/html/beads/layouts/ButtonBarLayout.js ---------------------------------------------------------------------- diff --cc frameworks/js/FlexJS/src/org/apache/flex/html/beads/layouts/ButtonBarLayout.js index 5c6572c,4b78ae5..0a927d3 --- a/frameworks/js/FlexJS/src/org/apache/flex/html/beads/layouts/ButtonBarLayout.js +++ b/frameworks/js/FlexJS/src/org/apache/flex/html/beads/layouts/ButtonBarLayout.js @@@ -105,10 -96,9 +96,10 @@@ org_apache_flex_html_beads_layouts_Butt for (var i = 0; i < n; i++) { var ir = itemRendererParent.getElementAt(i); - ir.set_y(0); - ir.set_height(useHeight); - ir.set_x(xpos); + ir.y = 0; + ir.height = useHeight; + ir.x = xpos; + ir.element.internalDisplay = 'inline-block'; ir.element.style['vertical-align'] = 'middle'; ir.element.style['text-align'] = 'center'; ir.element.style['left-margin'] = 'auto'; http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/1a5ba33d/frameworks/js/FlexJS/src/org/apache/flex/html/beads/layouts/NonVirtualBasicLayout.js ---------------------------------------------------------------------- diff --cc frameworks/js/FlexJS/src/org/apache/flex/html/beads/layouts/NonVirtualBasicLayout.js index 52791ea,353bb93..3478374 --- 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 @@@ -106,13 -101,12 +101,13 @@@ org_apache_flex_html_beads_layouts_NonV var i, n, h, w; var viewBead = this.strand_.getBeadByType(org_apache_flex_core_ILayoutParent); - var contentView = viewBead.get_contentView(); - w = contentView.get_width(); - h = contentView.get_height(); - n = contentView.get_numElements(); + var contentView = viewBead.contentView; + w = contentView.width; + h = contentView.height; + n = contentView.numElements; for (i = 0; i < n; i++) { var child = contentView.getElementAt(i); + child.positioner.internalDisplay = 'none'; var left = org_apache_flex_core_ValuesManager.valuesImpl.getValue(child, 'left'); var right = org_apache_flex_core_ValuesManager.valuesImpl.getValue(child, 'right'); var top = org_apache_flex_core_ValuesManager.valuesImpl.getValue(child, 'top'); http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/1a5ba33d/frameworks/js/FlexJS/src/org/apache/flex/html/beads/layouts/NonVirtualBasicScrollingLayout.js ---------------------------------------------------------------------- diff --cc frameworks/js/FlexJS/src/org/apache/flex/html/beads/layouts/NonVirtualBasicScrollingLayout.js index 7297f95,5bbbf83..dc6127b --- 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 @@@ -64,14 -65,13 +65,14 @@@ org_apache_flex_html_beads_layouts_NonV var i, n, h, w; var viewBead = this.strand_.getBeadByType(org_apache_flex_core_ILayoutParent); - var contentView = viewBead.get_contentView(); + var contentView = viewBead.contentView; contentView.element.style.overflow = 'auto'; - w = contentView.get_width(); - h = contentView.get_height(); - n = contentView.get_numElements(); + w = contentView.width; + h = contentView.height; + n = contentView.numElements; for (i = 0; i < n; i++) { var child = contentView.getElementAt(i); + child.positioner.internalDisplay = 'none'; var left = org_apache_flex_core_ValuesManager.valuesImpl.getValue(child, 'left'); var right = org_apache_flex_core_ValuesManager.valuesImpl.getValue(child, 'right'); var top = org_apache_flex_core_ValuesManager.valuesImpl.getValue(child, 'top'); http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/1a5ba33d/frameworks/js/FlexJS/src/org/apache/flex/html/beads/layouts/NonVirtualHorizontalLayout.js ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/1a5ba33d/frameworks/js/FlexJS/src/org/apache/flex/html/beads/layouts/NonVirtualVerticalLayout.js ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/1a5ba33d/frameworks/js/FlexJS/src/org/apache/flex/html/beads/layouts/TileLayout.js ---------------------------------------------------------------------- diff --cc frameworks/js/FlexJS/src/org/apache/flex/html/beads/layouts/TileLayout.js index f1aa9f9,17f83ec..72354b0 --- a/frameworks/js/FlexJS/src/org/apache/flex/html/beads/layouts/TileLayout.js +++ b/frameworks/js/FlexJS/src/org/apache/flex/html/beads/layouts/TileLayout.js @@@ -121,41 -95,32 +95,41 @@@ Object.defineProperties(org_apache_flex */ org_apache_flex_html_beads_layouts_TileLayout. prototype.changeHandler = function(event) { -- var children, i, n; ++ var children, i, n, child; var xpos, ypos, useWidth, useHeight; children = this.strand_.internalChildren(); n = children.length; if (n === 0) return; + var realN = n; + for (i = 0; i < n; i++) + { - var child = children[i].flexjs_wrapper; ++ child = children[i].flexjs_wrapper; + if (!child.get_visible()) realN--; + } + xpos = 0; ypos = 0; - useWidth = this.get_columnWidth(); - useHeight = this.get_rowHeight(); + useWidth = this.columnWidth; + useHeight = this.rowHeight; - if (isNaN(useWidth)) useWidth = Math.floor(this.strand_.get_width() / this.get_numColumns()); // + gap + if (isNaN(useWidth)) useWidth = Math.floor(this.strand_.width / this.numColumns); // + gap if (isNaN(useHeight)) { // given the width and total number of items, how many rows? - var numRows = Math.floor(realN / this.get_numColumns()); - useHeight = Math.floor(this.strand_.get_height() / numRows); - var numRows = Math.floor(n / this.numColumns); ++ var numRows = Math.floor(realN / this.numColumns); + useHeight = Math.floor(this.strand_.height / numRows); } for (i = 0; i < n; i++) { -- var child = children[i].flexjs_wrapper; - if (!child.get_visible()) continue; ++ child = children[i].flexjs_wrapper; ++ if (!child.visible) continue; + child.positioner.internalDisplay = 'inline-block'; - child.set_width(useWidth); - child.set_height(useHeight); - child.set_x(xpos); - child.set_y(ypos); + child.width = useWidth; + child.height = useHeight; + child.x = xpos; + child.y = ypos; xpos += useWidth;
