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:32 UTC
[27/55] [abbrv] git commit: [flex-asjs] [refs/heads/develop] - move
handwritten JS code to final home. Build scripts still need fixing up
http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/b677c658/frameworks/js/FlexJS/src/org/apache/flex/maps/google/Place.js
----------------------------------------------------------------------
diff --git a/frameworks/js/FlexJS/src/org/apache/flex/maps/google/Place.js b/frameworks/js/FlexJS/src/org/apache/flex/maps/google/Place.js
deleted file mode 100644
index 482df0e..0000000
--- a/frameworks/js/FlexJS/src/org/apache/flex/maps/google/Place.js
+++ /dev/null
@@ -1,92 +0,0 @@
-/**
- * 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_maps_google_Place');
-
-goog.require('org_apache_flex_maps_google_Geometry');
-
-
-// IMPORTANT:
-// In order to use this class, the Google MAP API must be downloaded
-// from the <head> section of the main HTML file.
-
-
-
-/**
- * @constructor
- */
-org_apache_flex_maps_google_Place = function() {
- this.geometry = new org_apache_flex_maps_google_Geometry();
-};
-
-
-/**
- * Metadata
- *
- * @type {Object.<string, Array.<Object>>}
- */
-org_apache_flex_maps_google_Place.prototype.
-FLEXJS_CLASS_INFO =
-{ names: [{ name: 'Place',
- qName: 'org_apache_flex_maps_google_Place' }],
- interfaces: [] };
-
-
-/**
- * @type {Object} The current location
- */
-org_apache_flex_maps_google_Place.prototype.geometry = null;
-
-
-/**
- * @type {String} The icon representing the place.
- */
-org_apache_flex_maps_google_Place.prototype.icon = null;
-
-
-/**
- * @type {String} A unique identifier for the place.
- */
-org_apache_flex_maps_google_Place.prototype.id = null;
-
-
-/**
- * @type {String} The name of the place.
- */
-org_apache_flex_maps_google_Place.prototype.name = null;
-
-
-/**
- * @type {String} A reference identifier.
- */
-org_apache_flex_maps_google_Place.prototype.reference = null;
-
-
-/**
- * @type {String} A description of the area of the place.
- */
-org_apache_flex_maps_google_Place.prototype.vicinity = null;
-
-
-/**
- * @override
- * @return {string} A description of the area of the place.
- */
-org_apache_flex_maps_google_Place.prototype.toString = function PlaceToString() {
- var results = '';
- if (this.name) results = this.name;
- if (this.vicinity) results += ' ' + this.vicinity;
- return results;
-};
-
http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/b677c658/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
deleted file mode 100644
index d344607..0000000
--- a/frameworks/js/FlexJS/src/org/apache/flex/maps/google/beads/MapView.js
+++ /dev/null
@@ -1,65 +0,0 @@
-/**
- * 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.
- */
-/* MapView isn't really the view, but is a bead used to trigger
- the loading of the map JS files */
-
-goog.provide('org_apache_flex_maps_google_beads_MapView');
-
-
-
-/**
- * @constructor
- */
-org_apache_flex_maps_google_beads_MapView = function() {
-};
-
-
-/**
- * Metadata
- *
- * @type {Object.<string, Array.<Object>>}
- */
-org_apache_flex_maps_google_beads_MapView.prototype.
-FLEXJS_CLASS_INFO =
-{ names: [{ name: 'MapView',
- qName: 'org_apache_flex_maps_google_beads_MapView' }],
- interfaces: [org_apache_flex_core_IBeadView] };
-
-
-Object.defineProperties(org_apache_flex_maps_google_beads_MapView.prototype, {
- /** @expose */
- strand: {
- /** @this {org_apache_flex_maps_google_beads_MapView} */
- set: function(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 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);
- }
- }
-});
-
http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/b677c658/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
deleted file mode 100644
index 8a92972..0000000
--- a/frameworks/js/FlexJS/src/org/apache/flex/maps/google/models/MapModel.js
+++ /dev/null
@@ -1,100 +0,0 @@
-/**
- * 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_maps_google_models_MapModel');
-
-goog.require('org_apache_flex_core_IBeadModel');
-goog.require('org_apache_flex_events_EventDispatcher');
-
-
-// IMPORTANT:
-// In order to use this class, the Google MAP API must be downloaded
-// from the <head> section of the main HTML file.
-
-
-
-/**
- * @constructor
- * @extends {org_apache_flex_events_EventDispatcher}
- * @implements {org_apache_flex_core_IBeadModel}
- */
-org_apache_flex_maps_google_models_MapModel = function() {
- org_apache_flex_maps_google_models_MapModel.base(this, 'constructor');
-};
-goog.inherits(
- org_apache_flex_maps_google_models_MapModel,
- org_apache_flex_events_EventDispatcher);
-
-
-/**
- * Metadata
- *
- * @type {Object.<string, Array.<Object>>}
- */
-org_apache_flex_maps_google_models_MapModel.prototype.
-FLEXJS_CLASS_INFO =
-{ names: [{ name: 'MapModel',
- qName: 'org_apache_flex_maps_google_models_MapModel' }],
- interfaces: [org_apache_flex_core_IBeadModel] };
-
-
-Object.defineProperties(org_apache_flex_maps_google_models_MapModelv.prototype, {
- /** @expose */
- strand: {
- /** @this {org_apache_flex_maps_google_models_MapModel} */
- set: function(value) {
- this.strand_ = value;
- }
- },
- /** @expose */
- searchResults: {
- get: function() {
- return this._searchResults;
- },
- set: function(value) {
- this._searchResults = value;
- this.dispatchEvent('searchResultsChanged');
- }
- },
- /** @expose */
- zoom: {
- get: function() {
- return this._zoom;
- },
- set: function(value) {
- this._zoom = value;
- this.dispatchEvent('zoomChanged');
- }
- },
- /** @expose */
- selectedMarker: {
- get: function() {
- return this._selectedMarker;
- },
- set: function(value) {
- this._selectedMarker = value;
- this.dispatchEvent('selectedMarkerChanged');
- }
- },
- /** @expose */
- 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/b677c658/frameworks/js/FlexJS/src/org/apache/flex/mobile/ManagerBase.js
----------------------------------------------------------------------
diff --git a/frameworks/js/FlexJS/src/org/apache/flex/mobile/ManagerBase.js b/frameworks/js/FlexJS/src/org/apache/flex/mobile/ManagerBase.js
deleted file mode 100644
index 0c705e6..0000000
--- a/frameworks/js/FlexJS/src/org/apache/flex/mobile/ManagerBase.js
+++ /dev/null
@@ -1,128 +0,0 @@
-/**
- * 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;
-};
-
-
-/**
- * @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');
- org_apache_flex_core_UIBase.prototype.addElement.call(this, this._contentArea);
-
- return this.element;
-};
http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/b677c658/frameworks/js/FlexJS/src/org/apache/flex/net/BinaryUploader.js
----------------------------------------------------------------------
diff --git a/frameworks/js/FlexJS/src/org/apache/flex/net/BinaryUploader.js b/frameworks/js/FlexJS/src/org/apache/flex/net/BinaryUploader.js
deleted file mode 100644
index 4d7cc22..0000000
--- a/frameworks/js/FlexJS/src/org/apache/flex/net/BinaryUploader.js
+++ /dev/null
@@ -1,360 +0,0 @@
-/**
- * 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_net_BinaryUploader');
-
-goog.require('org_apache_flex_core_HTMLElementWrapper');
-goog.require('org_apache_flex_net_HTTPHeader');
-
-
-
-/**
- * @constructor
- * @extends {org_apache_flex_core_HTMLElementWrapper}
- */
-org_apache_flex_net_BinaryUploader = function() {
- org_apache_flex_net_BinaryUploader .base(this, 'constructor');
-
- /**
- * @private
- * @type {string}
- */
- this.url_ = null;
-
- /**
- * @private
- * @type {Number}
- */
- this.status_ = -1;
-
- /**
- * @private
- * @type {string}
- */
- this.method_ = 'POST';
-
- /**
- * @private
- * @type {Array}
- */
- this.headers_ = null;
-
- /**
- * @private
- * @type {Array}
- */
- this.responseHeaders_ = null;
-
- /**
- * @private
- * @type {string}
- */
- this.responseURL_ = null;
-
- /**
- * @private
- * @type {Number}
- */
- this.timeout_ = 0;
-
- /**
- * @private
- * @type {string}
- */
- this.binaryData_ = null;
-
- /**
- * @private
- * @type {string}
- */
- this.contentType_ = 'application/octet-stream';
-
- //try { // (erikdebruin) 'desperate' attempt to bypass XDR security in IE < 10
- // this.contentType_ = 'text/plain';
- // this.element = new XDomainRequest();
- //} catch (e) {}
-
- this.element = new XMLHttpRequest();
-};
-goog.inherits(org_apache_flex_net_BinaryUploader,
- org_apache_flex_core_HTMLElementWrapper);
-
-
-/**
- * Metadata
- *
- * @type {Object.<string, Array.<Object>>}
- */
-org_apache_flex_net_BinaryUploader.prototype.FLEXJS_CLASS_INFO =
- { names: [{ name: 'BinaryUploader',
- qName: 'org_apache_flex_net_BinaryUploader'}] };
-
-
-/**
- * @expose
- * @type {string}
- */
-org_apache_flex_net_BinaryUploader.HTTP_METHOD_GET = 'GET';
-
-
-/**
- * @expose
- * @type {string}
- */
-org_apache_flex_net_BinaryUploader.HTTP_METHOD_POST = 'POST';
-
-
-/**
- * @expose
- * @type {string}
- */
-org_apache_flex_net_BinaryUploader.HTTP_METHOD_PUT = 'PUT';
-
-
-/**
- * @expose
- * @type {string}
- */
-org_apache_flex_net_BinaryUploader.HTTP_METHOD_DELETE = 'DELETE';
-
-
-Object.defineProperties(org_apache_flex_net_BinaryUploader.prototype, {
- /** @expose */
- data: {
- /** @this {org_apache_flex_net_BinaryUploader} */
- get: function() {
- return this.element.responseText;
- }
- },
- /** @expose */
- binaryData: {
- /** @this {org_apache_flex_net_BinaryUploader} */
- get: function() {
- return this.binaryData_;
- },
- /** @this {org_apache_flex_net_BinaryUploader} */
- set: function(value) {
- this.binaryData_ = value;
- }
- },
- /** @expose */
- contentType: {
- /** @this {org_apache_flex_net_BinaryUploader} */
- get: function() {
- return this.contentType_;
- },
- /** @this {org_apache_flex_net_BinaryUploader} */
- set: function(value) {
- this.contentType_ = value;
- }
- },
- /** @expose */
- headers: {
- /** @this {org_apache_flex_net_BinaryUploader} */
- get: function() {
- if (this.headers_ === 'undefined') {
- this.headers_ = [];
- }
-
- return this.headers_;
- },
- /** @this {org_apache_flex_net_BinaryUploader} */
- set: function(value) {
- this.headers_ = value;
- }
- },
- /** @expose */
- method: {
- /** @this {org_apache_flex_net_BinaryUploader} */
- get: function() {
- return this.method_;
- },
- /** @this {org_apache_flex_net_BinaryUploader} */
- set: function(value) {
- this.method_ = value;
- }
- },
- /** @expose */
- responseHeaders: {
- /** @this {org_apache_flex_net_BinaryUploader} */
- get: function() {
- var allHeaders, c, hdr, i, n, part1, part2;
-
- if (typeof this.responseHeaders_ === 'undefined') {
- allHeaders = this.element.getAllResponseHeaders();
- this.responseHeaders_ = allHeaders.split('\n');
- n = this.responseHeaders_.length;
- for (i = 0; i < n; i++) {
- hdr = this.responseHeaders_[i];
- c = hdr.indexOf(':');
- part1 = hdr.substring(0, c);
- part2 = hdr.substring(c + 2);
- this.responseHeaders_[i] =
- new org_apache_flex_net_HTTPHeader(part1, part2);
- }
- }
- return this.responseHeaders_;
- }
- },
- /** @expose */
- responseURL: {
- /** @this {org_apache_flex_net_BinaryUploader} */
- get: function() {
- return this.responseURL_;
- }
- },
- /** @expose */
- status: {
- /** @this {org_apache_flex_net_BinaryUploader} */
- get: function() {
- return this.status_;
- }
- },
- /** @expose */
- timeout: {
- /** @this {org_apache_flex_net_BinaryUploader} */
- get: function() {
- return this.timeout_;
- },
- /** @this {org_apache_flex_net_BinaryUploader} */
- set: function(value) {
- this.timeout_ = value;
- }
- },
- /** @expose */
- url: {
- /** @this {org_apache_flex_net_BinaryUploader} */
- get: function() {
- return this.url_;
- },
- /** @this {org_apache_flex_net_BinaryUploader} */
- set: function(value) {
- this.url_ = value;
- }
- },
- /** @expose */
- id: {
- /** @this {org_apache_flex_net_BinaryUploader} */
- get: function() {
- return this.id;
- },
- /** @this {org_apache_flex_net_BinaryUploader} */
- set: function(value) {
- if (this.id !== value) {
- this.id = value;
- this.dispatchEvent('idChanged');
- }
- }
- },
- /** @expose */
- MXMLDescriptor: {
- /** @this {org_apache_flex_net_BinaryUploader} */
- get: function() {
- return null;
- }
- },
- /** @expose */
- MXMLProperties: {
- /** @this {org_apache_flex_net_BinaryUploader} */
- get: function() {
- return null;
- }
- }
-});
-
-
-/**
- * @expose
- */
-org_apache_flex_net_BinaryUploader.prototype.send = function() {
- var binaryData, header, i, n, sawContentType, url;
-
- this.element.onreadystatechange = goog.bind(this.progressHandler, this);
-
- url = this.url_;
-
- binaryData = null;
- if (this.binaryData_ !== undefined) {
- if (this.method_ === org_apache_flex_net_BinaryUploader.HTTP_METHOD_GET) {
- if (url.indexOf('?') !== -1) {
- url += this.binaryData_.data;
- } else {
- url += '?' + this.binaryData_.data;
- }
- } else {
- binaryData = this.binaryData_.data;
- }
- }
-
- this.element.open(this.method_, this.url_, true);
- this.element.timeout = this.timeout_;
-
- sawContentType = false;
- if (this.headers_) {
- n = this.headers_.length;
- for (i = 0; i < n; i++) {
- header = this.headers_[i];
- if (header.name === org_apache_flex_net_HTTPHeader.CONTENT_TYPE) {
- sawContentType = true;
- }
-
- this.element.setRequestHeader(header.name, header.value);
- }
- }
-
- if (this.method_ !== org_apache_flex_net_BinaryUploader.HTTP_METHOD_GET &&
- !sawContentType && binaryData) {
- this.element.setRequestHeader(
- org_apache_flex_net_HTTPHeader.CONTENT_TYPE, this.binaryType_);
- }
-
- if (binaryData) {
- this.element.setRequestHeader('Content-length', binaryData.length);
- this.element.setRequestHeader('Connection', 'close');
- this.element.send(binaryData);
- } else {
- this.element.send();
- }
-};
-
-
-/**
- * @protected
- */
-org_apache_flex_net_BinaryUploader.prototype.progressHandler = function() {
- if (this.element.readyState === 2) {
- this.status_ = this.element.status;
- this.dispatchEvent('httpResponseStatus');
- this.dispatchEvent('httpStatus');
- } else if (this.element.readyState === 4) {
- this.dispatchEvent('complete');
- }
-};
-
-
-/**
- * @expose
- * @type {string}
- */
-org_apache_flex_net_BinaryUploader.prototype.id = null;
-
-
-/**
- * @param {Object} document The MXML object.
- * @param {string} id The id for the instance.
- */
-org_apache_flex_net_BinaryUploader.prototype.setDocument =
- function(document, id) {
- this.document = document;
-};
http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/b677c658/frameworks/js/FlexJS/src/org/apache/flex/net/HTTPHeader.js
----------------------------------------------------------------------
diff --git a/frameworks/js/FlexJS/src/org/apache/flex/net/HTTPHeader.js b/frameworks/js/FlexJS/src/org/apache/flex/net/HTTPHeader.js
deleted file mode 100644
index 8eee6f2..0000000
--- a/frameworks/js/FlexJS/src/org/apache/flex/net/HTTPHeader.js
+++ /dev/null
@@ -1,63 +0,0 @@
-/**
- * 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_net_HTTPHeader');
-
-
-
-/**
- * @constructor
- * @param {string=} opt_name The name.
- * @param {string=} opt_value The value.
- */
-org_apache_flex_net_HTTPHeader = function(opt_name, opt_value) {
- if (typeof opt_name !== 'undefined') {
- this.name = opt_name;
- }
-
- if (typeof opt_value !== 'undefined') {
- this.value = opt_value;
- }
-};
-
-
-/**
- * Metadata
- *
- * @type {Object.<string, Array.<Object>>}
- */
-org_apache_flex_net_HTTPHeader.prototype.FLEXJS_CLASS_INFO =
- { names: [{ name: 'HTTPHeader',
- qName: 'org_apache_flex_net_HTTPHeader'}] };
-
-
-/**
- * @expose
- * @type {string}
- */
-org_apache_flex_net_HTTPHeader.CONTENT_TYPE = 'Content-type';
-
-
-/**
- * @expose
- * @type {?string}
- */
-org_apache_flex_net_HTTPHeader.prototype.value = null;
-
-
-/**
- * @expose
- * @type {?string}
- */
-org_apache_flex_net_HTTPHeader.prototype.name = null;
http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/b677c658/frameworks/js/FlexJS/src/org/apache/flex/net/HTTPService.js
----------------------------------------------------------------------
diff --git a/frameworks/js/FlexJS/src/org/apache/flex/net/HTTPService.js b/frameworks/js/FlexJS/src/org/apache/flex/net/HTTPService.js
deleted file mode 100644
index ff1f743..0000000
--- a/frameworks/js/FlexJS/src/org/apache/flex/net/HTTPService.js
+++ /dev/null
@@ -1,389 +0,0 @@
-/**
- * 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_net_HTTPService');
-
-goog.require('org_apache_flex_core_HTMLElementWrapper');
-goog.require('org_apache_flex_net_HTTPHeader');
-
-
-
-/**
- * @constructor
- * @extends {org_apache_flex_core_HTMLElementWrapper}
- */
-org_apache_flex_net_HTTPService = function() {
- org_apache_flex_net_HTTPService.base(this, 'constructor');
-
- /**
- * @private
- * @type {?string}
- */
- this.url_ = null;
-
- /**
- * @private
- * @type {number}
- */
- this.status_ = -1;
-
- /**
- * @private
- * @type {string}
- */
- this.method_ = 'GET';
-
- /**
- * @private
- * @type {Array}
- */
- this.headers_ = null;
-
- /**
- * @private
- * @type {Array}
- */
- this.responseHeaders_ = null;
-
- /**
- * @private
- * @type {?string}
- */
- this.responseURL_ = null;
-
- /**
- * @private
- * @type {Array.<Object>}
- */
- this.mxmlBeads_ = null;
-
- /**
- * @private
- * @type {Array.<Object>}
- */
- this.beads_ = null;
-
- /**
- * @private
- * @type {number}
- */
- this.timeout_ = 0;
-
- /**
- * @private
- * @type {?string}
- */
- this.contentData_ = null;
-
- /**
- * @private
- * @type {string}
- */
- this.contentType_ = 'application/x-www-form-urlencoded';
-
- /**
- * @private
- * @type {?string}
- */
- this.id_ = null;
-
- //try { // (erikdebruin) 'desperate' attempt to bypass XDR security in IE < 10
- // this.contentType_ = 'text/plain';
- // this.element = new XDomainRequest();
- //} catch (e) {}
-
- this.element = new XMLHttpRequest();
-};
-goog.inherits(org_apache_flex_net_HTTPService,
- org_apache_flex_core_HTMLElementWrapper);
-
-
-/**
- * Metadata
- *
- * @type {Object.<string, Array.<Object>>}
- */
-org_apache_flex_net_HTTPService.prototype.FLEXJS_CLASS_INFO =
- { names: [{ name: 'HTTPService',
- qName: 'org_apache_flex_net_HTTPService'}] };
-
-
-/**
- * @expose
- * @type {string}
- */
-org_apache_flex_net_HTTPService.HTTP_METHOD_GET = 'GET';
-
-
-/**
- * @expose
- * @type {string}
- */
-org_apache_flex_net_HTTPService.HTTP_METHOD_POST = 'POST';
-
-
-/**
- * @expose
- * @type {string}
- */
-org_apache_flex_net_HTTPService.HTTP_METHOD_PUT = 'PUT';
-
-
-/**
- * @expose
- * @type {string}
- */
-org_apache_flex_net_HTTPService.HTTP_METHOD_DELETE = 'DELETE';
-
-
-Object.defineProperties(org_apache_flex_net_HTTPService.prototype, {
- /** @expose */
- strand: {
- /** @this {org_apache_flex_net_HTTPService} */
- set: function(value) {}
- },
- /** @expose */
- beads: {
- /** @this {org_apache_flex_net_HTTPService} */
- set: function(value) {
- this.mxmlBeads_ = value;
- }
- },
- /** @expose */
- data: {
- /** @this {org_apache_flex_net_HTTPService} */
- get: function() {
- return this.element.responseText;
- }
- },
- /** @expose */
- contentData: {
- /** @this {org_apache_flex_net_HTTPService} */
- get: function() {
- return this.contentData_;
- },
- /** @this {org_apache_flex_net_HTTPService} */
- set: function(value) {
- this.contentData_ = value;
- }
- },
- /** @expose */
- contentType: {
- /** @this {org_apache_flex_net_HTTPService} */
- get: function() {
- return this.contentType_;
- },
- /** @this {org_apache_flex_net_HTTPService} */
- set: function(value) {
- this.contentType_ = value;
- }
- },
- /** @expose */
- headers: {
- /** @this {org_apache_flex_net_HTTPService} */
- get: function() {
- if (this.headers_ === undefined) {
- this.headers_ = [];
- }
-
- return this.headers_;
- },
- /** @this {org_apache_flex_net_HTTPService} */
- set: function(value) {
- this.headers_ = value;
- }
- },
- /** @expose */
- method: {
- /** @this {org_apache_flex_net_HTTPService} */
- get: function() {
- return this.method_;
- },
- /** @this {org_apache_flex_net_HTTPService} */
- set: function(value) {
- this.method_ = value;
- }
- },
- /** @expose */
- responseHeaders: {
- /** @this {org_apache_flex_net_HTTPService} */
- get: function() {
- var allHeaders, c, hdr, i, n, part1, part2;
-
- if (typeof this.responseHeaders_ === 'undefined') {
- allHeaders = this.element.getAllResponseHeaders();
- this.responseHeaders_ = allHeaders.split('\n');
- n = this.responseHeaders_.length;
- for (i = 0; i < n; i++) {
- hdr = this.responseHeaders_[i];
- c = hdr.indexOf(':');
- part1 = hdr.substring(0, c);
- part2 = hdr.substring(c + 2);
- this.responseHeaders_[i] =
- new org_apache_flex_net_HTTPHeader(part1, part2);
- }
- }
- return this.responseHeaders_;
- }
- },
- /** @expose */
- responseURL: {
- /** @this {org_apache_flex_net_HTTPService} */
- get: function() {
- return this.responseURL_;
- }
- },
- /** @expose */
- status: {
- /** @this {org_apache_flex_net_HTTPService} */
- get: function() {
- return this.status_;
- }
- },
- /** @expose */
- timeout: {
- /** @this {org_apache_flex_net_HTTPService} */
- get: function() {
- return this.timeout_;
- },
- /** @this {org_apache_flex_net_HTTPService} */
- set: function(value) {
- this.timeout_ = value;
- }
- },
- /** @expose */
- url: {
- /** @this {org_apache_flex_net_HTTPService} */
- get: function() {
- return this.url_;
- },
- /** @this {org_apache_flex_net_HTTPService} */
- set: function(value) {
- this.url_ = value;
- }
- },
- /** @expose */
- id: {
- /** @this {org_apache_flex_net_HTTPService} */
- get: function() {
- return this.id_;
- },
- /** @this {org_apache_flex_net_HTTPService} */
- set: function(value) {
- if (this.id_ !== value) {
- this.id_ = value;
- this.dispatchEvent('idChanged');
- }
- }
- },
- /** @expose */
- MXMLDescriptor: {
- /** @this {org_apache_flex_net_HTTPService} */
- get: function() {
- return null;
- }
- },
- /** @expose */
- MXMLProperties: {
- /** @this {org_apache_flex_net_HTTPService} */
- get: function() {
- return null;
- }
- }
-});
-
-
-/**
- * @expose
- */
-org_apache_flex_net_HTTPService.prototype.send = function() {
- var contentData, header, i, n, sawContentType, url;
-
- if (this.beads_ == null && this.mxmlBeads_) {
- var m = this.mxmlBeads_.length;
- for (var j = 0; j < m; j++) {
- this.addBead(this.mxmlBeads_[j]);
- }
- }
-
- this.element.onreadystatechange = goog.bind(this.progressHandler, this);
-
- url = this.url_;
-
- contentData = null;
- if (this.contentData_ !== undefined) {
- if (this.method_ === org_apache_flex_net_HTTPService.HTTP_METHOD_GET) {
- if (url.indexOf('?') !== -1) {
- url += this.contentData_;
- } else {
- url += '?' + this.contentData_;
- }
- } else {
- contentData = this.contentData_;
- }
- }
-
- this.element.open(this.method_, this.url_, true);
- this.element.timeout = this.timeout_;
-
- sawContentType = false;
- if (this.headers_) {
- n = this.headers_.length;
- for (i = 0; i < n; i++) {
- header = this.headers_[i];
- if (header.name === org_apache_flex_net_HTTPHeader.CONTENT_TYPE) {
- sawContentType = true;
- }
-
- this.element.setRequestHeader(header.name, header.value);
- }
- }
-
- if (this.method_ !== org_apache_flex_net_HTTPService.HTTP_METHOD_GET &&
- !sawContentType && contentData) {
- this.element.setRequestHeader(
- org_apache_flex_net_HTTPHeader.CONTENT_TYPE, this.contentType_);
- }
-
- if (contentData) {
- this.element.setRequestHeader('Content-length', contentData.length);
- this.element.setRequestHeader('Connection', 'close');
- this.element.send(contentData);
- } else {
- this.element.send();
- }
-};
-
-
-/**
- * @protected
- */
-org_apache_flex_net_HTTPService.prototype.progressHandler = function() {
- if (this.element.readyState === 2) {
- this.status_ = this.element.status;
- this.dispatchEvent('httpResponseStatus');
- this.dispatchEvent('httpStatus');
- } else if (this.element.readyState === 4) {
- this.dispatchEvent('complete');
- }
-};
-
-
-/**
- * @param {Object} document The MXML object.
- * @param {string} id The id for the instance.
- */
-org_apache_flex_net_HTTPService.prototype.setDocument = function(document, id) {
- this.document = document;
-};
http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/b677c658/frameworks/js/FlexJS/src/org/apache/flex/net/JSONInputParser.js
----------------------------------------------------------------------
diff --git a/frameworks/js/FlexJS/src/org/apache/flex/net/JSONInputParser.js b/frameworks/js/FlexJS/src/org/apache/flex/net/JSONInputParser.js
deleted file mode 100644
index 83a41d1..0000000
--- a/frameworks/js/FlexJS/src/org/apache/flex/net/JSONInputParser.js
+++ /dev/null
@@ -1,48 +0,0 @@
-/**
- * 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_net_JSONInputParser');
-
-
-
-/**
- * @constructor
- */
-org_apache_flex_net_JSONInputParser = function() {
-};
-
-
-/**
- * Metadata
- *
- * @type {Object.<string, Array.<Object>>}
- */
-org_apache_flex_net_JSONInputParser.prototype.FLEXJS_CLASS_INFO =
- { names: [{ name: 'JSONInputParser',
- qName: 'org_apache_flex_net_JSONInputParser'}] };
-
-
-/**
- * @expose
- * @param {string} s The input string.
- * @return {Array.<string>} The Array of unparsed objects.
- */
-org_apache_flex_net_JSONInputParser.prototype.parseItems = function(s) {
- var c = s.indexOf('[');
- if (c != -1) {
- var c2 = s.lastIndexOf(']');
- s = s.substring(c + 1, c2);
- }
- return s.split('},');
-};
http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/b677c658/frameworks/js/FlexJS/src/org/apache/flex/net/JSONItemConverter.js
----------------------------------------------------------------------
diff --git a/frameworks/js/FlexJS/src/org/apache/flex/net/JSONItemConverter.js b/frameworks/js/FlexJS/src/org/apache/flex/net/JSONItemConverter.js
deleted file mode 100644
index 5434a15..0000000
--- a/frameworks/js/FlexJS/src/org/apache/flex/net/JSONItemConverter.js
+++ /dev/null
@@ -1,48 +0,0 @@
-/**
- * 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_net_JSONItemConverter');
-
-
-
-/**
- * @constructor
- */
-org_apache_flex_net_JSONItemConverter = function() {
-};
-
-
-/**
- * Metadata
- *
- * @type {Object.<string, Array.<Object>>}
- */
-org_apache_flex_net_JSONItemConverter.prototype.FLEXJS_CLASS_INFO =
- { names: [{ name: 'JSONItemConverter',
- qName: 'org_apache_flex_net_JSONItemConverter'}] };
-
-
-/**
- * @expose
- * @param {string} s The input string.
- * @return {*} The object.
- */
-org_apache_flex_net_JSONItemConverter.prototype.convertItem = function(s) {
- var c = s.indexOf('{)');
- if (c > 0)
- s = s.substring(c);
- if (s.indexOf('}') == -1)
- s += '}';
- return JSON.parse(s);
-};
http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/b677c658/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
deleted file mode 100644
index af2245d..0000000
--- a/frameworks/js/FlexJS/src/org/apache/flex/net/dataConverters/LazyCollection.js
+++ /dev/null
@@ -1,163 +0,0 @@
-/**
- * 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_net_dataConverters_LazyCollection');
-
-goog.require('org_apache_flex_events_EventDispatcher');
-goog.require('org_apache_flex_events_IEventDispatcher');
-
-
-
-/**
- * @constructor
- * @extends {org_apache_flex_events_EventDispatcher}
- */
-org_apache_flex_net_dataConverters_LazyCollection = function() {
- org_apache_flex_net_dataConverters_LazyCollection.base(this, 'constructor');
- /**
- * @private
- * @type {Object}
- */
- this.data_ = null;
-
- /**
- * @private
- * @type {Object}
- */
-
- this.itemConverter_ = null;
-
- /**
- * @private
- * @type {Object}
- */
- this.inputParser_ = null;
-
- /**
- * @private
- * @type {Object}
- */
- this.rawData_ = null;
-
- /**
- * @private
- * @type {Object}
- */
- this.strand_ = null;
-};
-goog.inherits(org_apache_flex_net_dataConverters_LazyCollection, org_apache_flex_events_EventDispatcher);
-
-
-/**
- * Metadata
- *
- * @type {Object.<string, Array.<Object>>}
- */
-org_apache_flex_net_dataConverters_LazyCollection.prototype.FLEXJS_CLASS_INFO =
- { names: [{ name: 'LazyCollection',
- qName: 'org_apache_flex_net_dataConverters_LazyCollection'}],
- interfaces: [org_apache_flex_events_IEventDispatcher]};
-
-
-Object.defineProperties(org_apache_flex_net_dataConverters_LazyCollection.prototype, {
- /** @expose */
- 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));
- }
- }
- },
- /** @expose */
- length: {
- /** @this {org_apache_flex_net_dataConverters_LazyCollection} */
- get: function() {
- return this.rawData_ ? this.rawData_.length : 0;
- }
- },
- /** @expose */
- 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;
- }
- },
- /** @expose */
- 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;
- }
- },
- /** @expose */
- 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'));
- }
- }
- }
-});
-
-
-/**
- * @private
- * @type {string}
- */
-org_apache_flex_net_dataConverters_LazyCollection.prototype.id_ = '';
-
-
-/**
- * @protected
- */
-org_apache_flex_net_dataConverters_LazyCollection.prototype.completeHandler =
- function() {
- var results = this.strand_.data;
- this.rawData_ = this.inputParser_.parseItems(results);
- this.data_ = [];
- this.dispatchEvent('complete');
-};
-
-
-/**
- * @expose
- * @param {number} index The index in the collection.
- * @return {Object} An item in the collection.
- */
-org_apache_flex_net_dataConverters_LazyCollection.prototype.getItemAt =
- function(index) {
- if (this.data_[index] === undefined) {
- this.data_[index] =
- this.itemConverter_.convertItem(this.rawData_[index]);
- }
-
- return this.data_[index];
-};
http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/b677c658/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
deleted file mode 100644
index 8e109df..0000000
--- a/frameworks/js/FlexJS/src/org/apache/flex/svg/TextButton.js
+++ /dev/null
@@ -1,89 +0,0 @@
-/**
- * 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_svg_TextButton');
-
-goog.require('org_apache_flex_core_UIBase');
-
-
-
-/**
- * @constructor
- * @extends {org_apache_flex_core_UIBase}
- */
-org_apache_flex_svg_TextButton = function() {
- org_apache_flex_svg_TextButton.base(this, 'constructor');
-};
-goog.inherits(org_apache_flex_svg_TextButton,
- org_apache_flex_core_UIBase);
-
-
-/**
- * Metadata
- *
- * @type {Object.<string, Array.<Object>>}
- */
-org_apache_flex_svg_TextButton.prototype.FLEXJS_CLASS_INFO =
- { names: [{ name: 'TextButton',
- qName: 'org_apache_flex_svg_TextButton'}] };
-
-
-/**
- * @override
- */
-org_apache_flex_svg_TextButton.prototype.createElement =
- function() {
- this.element = document.createElement('embed');
- this.element.setAttribute('src', 'org/apache/flex/svg/assets/TextButton_Skin.svg');
-
- this.positioner = this.element;
-
- return this.element;
-};
-
-
-/**
- * @override
- */
-org_apache_flex_svg_TextButton.prototype.finalizeElement =
- function() {
- var listenersArray;
- if (goog.events.hasListener(this.element, goog.events.EventType.CLICK)) {
- listenersArray = goog.events.getListeners(this.element, goog.events.EventType.CLICK, false);
-
- /* As we are assigning an actual function object instead of just the name,
- make sure to use a unique name ('clickHandler') instead of a native
- name, like 'click' or 'onclick'.
-
- Note: use array notation for property assignment so the compiler doesn't
- rename the property ;-)
- */
- this.element['clickHandler'] = listenersArray[0].listener;
- }
-};
-
-
-Object.defineProperties(org_apache_flex_svg_TextButton.prototype, {
- /** @expose */
- 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/b677c658/frameworks/js/FlexJS/src/org/apache/flex/svg/assets/TextButton_Skin.svg
----------------------------------------------------------------------
diff --git a/frameworks/js/FlexJS/src/org/apache/flex/svg/assets/TextButton_Skin.svg b/frameworks/js/FlexJS/src/org/apache/flex/svg/assets/TextButton_Skin.svg
deleted file mode 100644
index 7986725..0000000
--- a/frameworks/js/FlexJS/src/org/apache/flex/svg/assets/TextButton_Skin.svg
+++ /dev/null
@@ -1,279 +0,0 @@
-<?xml version="1.0" encoding="UTF-8" ?>
-<!--
-
- 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.
-
--->
-<svg xmlns="http://www.w3.org/2000/svg" version="1.1" class="button" width="100%" height="100%"
- onload="return init(evt)"
- onmouseover="return handleMouseOver(evt)"
- onmousedown="return handleMouseDown(evt)"
- onmouseup="return handleMouseUp(evt)"
- onmouseout="return handleMouseOut(evt)"
- onclick="handleOnClick(evt)"
- >
- <style type="text/css">
- .button {cursor: pointer;}
- </style>
-
- <script type="text/ecmascript">
- <![CDATA[
-
- var labelStr = "";
- var clickHandler;
-
- function init(event)
- {
- //Set Initial button state
- document.getElementById("button_up").style.display="inline";
- document.getElementById("button_over").style.display="none";
- document.getElementById("button_down").style.display="none";
-
- //Set label from the embed's frameElement.attributes values
- labelStr = window.frameElement.attributes["label"].value;
- var labelElement = document.getElementById("labelDisplay");
- labelElement.firstChild.nodeValue = labelStr;
-
- //Store callbacks
- clickHandler = window.frameElement.clickHandler;
- }
-
- function handleMouseOver(event)
- {
- document.getElementById("button_up").style.display="none";
- document.getElementById("button_over").style.display="inline";
- document.getElementById("button_down").style.display="none";
- }
-
- function handleMouseDown(event)
- {
- document.getElementById("button_up").style.display="none";
- document.getElementById("button_over").style.display="none";
- document.getElementById("button_down").style.display="inline";
- }
-
- function handleMouseUp(event)
- {
- document.getElementById("button_up").style.display="none";
- document.getElementById("button_over").style.display="inline";
- document.getElementById("button_down").style.display="none";
- }
-
- function handleMouseOut(event)
- {
- document.getElementById("button_up").style.display="inline";
- document.getElementById("button_over").style.display="none";
- document.getElementById("button_down").style.display="none";
- }
-
- function handleOnClick(evt)
- {
- clickHandler(evt,this);
- }
-
- ]]></script>
- <svg xmlns="http://www.w3.org/2000/svg" id="button_up" width="100%" height="100%" version="1.1" >
- <svg xmlns:xlink="http://www.w3.org/1999/xlink" version="1.1" left="-1" right="-1" top="-1" bottom="-1">
- <defs>
- <linearGradient id="button_up_idLinearGradientx63x32" gradientTransform="rotate(90)">
- <stop offset="0" stop-color="#000000" stop-opacity="0.01" />
- <stop offset="1" stop-color="#000000" stop-opacity="0.07" />
- </linearGradient>
- </defs>
- <rect id="button_up_shadow" rx="2" ry="2" width="100%" height="100%" style="fill:url(#button_up_idLinearGradientx63x32)" />
- </svg>
- <svg xmlns:xlink="http://www.w3.org/1999/xlink" version="1.1" left="1" right="1" top="1" bottom="1">
- <defs>
- <linearGradient id="button_up_idLinearGradientx63x54" gradientTransform="rotate(90)">
- <stop offset="0" stop-color="#FFFFFF" stop-opacity="0.85" />
- <stop offset="1" stop-color="#D8D8D8" stop-opacity="0.85" />
- </linearGradient>
- </defs>
- <rect id="button_up_fill" rx="2" ry="2" width="100%" height="100%" style="fill:url(#button_up_idLinearGradientx63x54)" />
- </svg>
- <svg xmlns:xlink="http://www.w3.org/1999/xlink" version="1.1" left="1" right="1" top="1" bottom="1">
- <defs>
- <linearGradient id="button_up_idLinearGradientx63x76" x1="0%" y1="100%" x2="0%" y2="0%">
- <stop offset="0.0" stop-color="#000000" stop-opacity="0.0627" />
- <stop offset="0.48" stop-color="#000000" stop-opacity="0.0099" />
- <stop offset="0.48001" stop-color="#000000" stop-opacity="0" />
- </linearGradient>
- </defs>
- <rect id="button_up_lowlight" rx="2" ry="2" width="100%" height="100%" style="fill:url(#button_up_idLinearGradientx63x76)" />
- </svg>
- <svg xmlns:xlink="http://www.w3.org/1999/xlink" version="1.1" left="1" right="1" top="1" bottom="1">
- <defs>
- <linearGradient id="button_up_idLinearGradientx63x100" gradientTransform="rotate(90)">
- <stop offset="0.0" stop-color="#FFFFFF" stop-opacity="0.33" />
- <stop offset="0.48" stop-color="#FFFFFF" stop-opacity="0.33" />
- <stop offset="0.48001" stop-color="#FFFFFF" stop-opacity="0" />
- </linearGradient>
- </defs>
- <rect id="button_up_highlight" rx="2" ry="2" width="100%" height="100%" style="fill:url(#button_up_idLinearGradientx63x100)" />
- </svg>
- <svg xmlns:xlink="http://www.w3.org/1999/xlink" version="1.1" left="1" right="1" top="1" bottom="1">
- <defs>
- <linearGradient id="button_up_idLinearGradientStrokex63x129" gradientTransform="rotate(90)">
- <stop offset="0" stop-color="#FFFFFF" />
- <stop offset="1" stop-color="#D8D8D8" />
- </linearGradient>
- </defs>
- <rect id="button_up_highlightStroke" rx="2" ry="2" width="100%" height="100%" fill="none" style="stroke-width:2;stroke:url(#button_up_idLinearGradientStrokex63x129)" />
- </svg>
- <svg xmlns:xlink="http://www.w3.org/1999/xlink" version="1.1" left="0" right="0" top="0" bottom="0">
- <defs>
- <linearGradient id="button_up_idLinearGradientStrokex63x205" gradientTransform="rotate(90)">
- <stop offset="0" stop-color="#000000" stop-opacity="0.5625" />
- <stop offset="1" stop-color="#000000" stop-opacity="0.75" />
- </linearGradient>
- </defs>
- <rect id="button_up_border" rx="2" ry="2" width="100%" height="100%" fill="none" style="stroke-width:2;stroke:url(#button_up_idLinearGradientStrokex63x205)" />
- </svg>
- </svg>
-
- <svg xmlns="http://www.w3.org/2000/svg" id="button_over" width="100%" height="100%" version="1.1" >
- <svg xmlns:xlink="http://www.w3.org/1999/xlink" version="1.1" left="-1" right="-1" top="-1" bottom="-1">
- <defs>
- <linearGradient id="button_over_idLinearGradientx63x32" gradientTransform="rotate(90)">
- <stop offset="0" stop-color="#000000" stop-opacity="0.01" />
- <stop offset="1" stop-color="#000000" stop-opacity="0.07" />
- </linearGradient>
- </defs>
- <rect id="button_over_shadow" rx="2" ry="2" width="100%" height="100%" style="fill:url(#button_over_idLinearGradientx63x32)" />
- </svg>
- <svg xmlns:xlink="http://www.w3.org/1999/xlink" version="1.1" left="1" right="1" top="1" bottom="1">
- <defs>
- <linearGradient id="button_over_idLinearGradientx63x54" gradientTransform="rotate(90)">
- <stop offset="0" stop-color="#BBBDBD" stop-opacity="0.85" />
- <stop offset="1" stop-color="#9FA0A1" stop-opacity="0.85" />
- </linearGradient>
- </defs>
- <rect id="button_over_fill" rx="2" ry="2" width="100%" height="100%" style="fill:url(#button_over_idLinearGradientx63x54)" />
- </svg>
- <svg xmlns:xlink="http://www.w3.org/1999/xlink" version="1.1" left="1" right="1" top="1" bottom="1">
- <defs>
- <linearGradient id="button_over_idLinearGradientx63x76" x1="0%" y1="100%" x2="0%" y2="0%">
- <stop offset="0.0" stop-color="#000000" stop-opacity="0.0627" />
- <stop offset="0.48" stop-color="#000000" stop-opacity="0.0099" />
- <stop offset="0.48001" stop-color="#000000" stop-opacity="0" />
- </linearGradient>
- </defs>
- <rect id="button_over_lowlight" rx="2" ry="2" width="100%" height="100%" style="fill:url(#button_over_idLinearGradientx63x76)" />
- </svg>
- <svg xmlns:xlink="http://www.w3.org/1999/xlink" version="1.1" left="1" right="1" top="1" bottom="1">
- <defs>
- <linearGradient id="button_over_idLinearGradientx63x100" gradientTransform="rotate(90)">
- <stop offset="0.0" stop-color="#FFFFFF" stop-opacity="0.22" />
- <stop offset="0.48" stop-color="#FFFFFF" stop-opacity="0.22" />
- <stop offset="0.48001" stop-color="#FFFFFF" stop-opacity="0" />
- </linearGradient>
- </defs>
- <rect id="button_over_highlight" rx="2" ry="2" width="100%" height="100%" style="fill:url(#button_over_idLinearGradientx63x100)" />
- </svg>
- <svg xmlns:xlink="http://www.w3.org/1999/xlink" version="1.1" left="1" right="1" top="1" bottom="1">
- <defs>
- <linearGradient id="button_over_idLinearGradientStrokex63x129" gradientTransform="rotate(90)">
- <stop offset="0" stop-color="#FFFFFF" stop-opacity="0.22" />
- <stop offset="1" stop-color="#D8D8D8" stop-opacity="0.22" />
- </linearGradient>
- </defs>
- <rect id="button_over_highlightStroke" rx="2" ry="2" width="100%" height="100%" fill="none" style="stroke-width:2;stroke:url(#button_over_idLinearGradientStrokex63x129)" />
- </svg>
- <svg xmlns:xlink="http://www.w3.org/1999/xlink" version="1.1" left="0" right="0" top="0" bottom="0">
- <defs>
- <linearGradient id="button_over_idLinearGradientStrokex63x205" gradientTransform="rotate(90)">
- <stop offset="0" stop-color="#000000" stop-opacity="0.5625" />
- <stop offset="1" stop-color="#000000" stop-opacity="0.75" />
- </linearGradient>
- </defs>
- <rect id="button_over_border" width="100%" height="100%" rx="2" ry="2" fill="none" style="stroke-width:2;stroke:url(#button_over_idLinearGradientStrokex63x205)" />
- </svg>
- </svg>
- <svg xmlns="http://www.w3.org/2000/svg" id="button_down" width="100%" height="100%" version="1.1" >
- <svg xmlns:xlink="http://www.w3.org/1999/xlink" version="1.1" left="-1" right="-1" top="-1" bottom="-1">
- <defs>
- <linearGradient id="button_down_idLinearGradientx63x32" gradientTransform="rotate(90)">
- <stop offset="0" stop-color="#FFFFFF" stop-opacity="0" />
- <stop offset="1" stop-color="#FFFFFF" stop-opacity="0.5" />
- </linearGradient>
- </defs>
- <rect id="button_down_shadow" rx="2" ry="2" width="100%" height="100%" style="fill:url(#button_down_idLinearGradientx63x32)" />
- </svg>
- <svg xmlns:xlink="http://www.w3.org/1999/xlink" version="1.1" left="1" right="1" top="1" bottom="1">
- <defs>
- <linearGradient id="button_down_idLinearGradientx63x54" gradientTransform="rotate(90)">
- <stop offset="0" stop-color="#AAAAAA" stop-opacity="0.85" />
- <stop offset="1" stop-color="#929496" stop-opacity="0.85" />
- </linearGradient>
- </defs>
- <rect id="button_down_fill" rx="2" ry="2" width="100%" height="100%" style="fill:url(#button_down_idLinearGradientx63x54)" />
- </svg>
- <svg xmlns:xlink="http://www.w3.org/1999/xlink" version="1.1" left="1" right="1" top="1" bottom="1">
- <defs>
- <linearGradient id="button_down_idLinearGradientx63x76" x1="0%" y1="100%" x2="0%" y2="0%">
- <stop offset="0.0" stop-color="#000000" stop-opacity="0.0627" />
- <stop offset="0.48" stop-color="#000000" stop-opacity="0.0099" />
- <stop offset="0.48001" stop-color="#000000" stop-opacity="0" />
- </linearGradient>
- </defs>
- <rect id="button_down_lowlight" rx="2" ry="2" width="100%" height="100%" style="fill:url(#button_down_idLinearGradientx63x76)" />
- </svg>
- <svg xmlns:xlink="http://www.w3.org/1999/xlink" version="1.1" left="1" right="1" top="1" bottom="1">
- <defs>
- <linearGradient id="button_down_idLinearGradientx63x100" gradientTransform="rotate(90)">
- <stop offset="0.0" stop-color="#FFFFFF" stop-opacity="0.12" />
- <stop offset="0.48" stop-color="#FFFFFF" stop-opacity="0.12" />
- <stop offset="0.48001" stop-color="#FFFFFF" stop-opacity="0" />
- </linearGradient>
- </defs>
- <rect id="button_down_highlight" rx="2" ry="2" width="100%" height="100%" style="fill:url(#button_down_idLinearGradientx63x100)" />
- </svg>
- <svg xmlns:xlink="http://www.w3.org/1999/xlink" version="1.1" left="1" right="1" top="1" bottom="1">
- <defs>
- <linearGradient id="button_down_idLinearGradientStrokex63x149" gradientTransform="rotate(90)">
- <stop offset="0.0" stop-color="#000000" stop-opacity="0.25" />
- <stop offset="0.001" stop-color="#000000" stop-opacity="0.25" />
- <stop offset="0.0011" stop-color="#000000" stop-opacity="0.07" />
- <stop offset="0.965" stop-color="#000000" stop-opacity="0.07" />
- <stop offset="0.9651" stop-color="#000000" stop-opacity="0.00" />
- </linearGradient>
- </defs>
- <rect id="button_down_hldownstroke1" rx="2" ry="2" width="100%" height="100%" fill="none" style="stroke-width:2;stroke:url(#button_down_idLinearGradientStrokex63x149)" />
- </svg>
- <svg xmlns:xlink="http://www.w3.org/1999/xlink" version="1.1" left="2" right="2" top="2" bottom="2">
- <defs>
- <linearGradient id="button_down_idLinearGradientStrokex63x182" gradientTransform="rotate(90)">
- <stop offset="0.0" stop-color="#000000" stop-opacity="0.09" />
- <stop offset="0.0001" stop-color="#000000" stop-opacity="0.00" />
- </linearGradient>
- </defs>
- <rect id="button_down_hldownstroke2" rx="2" ry="2" width="100%" height="100%" fill="none" style="stroke-width:2;stroke:url(#button_down_idLinearGradientStrokex63x182)" />
- </svg>
- <svg xmlns:xlink="http://www.w3.org/1999/xlink" version="1.1" left="0" right="0" top="0" bottom="0">
- <defs>
- <linearGradient id="button_down_idLinearGradientStrokex63x205" gradientTransform="rotate(90)">
- <stop offset="0" stop-color="#000000" stop-opacity="0.6375" />
- <stop offset="1" stop-color="#000000" stop-opacity="0.85" />
- </linearGradient>
- </defs>
- <rect id="button_down_border" width="100%" height="100%" rx="2" ry="2" fill="none" style="stroke-width:2;stroke:url(#button_down_idLinearGradientStrokex63x205)" />
- </svg>
- </svg>
- <svg id="labelDisplaySVG" xmlns="http://www.w3.org/2000/svg" width="100%" height="100%" version="1.1" >
- <text id="labelDisplay" text-anchor="middle" font-family="verdana" font-size="12" dy=".3em" x="50%" y="50%" > </text>
- </svg>
- <rect id="mouse_catcher" width="100%" height="100%" fill="none" pointer-events="all"/>
-</svg>
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/b677c658/frameworks/js/FlexJS/src/org/apache/flex/utils/BeadMetrics.js
----------------------------------------------------------------------
diff --git a/frameworks/js/FlexJS/src/org/apache/flex/utils/BeadMetrics.js b/frameworks/js/FlexJS/src/org/apache/flex/utils/BeadMetrics.js
deleted file mode 100644
index 98de8da..0000000
--- a/frameworks/js/FlexJS/src/org/apache/flex/utils/BeadMetrics.js
+++ /dev/null
@@ -1,48 +0,0 @@
-/**
- * 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_utils_BeadMetrics');
-
-goog.require('org_apache_flex_core_UIMetrics');
-
-
-
-/**
- * @constructor
- */
-org_apache_flex_utils_BeadMetrics = function() {
-};
-
-
-/**
- * @expose
- * @param {org_apache_flex_core_IStrand} strand The strand whose bounds are required.
- * @return {org_apache_flex_core_UIMetrics} The bounding box.
- */
-org_apache_flex_utils_BeadMetrics.getMetrics = function(strand) {
- var box = new org_apache_flex_core_UIMetrics();
- var style = strand.element.style;
- if (style['padding']) {
- box.top = Number(style.padding);
- box.left = Number(style.padding);
- box.right = Number(style.padding);
- box.bottom = Number(style.padding);
- } else {
- if (style['padding_top']) box.top = Number(style.padding_top);
- if (style['padding_left']) box.left = Number(style.padding_left);
- if (style['padding_right']) box.right = Number(style.padding_right);
- if (style['padding_bottom']) box.bottom = Number(style.padding_bottom);
- }
- return box;
-};
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/b677c658/frameworks/js/FlexJS/src/org/apache/flex/utils/BinaryData.js
----------------------------------------------------------------------
diff --git a/frameworks/js/FlexJS/src/org/apache/flex/utils/BinaryData.js b/frameworks/js/FlexJS/src/org/apache/flex/utils/BinaryData.js
deleted file mode 100644
index 0437029..0000000
--- a/frameworks/js/FlexJS/src/org/apache/flex/utils/BinaryData.js
+++ /dev/null
@@ -1,223 +0,0 @@
-/**
- * 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_utils_BinaryData');
-
-
-
-/**
- * @constructor
- */
-org_apache_flex_utils_BinaryData = function() {
-
- /**
- * @private
- * @type {ArrayBuffer}
- */
- this.data_ = new ArrayBuffer();
-
- /**
- * @private
- * @type {number}
- */
- this.position_ = 0;
-
-};
-
-
-/**
- * Metadata
- *
- * @type {Object.<string, Array.<Object>>}
- */
-org_apache_flex_utils_BinaryData.prototype.FLEXJS_CLASS_INFO =
- { names: [{ name: 'BinaryData',
- qName: 'org_apache_flex_utils_BinaryData'}] };
-
-
-Object.defineProperties(org_apache_flex_utils_BinaryData.prototype, {
- /** @expose */
- data: {
- /** @this {org_apache_flex_utils_BinaryData} */
- get: function() {
- return this.data_;
- }
- },
- /** @expose */
- position: {
- /** @this {org_apache_flex_utils_BinaryData} */
- get: function() {
- return this.position_;
- },
- /** @this {org_apache_flex_utils_BinaryData} */
- set: function(value) {
- this.position_ = value;
- }
- },
- /** @expose */
- length: {
- /** @this {org_apache_flex_utils_BinaryData} */
- get: function() {
- return this.data_.byteLength;
- }
- },
- /** @expose */
- bytesAvailable: {
- /** @this {org_apache_flex_utils_BinaryData} */
- get: function() {
- return this.data_.byteLength - this.position_;
- }
- }
-});
-
-
-/**
- * @expose
- * @param {number} b The byte to write.
- */
-org_apache_flex_utils_BinaryData.prototype.writeByte = function(b) {
- var view;
-
- this.growBuffer(1);
-
- view = new Int8Array(this.data_, this.position_, 1);
- view[0] = b;
- this.position_++;
-};
-
-
-/**
- * @expose
- * @param {number} s The 16-bit integer to write.
- */
-org_apache_flex_utils_BinaryData.prototype.writeShort = function(s) {
- var view;
-
- this.growBuffer(2);
-
- view = new Int16Array(this.data_, this.position_, 1);
- view[0] = s;
- this.position_ += 2;
-};
-
-
-/**
- * @expose
- * @param {number} num The 32-bit integer to write.
- */
-org_apache_flex_utils_BinaryData.prototype.writeInt = function(num) {
- var view;
-
- this.growBuffer(4);
-
- view = new Int32Array(this.data_, this.position_, 1);
- view[0] = num;
- this.position_ += 4;
-};
-
-
-/**
- * @expose
- * @param {number} num The 32-bit unsigned integer to write.
- */
-org_apache_flex_utils_BinaryData.prototype.writeUnsignedInt =
- function(num) {
- var view;
-
- this.growBuffer(4);
-
- view = new Uint32Array(this.data_, this.position_, 1);
- view[0] = num;
- this.position_ += 4;
-};
-
-
-/**
- * @expose
- * @return {number} The byte that was read.
- */
-org_apache_flex_utils_BinaryData.prototype.readByte = function() {
- var view;
-
- view = new Int8Array(this.data_, this.position_, 1);
- this.position_++;
- return view[0];
-};
-
-
-/**
- * @expose
- * @return {number} The 16-bit integer that was read.
- */
-org_apache_flex_utils_BinaryData.prototype.readShort = function() {
- var view;
-
- view = new Int16Array(this.data_, this.position_, 1);
- this.position_ += 2;
- return view[0];
-};
-
-
-/**
- * @expose
- * @return {number} The 32-bit integer that was read.
- */
-org_apache_flex_utils_BinaryData.prototype.readInteger = function() {
- var view;
-
- view = new Int32Array(this.data_, this.position_, 1);
- this.position_ += 4;
- return view[0];
-};
-
-
-/**
- * @expose
- * @return {number} The 32-bit unsigned integer that was read.
- */
-org_apache_flex_utils_BinaryData.prototype.readUnsignedInteger =
- function() {
- var view;
-
- view = new Uint32Array(this.data_, this.position_, 1);
- this.position_ += 4;
- return view[0];
-};
-
-
-/**
- * @expose
- * @param {number} extra The number of bytes to add to the buffer.
- */
-org_apache_flex_utils_BinaryData.prototype.growBuffer = function(extra) {
- var newBuffer, newView, view, i, n;
-
- if (this.position_ >= this.data_.byteLength)
- {
- n = this.data_.byteLength;
- newBuffer = new ArrayBuffer(n + extra);
- newView = new Int8Array(newBuffer, 0, n);
- view = new Int8Array(this.data_, 0, n);
- for (i = 0; i < n; i++)
- {
- newView[i] = view[i];
- }
- this.data_ = newBuffer;
- }
-};
-
-
-
-
-
http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/b677c658/frameworks/js/FlexJS/src/org/apache/flex/utils/EffectTimer.js
----------------------------------------------------------------------
diff --git a/frameworks/js/FlexJS/src/org/apache/flex/utils/EffectTimer.js b/frameworks/js/FlexJS/src/org/apache/flex/utils/EffectTimer.js
deleted file mode 100644
index 79d9d68..0000000
--- a/frameworks/js/FlexJS/src/org/apache/flex/utils/EffectTimer.js
+++ /dev/null
@@ -1,94 +0,0 @@
-/**
- * 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_utils_EffectTimer');
-
-goog.require('org_apache_flex_core_IEffectTimer');
-goog.require('org_apache_flex_core_ValuesManager');
-goog.require('org_apache_flex_events_EventDispatcher');
-goog.require('org_apache_flex_events_ValueEvent');
-
-
-
-/**
- * @constructor
- * @extends {org_apache_flex_events_EventDispatcher}
- * @suppress {checkTypes}
- */
-org_apache_flex_utils_EffectTimer = function() {
- org_apache_flex_utils_EffectTimer.base(this, 'constructor');
-
- /**
- * @protected
- * @type {number}
- */
- this.timerInterval = -1;
-
- /**
- * @protected
- * @type {number}
- */
- this._delay = org_apache_flex_core_ValuesManager.valuesImpl.getValue(this,
- 'effectTimerInterval');
-
-};
-goog.inherits(org_apache_flex_utils_EffectTimer,
- org_apache_flex_events_EventDispatcher);
-
-
-/**
- * Metadata
- *
- * @type {Object.<string, Array.<Object>>}
- */
-org_apache_flex_utils_EffectTimer.prototype.FLEXJS_CLASS_INFO =
- { names: [{ name: 'EffectTimer',
- qName: 'org_apache_flex_utils_EffectTimer'}],
- interfaces: [org_apache_flex_core_IEffectTimer] };
-
-
-/**
- * @expose
- * Stops the timer.
- */
-org_apache_flex_utils_EffectTimer.prototype.stop = function() {
- clearInterval(this.timerInterval);
- this.timerInterval = -1;
-};
-
-
-/**
- * @expose
- * Starts the timer.
- * @return {number} The start time.
- */
-org_apache_flex_utils_EffectTimer.prototype.start = function() {
- this.timerInterval =
- setInterval(goog.bind(this.timerHandler, this), this._delay);
- var d = new Date();
- return d.getTime();
-};
-
-
-/**
- * @protected
- */
-org_apache_flex_utils_EffectTimer.prototype.timerHandler =
- function() {
- var d = new Date();
- this.dispatchEvent(new org_apache_flex_events_ValueEvent('update', d.getTime()));
-
-};
-
-
http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/b677c658/frameworks/js/FlexJS/src/org/apache/flex/utils/Language.js
----------------------------------------------------------------------
diff --git a/frameworks/js/FlexJS/src/org/apache/flex/utils/Language.js b/frameworks/js/FlexJS/src/org/apache/flex/utils/Language.js
deleted file mode 100644
index b890dac..0000000
--- a/frameworks/js/FlexJS/src/org/apache/flex/utils/Language.js
+++ /dev/null
@@ -1,295 +0,0 @@
-/**
- * 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_utils_Language');
-
-
-
-/**
- * @constructor
- */
-org_apache_flex_utils_Language = function() {
-};
-
-
-/**
- * Metadata
- *
- * @type {Object.<string, Array.<Object>>}
- */
-org_apache_flex_utils_Language.prototype.FLEXJS_CLASS_INFO =
- { names: [{ name: 'Language',
- qName: 'org_apache_flex_utils_Language'}] };
-
-
-/**
- * as()
- *
- * @expose
- * @param {?} leftOperand The lefthand operand of the
- * binary as operator in AS3.
- * @param {?} rightOperand The righthand operand of the
- * binary operator in AS3.
- * @param {?=} opt_coercion The cast is a coercion,
- * throw expception if it fails.
- * @return {?} Returns the lefthand operand if it is of the
- * type of the righthand operand, otherwise null.
- */
-org_apache_flex_utils_Language.as = function(leftOperand, rightOperand, opt_coercion) {
- var error, itIs, message;
-
- opt_coercion = (opt_coercion !== undefined) ? opt_coercion : false;
-
- itIs = org_apache_flex_utils_Language.is(leftOperand, rightOperand);
-
- if (!itIs && opt_coercion) {
- message = 'Type Coercion failed';
- if (TypeError) {
- error = new TypeError(message);
- } else {
- error = new Error(message);
- }
- throw error;
- }
-
- return (itIs) ? leftOperand : null;
-};
-
-
-/**
- * int()
- *
- * @expose
- * @param {?} value The value to be cast.
- * @return {number}
- */
-org_apache_flex_utils_Language._int = function(value) {
- return value >> 0;
-};
-
-
-/**
- * is()
- *
- * @expose
- * @param {?} leftOperand The lefthand operand of the
- * binary as operator in AS3.
- * @param {?} rightOperand The righthand operand of the
- * binary operator in AS3.
- * @return {boolean}
- */
-org_apache_flex_utils_Language.is = function(leftOperand, rightOperand) {
- var checkInterfaces, superClass;
-
- if (!leftOperand)
- return false;
-
- if (leftOperand && !rightOperand) {
- return false;
- }
-
- checkInterfaces = function(left) {
- var i, interfaces;
-
- interfaces = left.FLEXJS_CLASS_INFO.interfaces;
- for (i = interfaces.length - 1; i > -1; i--) {
- if (interfaces[i] === rightOperand) {
- return true;
- }
-
- if (interfaces[i].prototype.FLEXJS_CLASS_INFO.interfaces) {
- var isit = checkInterfaces(new interfaces[i]());
- if (isit) return true;
- }
- }
-
- return false;
- };
-
- if ((rightOperand === String && typeof leftOperand === 'string') ||
- (leftOperand instanceof /** @type {Object} */(rightOperand))) {
- return true;
- }
- if (typeof leftOperand === 'string')
- return false; // right was not String otherwise exit above
- if (typeof leftOperand === 'number')
- return rightOperand === Number;
- if (rightOperand === Array && Array.isArray(leftOperand))
- return true;
- if (leftOperand.FLEXJS_CLASS_INFO === undefined)
- return false; // could be a function but not an instance
- if (leftOperand.FLEXJS_CLASS_INFO.interfaces) {
- if (checkInterfaces(leftOperand)) {
- return true;
- }
- }
-
- superClass = leftOperand.constructor.superClass_;
- if (superClass) {
- while (superClass && superClass.FLEXJS_CLASS_INFO) {
- if (superClass.FLEXJS_CLASS_INFO.interfaces) {
- if (checkInterfaces(superClass)) {
- return true;
- }
- }
- superClass = superClass.constructor.superClass_;
- }
- }
-
- return false;
-};
-
-
-/**
- * trace()
- *
- * @expose
- * @param {...Object} var_args The message(s) to be written to the console.
- */
-org_apache_flex_utils_Language.trace = function(var_args) {
- var theConsole;
-
- var msg = '';
- for (var i = 0; i < arguments.length; i++) {
- if (i > 0) msg += ' ';
- msg += arguments[i];
- }
-
- theConsole = goog.global.console;
-
- if (theConsole === undefined && window.console !== undefined)
- theConsole = window.console;
-
- try {
- if (theConsole && theConsole.log) {
- theConsole.log(msg);
- }
- } catch (e) {
- // ignore; at least we tried ;-)
- }
-};
-
-
-/**
- * uint()
- *
- * @expose
- * @param {?} value The value to be cast.
- * @return {number}
- */
-org_apache_flex_utils_Language.uint = function(value) {
- return value >>> 0;
-};
-
-
-/**
- * preincrement handles --foo
- *
- * @expose
- * @param {Object} obj The object with the getter/setter.
- * @param {string} prop The name of a property.
- * @return {number}
- */
-org_apache_flex_utils_Language.preincrement = function(obj, prop) {
- var value = obj[prop] + 1;
- obj[prop] = value;
- return value;
-};
-
-
-/**
- * predecrement handles ++foo
- *
- * @expose
- * @param {Object} obj The object with the getter/setter.
- * @param {string} prop The name of a property.
- * @return {number}
- */
-org_apache_flex_utils_Language.predecrement = function(obj, prop) {
- var value = obj[prop] - 1;
- obj[prop] = value;
- return value;
-};
-
-
-/**
- * postincrement handles foo++
- *
- * @expose
- * @param {Object} obj The object with the getter/setter.
- * @param {string} prop The name of a property.
- * @return {number}
- */
-org_apache_flex_utils_Language.postincrement = function(obj, prop) {
- var value = obj[prop];
- obj[prop] = value + 1;
- return value;
-};
-
-
-/**
- * postdecrement handles foo++
- *
- * @expose
- * @param {Object} obj The object with the getter/setter.
- * @param {string} prop The name of a property.
- * @return {number}
- */
-org_apache_flex_utils_Language.postdecrement = function(obj, prop) {
- var value = obj[prop];
- obj[prop] = value + 1;
- return value;
-};
-
-
-/**
- * superGetter calls the getter on the given class' superclass.
- *
- * @expose
- * @param {Object} clazz The class.
- * @param {Object} pthis The this pointer.
- * @param {string} prop The name of the getter.
- * @return {Object}
- */
-org_apache_flex_utils_Language.superGetter = function(clazz, pthis, prop) {
- var superClass = clazz.superClass_;
- var superdesc = Object.getOwnPropertyDescriptor(superClass, prop);
- while (superdesc == null)
- {
- superClass = superClass.constructor.superClass_;
- superdesc = Object.getOwnPropertyDescriptor(superClass, prop);
- }
- return superdesc.get.call(pthis);
-};
-
-
-/**
- * superSetter calls the setter on the given class' superclass.
- *
- * @expose
- * @param {Object} clazz The class.
- * @param {Object} pthis The this pointer.
- * @param {string} prop The name of the getter.
- * @param {Object} value The value.
- */
-org_apache_flex_utils_Language.superSetter = function(clazz, pthis, prop, value) {
- var superClass = clazz.superClass_;
- var superdesc = Object.getOwnPropertyDescriptor(superClass, prop);
- while (superdesc == null)
- {
- superClass = superClass.constructor.superClass_;
- superdesc = Object.getOwnPropertyDescriptor(superClass, prop);
- }
- superdesc.set.apply(pthis, [value]);
-};