Remove obsolete files Signed-off-by: Erik de Bruin <[email protected]>
Project: http://git-wip-us.apache.org/repos/asf/flex-asjs/repo Commit: http://git-wip-us.apache.org/repos/asf/flex-asjs/commit/8f6d2cde Tree: http://git-wip-us.apache.org/repos/asf/flex-asjs/tree/8f6d2cde Diff: http://git-wip-us.apache.org/repos/asf/flex-asjs/diff/8f6d2cde Branch: refs/heads/develop Commit: 8f6d2cde8d63f392ae0580452c6499c9b36e6269 Parents: 97c1fd8 Author: Erik de Bruin <[email protected]> Authored: Fri Oct 24 13:46:00 2014 +0200 Committer: Erik de Bruin <[email protected]> Committed: Fri Oct 31 17:02:00 2014 +0100 ---------------------------------------------------------------------- .../vf2js/src/org/apache/flex/utils/Language.js | 186 ------------------- .../js/vf2js/src/vf2js_mx/components/Button.js | 24 --- .../vf2js/src/vf2js_s/components/Application.js | 30 --- .../js/vf2js/src/vf2js_s/components/Button.css | 17 -- .../js/vf2js/src/vf2js_s/components/Button.js | 163 ---------------- .../src/vf2js_s/components/ButtonRenderer.js | 92 --------- vf2js/frameworks/js/vf2js/tests.html | 35 ---- 7 files changed, 547 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/8f6d2cde/vf2js/frameworks/js/vf2js/src/org/apache/flex/utils/Language.js ---------------------------------------------------------------------- diff --git a/vf2js/frameworks/js/vf2js/src/org/apache/flex/utils/Language.js b/vf2js/frameworks/js/vf2js/src/org/apache/flex/utils/Language.js deleted file mode 100644 index 619edb1..0000000 --- a/vf2js/frameworks/js/vf2js/src/org/apache/flex/utils/Language.js +++ /dev/null @@ -1,186 +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; - - // (erikdebruin) we intentionally DON'T do null checks on the - // [class].FLEXJS_CLASS_INFO property, as it MUST be - // declared for every FLEXJS JS (framework) class - - 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) { - return checkInterfaces(new interfaces[i]()); - } - } - - return false; - }; - - if ((rightOperand === String && typeof leftOperand === 'string') || - (leftOperand instanceof /** @type {Object} */(rightOperand))) { - return true; - } - if ((rightOperand === Number && typeof leftOperand === 'number') || - (leftOperand instanceof /** @type {Object} */(rightOperand))) { - return true; - } - - 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 {string=} opt_value The message to be written to the console. - */ -org.apache.flex.utils.Language.trace = function(opt_value) { - var theConsole; - - opt_value = (opt_value !== undefined) ? opt_value : ''; - - theConsole = goog.global.console; - - if (theConsole === undefined && window.console !== undefined) - theConsole = window.console; - - try { - if (theConsole && theConsole.log) { - theConsole.log(opt_value); - } - } 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; -}; http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/8f6d2cde/vf2js/frameworks/js/vf2js/src/vf2js_mx/components/Button.js ---------------------------------------------------------------------- diff --git a/vf2js/frameworks/js/vf2js/src/vf2js_mx/components/Button.js b/vf2js/frameworks/js/vf2js/src/vf2js_mx/components/Button.js deleted file mode 100644 index 6e984b8..0000000 --- a/vf2js/frameworks/js/vf2js/src/vf2js_mx/components/Button.js +++ /dev/null @@ -1,24 +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. - */ - -'use strict'; - -goog.provide('vf2js_mx.components.Button'); - - - -/** - * @constructor - */ -vf2js_mx.components.Button = function() {}; \ No newline at end of file http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/8f6d2cde/vf2js/frameworks/js/vf2js/src/vf2js_s/components/Application.js ---------------------------------------------------------------------- diff --git a/vf2js/frameworks/js/vf2js/src/vf2js_s/components/Application.js b/vf2js/frameworks/js/vf2js/src/vf2js_s/components/Application.js deleted file mode 100644 index 247b13c..0000000 --- a/vf2js/frameworks/js/vf2js/src/vf2js_s/components/Application.js +++ /dev/null @@ -1,30 +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. - */ - -/** - * @fileoverview 'Spark' Application class. - * - * @author [email protected] (Erik de Bruin) - */ - -'use strict'; - -goog.provide('vf2js_s.components.Application'); - - - -/** - * @constructor - */ -vf2js_s.components.Application = function() {}; http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/8f6d2cde/vf2js/frameworks/js/vf2js/src/vf2js_s/components/Button.css ---------------------------------------------------------------------- diff --git a/vf2js/frameworks/js/vf2js/src/vf2js_s/components/Button.css b/vf2js/frameworks/js/vf2js/src/vf2js_s/components/Button.css deleted file mode 100644 index 4d05b32..0000000 --- a/vf2js/frameworks/js/vf2js/src/vf2js_s/components/Button.css +++ /dev/null @@ -1,17 +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. - */ - -.vf2js_s-components-buttonrenderer { - color: red; -} \ No newline at end of file http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/8f6d2cde/vf2js/frameworks/js/vf2js/src/vf2js_s/components/Button.js ---------------------------------------------------------------------- diff --git a/vf2js/frameworks/js/vf2js/src/vf2js_s/components/Button.js b/vf2js/frameworks/js/vf2js/src/vf2js_s/components/Button.js deleted file mode 100644 index a0beed4..0000000 --- a/vf2js/frameworks/js/vf2js/src/vf2js_s/components/Button.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. - */ - -/** - * @fileoverview A 'Spark' button component. - * - * @author [email protected] (Erik de Bruin) - */ - -'use strict'; - -goog.provide('vf2js_s.components.Button'); - -goog.require('goog.ui.Control'); -goog.require('vf2js_s.components.ButtonRenderer'); - - - -/** - * @constructor - * - * @extends {goog.ui.Control} - */ -vf2js_s.components.Button = function() { - vf2js_s.components.Button.base(this, 'constructor'); -}; -goog.inherits(vf2js_s.components.Button, goog.ui.Control); - - -//------------------------------------------------------------------------------ -// -// Enums -// -//------------------------------------------------------------------------------ - - -/** - * IdFragment - * - * @enum {string} - */ -vf2js_s.components.Button.IdFragment = { - BUTTON: 'button' -}; - - -//------------------------------------------------------------------------------ -// -// Properties -// -//------------------------------------------------------------------------------ - - -//-------------------------------------- -// id -//-------------------------------------- - -/** - * @type {string} - */ -vf2js_s.components.Button.prototype.id; - - -//-------------------------------------- -// label -//-------------------------------------- - -/** - * @private - * - * @type {string} - */ -vf2js_s.components.Button.prototype.label_; - -/** - * @type {string} - */ -vf2js_s.components.Button.prototype.label; - -Object.defineProperty(vf2js_s.components.Button.prototype, 'label', { - get: function () { - return this.label_; - }, - set: function (value) { - var /** @type {Element} */ element; - - this.label_ = value; - - element = this.getElement(); - if (element) { - element.firstChild.value = this.label_; - } - } -}); - - -//------------------------------------------------------------------------------ -// -// Methods -// -//------------------------------------------------------------------------------ - - -/** - * enterDocument - * - * @inheritDoc - */ -vf2js_s.components.Button.prototype.enterDocument = function() { - vf2js_s.components.Button.base(this, 'enterDocument'); - - this.setId(this.id); - - this.label = this.label_; - - // - add handlers using 'this.getHandler()' -}; - - -/** - * exitDocument - * - * @inheritDoc - */ -vf2js_s.components.Button.prototype.exitDocument = function() { - vf2js_s.components.Button.base(this, 'exitDocument'); - - // - remove handlers that are not attached with 'this.getHandler()' -}; - - -/** - * disposeInternal - * - * @inheritDoc - */ -vf2js_s.components.Button.prototype.disposeInternal = function() { - vf2js_s.components.Button.base(this, 'disposeInternal'); - - // -}; - - -//------------------------------------------------------------------------------ -// -// Metadata -// -//------------------------------------------------------------------------------ - - -goog.ui.registry.setDefaultRenderer(vf2js_s.components.Button, - vf2js_s.components.ButtonRenderer); http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/8f6d2cde/vf2js/frameworks/js/vf2js/src/vf2js_s/components/ButtonRenderer.js ---------------------------------------------------------------------- diff --git a/vf2js/frameworks/js/vf2js/src/vf2js_s/components/ButtonRenderer.js b/vf2js/frameworks/js/vf2js/src/vf2js_s/components/ButtonRenderer.js deleted file mode 100644 index 009e9b3..0000000 --- a/vf2js/frameworks/js/vf2js/src/vf2js_s/components/ButtonRenderer.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. - */ - -/** - * @fileoverview The renderer for 'Spark' button components. - * - * @author [email protected] (Erik de Bruin) - */ - -'use strict'; - -goog.provide('vf2js_s.components.ButtonRenderer'); - -goog.require('goog.ui.ControlRenderer'); - - - -/** - * @constructor - * - * @extends {goog.ui.ControlRenderer} - */ -vf2js_s.components.ButtonRenderer = function() { - vf2js_s.components.ButtonRenderer.base(this, 'constructor'); -}; -goog.inherits(vf2js_s.components.ButtonRenderer, goog.ui.ControlRenderer); -goog.addSingletonGetter(vf2js_s.components.ButtonRenderer); - - -//------------------------------------------------------------------------------ -// -// Static Constants -// -//------------------------------------------------------------------------------ - - -/** - * CSS_CLASS - * - * @const - * - * @type {string} - */ -vf2js_s.components.ButtonRenderer.CSS_CLASS = - 'vf2js_s-components-buttonrenderer'; - - -//------------------------------------------------------------------------------ -// -// Methods -// -//------------------------------------------------------------------------------ - - -/** - * getCssClass - * - * @inheritDoc - */ -vf2js_s.components.ButtonRenderer.prototype.getCssClass = function () { - return vf2js_s.components.ButtonRenderer.CSS_CLASS; -}; - - -/** - * createDom - * - * @inheritDoc - */ -vf2js_s.components.ButtonRenderer.prototype.createDom = function (button) { - var /** @type {?Element} */ element; - - element = vf2js_s.components.ButtonRenderer.base(this, 'createDom', button); - - element.appendChild( - goog.dom.createDom('input', { 'type': 'button' })); - - button.setElementInternal(element); - - return element; -}; http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/8f6d2cde/vf2js/frameworks/js/vf2js/tests.html ---------------------------------------------------------------------- diff --git a/vf2js/frameworks/js/vf2js/tests.html b/vf2js/frameworks/js/vf2js/tests.html deleted file mode 100644 index 9bdcb83..0000000 --- a/vf2js/frameworks/js/vf2js/tests.html +++ /dev/null @@ -1,35 +0,0 @@ -<!DOCTYPE html> -<html> -<head> - - <meta http-equiv="Content-Type" content="text/html; charset=utf-8"> - <meta http-equiv="X-UA-Compatible" content="IE=edge" > - - <script src="/Users/erik/Documents/ApacheFlex/dependencies/GoogleClosure/library/closure/goog/base.js"></script> - - <script src="/Users/erik/Documents/eclipse (kepler)/.metadata/.closure/Users/erik/Documents/ApacheFlex/dependencies/GoogleClosure/library.js"></script> - - <script src="/Users/erik/Documents/eclipse (kepler)/.metadata/.closure/Users/erik/Documents/ApacheFlex/git/flex-asjs/frameworks/js/VF2JS/src.js"></script> - - <script> - goog.require('vf2js_s.components.Button'); - </script> - -</head> -<body onload="init();"> - - <script> - - function init() { - var /** @type {vf2js_s.components.Button} */ button; - - button = new vf2js_s.components.Button(); - button.id = 'myBtn'; - button.label = 'helloWorld'; - button.render(); - } - - </script> - -</body> -</html> \ No newline at end of file
