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/15 23:43:59 UTC
[54/55] [abbrv] git commit: [flex-asjs] [refs/heads/develop] - Merge
branch 'moreswcs' into develop
http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/1cd5f16f/frameworks/projects/Core/js/src/org/apache/flex/events/BrowserEvent.js
----------------------------------------------------------------------
diff --cc frameworks/projects/Core/js/src/org/apache/flex/events/BrowserEvent.js
index 0000000,7f80b0a..b2f7f91
mode 000000,100644..100644
--- a/frameworks/projects/Core/js/src/org/apache/flex/events/BrowserEvent.js
+++ b/frameworks/projects/Core/js/src/org/apache/flex/events/BrowserEvent.js
@@@ -1,0 -1,152 +1,166 @@@
+ /**
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+ goog.provide('org_apache_flex_events_BrowserEvent');
+
+ goog.require('goog.events.BrowserEvent');
+ //goog.require('org_apache_flex_events_Event');
+
+
+
+ /**
+ * @constructor
+ * @extends {org_apache_flex_events_Event}
+ */
+ org_apache_flex_events_BrowserEvent = function() {
+ // org_apache_flex_events_BrowserEvent.base(this, 'constructor');
+
+ };
+ //goog.inherits(org_apache_flex_events_BrowserEvent,
+ // org_apache_flex_events_Event);
+
+
+ /**
+ * Metadata
+ *
+ * @type {Object.<string, Array.<Object>>}
+ */
+ org_apache_flex_events_BrowserEvent.prototype.FLEXJS_CLASS_INFO =
+ { names: [{ name: 'BrowserEvent',
+ qName: 'org_apache_flex_events_BrowserEvent' }] };
+
+
+ /**
+ * @type {?goog.events.BrowserEvent}
+ */
+ org_apache_flex_events_BrowserEvent.prototype.wrappedEvent = null;
+
+
+ /**
+ */
+ org_apache_flex_events_BrowserEvent.prototype.preventDefault = function() {
+ this.wrappedEvent.preventDefault();
+ };
+
+
++/**
++ */
++org_apache_flex_events_BrowserEvent.prototype.stopPropagation = function() {
++ this.wrappedEvent.stopPropagation();
++};
++
++
++/**
++ */
++org_apache_flex_events_BrowserEvent.prototype.stopImmediatePropagation = function() {
++ this.wrappedEvent.stopImmediatePropagation();
++};
++
++
+ Object.defineProperties(org_apache_flex_events_BrowserEvent.prototype, {
+ /** @expose */
+ currentTarget: {
+ /** @this {org_apache_flex_events_BrowserEvent} */
+ get: function() {
+ var o = this.wrappedEvent.currentTarget;
+ if (o && o.flexjs_wrapper)
+ return o.flexjs_wrapper;
+ return o;
+ }
+ },
+ /** @expose */
+ button: {
+ /** @this {org_apache_flex_events_BrowserEvent} */
+ get: function() {
+ return this.wrappedEvent.button;
+ }
+ },
+ /** @expose */
+ charCode: {
+ /** @this {org_apache_flex_events_BrowserEvent} */
+ get: function() {
+ return this.wrappedEvent.charCode;
+ }
+ },
+ /** @expose */
+ clientX: {
+ /** @this {org_apache_flex_events_BrowserEvent} */
+ get: function() {
+ return this.wrappedEvent.clientX;
+ }
+ },
+ /** @expose */
+ clientY: {
+ /** @this {org_apache_flex_events_BrowserEvent} */
+ get: function() {
+ return this.wrappedEvent.clientY;
+ }
+ },
+ /** @expose */
+ keyCode: {
+ /** @this {org_apache_flex_events_BrowserEvent} */
+ get: function() {
+ return this.wrappedEvent.keyCode;
+ }
+ },
+ /** @expose */
+ offsetX: {
+ /** @this {org_apache_flex_events_BrowserEvent} */
+ get: function() {
+ return this.wrappedEvent.offsetX;
+ }
+ },
+ /** @expose */
+ offsetY: {
+ /** @this {org_apache_flex_events_BrowserEvent} */
+ get: function() {
+ return this.wrappedEvent.offsetY;
+ }
+ },
+ /** @expose */
+ screenX: {
+ /** @this {org_apache_flex_events_BrowserEvent} */
+ get: function() {
+ return this.wrappedEvent.screenX;
+ }
+ },
+ /** @expose */
+ screenY: {
+ /** @this {org_apache_flex_events_BrowserEvent} */
+ get: function() {
+ return this.wrappedEvent.screenY;
+ }
+ },
+ /** @expose */
+ relatedTarget: {
+ /** @this {org_apache_flex_events_BrowserEvent} */
+ get: function() {
+ var o = this.wrappedEvent.relatedTarget;
+ if (o && o.flexjs_wrapper)
+ return o.flexjs_wrapper;
+ return o;
+ }
+ },
+ /** @expose */
+ target: {
+ /** @this {org_apache_flex_events_BrowserEvent} */
+ get: function() {
+ var o = this.wrappedEvent.target;
+ if (o && o.flexjs_wrapper)
+ return o.flexjs_wrapper;
+ return o;
+ }
+ }
+ });
+
+
http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/1cd5f16f/frameworks/projects/HTML/js/src/org/apache/flex/html/supportClasses/StringItemRenderer.js
----------------------------------------------------------------------
diff --cc frameworks/projects/HTML/js/src/org/apache/flex/html/supportClasses/StringItemRenderer.js
index 0000000,3e977dc..35bc6ba
mode 000000,100644..100644
--- a/frameworks/projects/HTML/js/src/org/apache/flex/html/supportClasses/StringItemRenderer.js
+++ b/frameworks/projects/HTML/js/src/org/apache/flex/html/supportClasses/StringItemRenderer.js
@@@ -1,0 -1,139 +1,143 @@@
+ /**
+ * Licensed under the Apache License, Version 2.0 (the 'License');
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an 'AS IS' BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+ goog.provide('org_apache_flex_html_supportClasses_StringItemRenderer');
+
+ goog.require('org_apache_flex_core_IItemRenderer');
+ goog.require('org_apache_flex_core_UIBase');
+ goog.require('org_apache_flex_html_beads_controllers_ItemRendererMouseController');
+ goog.require('org_apache_flex_html_supportClasses_DataItemRenderer');
+ goog.require('org_apache_flex_utils_Language');
+
+
+
+ /**
+ * @constructor
+ * @extends {org_apache_flex_html_supportClasses_DataItemRenderer}
+ * @implements {org_apache_flex_core_IItemRenderer}
+ */
+ org_apache_flex_html_supportClasses_StringItemRenderer =
+ function() {
+ org_apache_flex_html_supportClasses_StringItemRenderer.base(this, 'constructor');
+ };
+ goog.inherits(
+ org_apache_flex_html_supportClasses_StringItemRenderer,
+ org_apache_flex_html_supportClasses_DataItemRenderer);
+
+
+ /**
+ * Metadata
+ *
+ * @type {Object.<string, Array.<Object>>}
+ */
+ org_apache_flex_html_supportClasses_StringItemRenderer.
+ prototype.FLEXJS_CLASS_INFO =
+ { names: [{ name: 'StringItemRenderer',
+ qName: 'org_apache_flex_html_supportClasses_StringItemRenderer' }],
+ interfaces: [org_apache_flex_core_IItemRenderer] };
+
+
+ /**
+ * @override
+ */
+ org_apache_flex_html_supportClasses_StringItemRenderer.
+ prototype.createElement = function() {
+
+ this.element = document.createElement('div');
+ this.positioner = this.element;
+
+ this.element.flexjs_wrapper = this;
+ this.className = 'StringItemRenderer';
+
+ // itemRenderers should provide something for the background to handle
+ // the selection and highlight
+ this.backgroundView = this.element;
+
+ this.controller = new org_apache_flex_html_beads_controllers_ItemRendererMouseController();
+ this.controller.strand = this;
+
+ return this.element;
+ };
+
+
+ Object.defineProperties(org_apache_flex_html_supportClasses_StringItemRenderer.prototype, {
+ /** @expose */
+ strand: {
+ /** @this {org_apache_flex_html_supportClasses_StringItemRenderer} */
+ set: function(value) {
+ this.strand_ = value;
+ },
+ /** @this {org_apache_flex_html_supportClasses_StringItemRenderer} */
+ get: function() {
+ return this.strand_;
+ }
+ },
+ /** @expose */
+ itemRendererParent: {
+ /** @this {org_apache_flex_html_supportClasses_StringItemRenderer} */
+ get: function() {
+ return this.rendererParent_;
+ },
+ /** @this {org_apache_flex_html_supportClasses_StringItemRenderer} */
+ set: function(value) {
+ this.rendererParent_ = value;
+ }
+ },
+ /** @expose */
+ index: {
+ /** @this {org_apache_flex_html_supportClasses_StringItemRenderer} */
+ set: function(value) {
+ this.index_ = value;
++ },
++ /** @this {org_apache_flex_html_supportClasses_StringItemRenderer} */
++ get: function() {
++ return this.index_;
+ }
+ },
+ /** @expose */
+ text: {
+ /** @this {org_apache_flex_html_supportClasses_StringItemRenderer} */
+ set: function(value) {
+ this.element.innerHTML = value;
+ },
+ /** @this {org_apache_flex_html_supportClasses_StringItemRenderer} */
+ get: function() {
+ return this.element.innerHTML;
+ }
+ },
+ /** @expose */
+ data: {
+ /** @this {org_apache_flex_html_supportClasses_StringItemRenderer} */
+ set: function(value) {
+ org_apache_flex_utils_Language.superSetter(
+ org_apache_flex_html_supportClasses_StringItemRenderer, this, '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);
+ }
+ },
+ /** @this {org_apache_flex_html_supportClasses_StringItemRenderer} */
+ get: function() {
+ return this.element.innerHTML;
+ }
+ }
+ });
http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/1cd5f16f/frameworks/projects/Mobile/asjs/src/org/apache/flex/mobile/chrome/TabBar.as
----------------------------------------------------------------------
diff --cc frameworks/projects/Mobile/asjs/src/org/apache/flex/mobile/chrome/TabBar.as
index 0000000,7ab2047..6e54326
mode 000000,100644..100644
--- a/frameworks/projects/Mobile/asjs/src/org/apache/flex/mobile/chrome/TabBar.as
+++ b/frameworks/projects/Mobile/asjs/src/org/apache/flex/mobile/chrome/TabBar.as
@@@ -1,0 -1,80 +1,50 @@@
+ ////////////////////////////////////////////////////////////////////////////////
+ //
+ // Licensed to the Apache Software Foundation (ASF) under one or more
+ // contributor license agreements. See the NOTICE file distributed with
+ // this work for additional information regarding copyright ownership.
+ // The ASF licenses this file to You under the Apache License, Version 2.0
+ // (the "License"); you may not use this file except in compliance with
+ // the License. You may obtain a copy of the License at
+ //
+ // http://www.apache.org/licenses/LICENSE-2.0
+ //
+ // Unless required by applicable law or agreed to in writing, software
+ // distributed under the License is distributed on an "AS IS" BASIS,
+ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ // See the License for the specific language governing permissions and
+ // limitations under the License.
+ //
+ ////////////////////////////////////////////////////////////////////////////////
+ package org.apache.flex.mobile.chrome
+ {
+ import org.apache.flex.core.IChrome;
+ import org.apache.flex.html.ButtonBar;
+
+ /**
+ * The TabBar class displays a set of buttons that can be used to
+ * switch between navigation panels.
+ *
+ * @langversion 3.0
+ * @playerversion Flash 10.2
+ * @playerversion AIR 2.6
+ * @productversion FlexJS 0.0
+ */
+ public class TabBar extends ButtonBar implements IChrome
+ {
+ /**
+ * Constructor
+ *
+ * @langversion 3.0
+ * @playerversion Flash 10.2
+ * @playerversion AIR 2.6
+ * @productversion FlexJS 0.0
+ */
+ public function TabBar()
+ {
+ super();
+
+ className = "TabBar";
+ }
-
- /**
- * Sets the width of the TabBar.
- *
- * @param value The new width in pixels.
- *
- * @langversion 3.0
- * @playerversion Flash 10.2
- * @playerversion AIR 2.6
- * @productversion FlexJS 0.0
- */
- override public function set width(value:Number):void
- {
- super.width = value;
- }
-
- /**
- * Sets the height of the TabBar.
- *
- * @param value The new height in pixels.
- *
- * @langversion 3.0
- * @playerversion Flash 10.2
- * @playerversion AIR 2.6
- * @productversion FlexJS 0.0
- */
- override public function set height(value:Number):void
- {
- super.height = value;
- }
+ }
+ }
http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/1cd5f16f/frameworks/projects/Mobile/js/src/org/apache/flex/mobile/ManagerBase.js
----------------------------------------------------------------------
diff --cc frameworks/projects/Mobile/js/src/org/apache/flex/mobile/ManagerBase.js
index 0000000,0c705e6..9e9557a
mode 000000,100644..100644
--- a/frameworks/projects/Mobile/js/src/org/apache/flex/mobile/ManagerBase.js
+++ b/frameworks/projects/Mobile/js/src/org/apache/flex/mobile/ManagerBase.js
@@@ -1,0 -1,128 +1,133 @@@
+ /**
+ * Licensed under the Apache License, Version 2.0 (the 'License');
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an 'AS IS' BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+ goog.provide('org_apache_flex_mobile_ManagerBase');
+
+ goog.require('org_apache_flex_core_IChrome');
+ goog.require('org_apache_flex_core_UIBase');
+ goog.require('org_apache_flex_utils_Language');
+
+
+
+ /**
+ * @constructor
+ * @extends {org_apache_flex_core_UIBase}
+ */
+ org_apache_flex_mobile_ManagerBase = function() {
+ org_apache_flex_mobile_ManagerBase.base(this, 'constructor');
+ };
+ goog.inherits(org_apache_flex_mobile_ManagerBase,
+ org_apache_flex_core_UIBase);
+
+
+ /**
+ * Metadata
+ *
+ * @type {Object.<string, Array.<Object>>}
+ */
+ org_apache_flex_mobile_ManagerBase.prototype.FLEXJS_CLASS_INFO =
+ { names: [{ name: 'ManagerBase',
+ qName: 'org_apache_flex_mobile_ManagerBase' }] };
+
+
+ /**
+ * @type {org_apache_flex_core_UIBase}
+ */
+ org_apache_flex_mobile_ManagerBase.prototype._contentArea = null;
+
+
-/**
- * @expose
- * @return {Object} The content area for this manager.
- */
-org_apache_flex_mobile_ManagerBase.prototype.get_contentArea =
- function() {
- return this._contentArea;
-};
++Object.defineProperties(org_apache_flex_mobile_ManagerBase.prototype, {
++ /** @expose */
++ contentArea: {
++ /** @this {org_apache_flex_core_UIBase} */
++ get: function() {
++ return this._contentArea;
++ },
++ /** @this {org_apache_flex_core_UIBase} */
++ set: function(value) {
++ this._contentArea = value;
++ }
++ }
++});
+
+
+ /**
+ * @override
+ * @param {Object} c Element being added.
+ */
+ org_apache_flex_mobile_ManagerBase.prototype.addElement = function(c) {
+ if (org_apache_flex_utils_Language.is(c, org_apache_flex_core_IChrome)) {
+ org_apache_flex_mobile_ManagerBase.base(this, 'addElement', c);
+ }
+ else {
+ this._contentArea.addElement(c);
+ }
+ };
+
+
+ /**
+ * @override
+ * @param {Object} c The child element.
+ * @param {number} index The index.
+ */
+ org_apache_flex_mobile_ManagerBase.prototype.addElementAt =
+ function(c, index) {
+ if (org_apache_flex_utils_Language.is(c, org_apache_flex_core_IChrome)) {
+ org_apache_flex_mobile_ManagerBase.base(this, 'addElementAt', c, index);
+ }
+ else {
+ this._contentArea.addElementAt(c, index);
+ }
+ };
+
+
+ /**
+ * @override
+ * @param {Object} c The child element.
+ * @return {number} The index in parent.
+ */
+ org_apache_flex_mobile_ManagerBase.prototype.getElementIndex =
+ function(c) {
+ return this._contentArea.getElementIndex(c);
+ };
+
+
+ /**
+ * @override
+ * @param {Object} c The child element.
+ */
+ org_apache_flex_mobile_ManagerBase.prototype.removeElement =
+ function(c) {
+ this._contentArea.removeElement(c);
+ };
+
+
+ /**
+ * @override
+ */
+ org_apache_flex_mobile_ManagerBase.prototype.createElement =
+ function() {
+
+ this.element = document.createElement('div');
+ this.element.className = 'ManagerBase';
+
+ this.positioner = this.element;
+ this.element.flexjs_wrapper = this;
+
+ this._contentArea = new org_apache_flex_core_UIBase();
- this._contentArea.set_className('ContentArea');
++ this._contentArea.className = 'ContentArea';
+ org_apache_flex_core_UIBase.prototype.addElement.call(this, this._contentArea);
+
+ return this.element;
+ };