Return-Path: X-Original-To: apmail-flex-commits-archive@www.apache.org Delivered-To: apmail-flex-commits-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 1857317627 for ; Wed, 15 Apr 2015 21:43:28 +0000 (UTC) Received: (qmail 88250 invoked by uid 500); 15 Apr 2015 21:43:10 -0000 Delivered-To: apmail-flex-commits-archive@flex.apache.org Received: (qmail 88207 invoked by uid 500); 15 Apr 2015 21:43:10 -0000 Mailing-List: contact commits-help@flex.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@flex.apache.org Delivered-To: mailing list commits@flex.apache.org Received: (qmail 88136 invoked by uid 99); 15 Apr 2015 21:43:10 -0000 Received: from git1-us-west.apache.org (HELO git1-us-west.apache.org) (140.211.11.23) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 15 Apr 2015 21:43:10 +0000 Received: by git1-us-west.apache.org (ASF Mail Server at git1-us-west.apache.org, from userid 33) id 53E3AE0921; Wed, 15 Apr 2015 21:43:10 +0000 (UTC) Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit From: aharui@apache.org To: commits@flex.apache.org Date: Wed, 15 Apr 2015 21:43:56 -0000 Message-Id: <4c9219772adf452383ef7d40ee388a16@git.apache.org> In-Reply-To: References: X-Mailer: ASF-Git Admin Mailer Subject: [51/55] [abbrv] git commit: [flex-asjs] [refs/heads/develop] - build scripts work, examples all compile, DataBindingTest and FlexStore run http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/379e517c/frameworks/projects/Core/js/src/org/apache/flex/core/graphics/GradientEntry.js ---------------------------------------------------------------------- diff --git a/frameworks/projects/Core/js/src/org/apache/flex/core/graphics/GradientEntry.js b/frameworks/projects/Core/js/src/org/apache/flex/core/graphics/GradientEntry.js deleted file mode 100644 index 632a4ed..0000000 --- a/frameworks/projects/Core/js/src/org/apache/flex/core/graphics/GradientEntry.js +++ /dev/null @@ -1,126 +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. - */ - -/** - * org_apache_flex_core_graphics_GradientEntry - * - * @fileoverview - * - * @suppress {checkTypes} - */ - -goog.provide('org_apache_flex_core_graphics_GradientEntry'); - - - -/** - * @constructor - * @param {number} alpha - * @param {number} color - * @param {number} ratio - */ -org_apache_flex_core_graphics_GradientEntry = function(alpha, color, ratio) { - this._alpha = alpha; - this._color = color; - this._ratio = ratio; -}; - - -/** - * @type {number} - */ -org_apache_flex_core_graphics_GradientEntry.prototype._alpha = 1.0; - - -/** - * @type {number} - */ -org_apache_flex_core_graphics_GradientEntry.prototype._color = 0x000000; - - -/** - * @type {number} - */ -org_apache_flex_core_graphics_GradientEntry.prototype._ratio = 0x000000; - - -Object.defineProperties(org_apache_flex_core_graphics_GradientEntry.prototype, { - /** @expose */ - alpha: { - /** @this {org_apache_flex_core_graphics_GradientEntry} */ - get: function() { - return this._alpha; - }, - /** @this {org_apache_flex_core_graphics_GradientEntry} */ - set: function(value) { - var /** @type {number} */ oldValue = this._alpha; - if (value != oldValue) { - this._alpha = value; - } - } - }, - /** @expose */ - color: { - /** @this {org_apache_flex_core_graphics_GradientEntry} */ - get: function() { - return this._color; - }, - /** @this {org_apache_flex_core_graphics_GradientEntry} */ - set: function(value) { - var /** @type {number} */ oldValue = this._color; - if (value != oldValue) { - this._color = value; - } - } - }, - /** @expose */ - ratio: { - /** @this {org_apache_flex_core_graphics_GradientEntry} */ - get: function() { - return this._ratio; - }, - /** @this {org_apache_flex_core_graphics_GradientEntry} */ - set: function(value) { - this._ratio = value; - } - } -}); - - -/** - * @expose - * @param {org_apache_flex_core_graphics_GraphicShape} s - */ -org_apache_flex_core_graphics_GradientEntry.prototype.begin = function(s) { - s.graphics.beginFill(this.color, this.alpha); -}; - - -/** - * @expose - * @param {org_apache_flex_core_graphics_GraphicShape} s - */ -org_apache_flex_core_graphics_GradientEntry.prototype.end = function(s) { - s.graphics.endFill(); -}; - - -/** - * Metadata - * - * @type {Object.>} - */ -org_apache_flex_core_graphics_GradientEntry.prototype.FLEXJS_CLASS_INFO = { - names: [{ name: 'GradientEntry', qName: 'org_apache_flex_core_graphics_GradientEntry'}] - }; http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/379e517c/frameworks/projects/Core/js/src/org/apache/flex/core/graphics/GraphicShape.js ---------------------------------------------------------------------- diff --git a/frameworks/projects/Core/js/src/org/apache/flex/core/graphics/GraphicShape.js b/frameworks/projects/Core/js/src/org/apache/flex/core/graphics/GraphicShape.js deleted file mode 100644 index 4f6851c..0000000 --- a/frameworks/projects/Core/js/src/org/apache/flex/core/graphics/GraphicShape.js +++ /dev/null @@ -1,204 +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_core_graphics_GraphicShape'); -goog.require('org_apache_flex_core_UIBase'); -goog.require('org_apache_flex_core_graphics_SolidColor'); -goog.require('org_apache_flex_core_graphics_SolidColorStroke'); - - - -/** - * @constructor - * @extends {org_apache_flex_core_UIBase} - */ -org_apache_flex_core_graphics_GraphicShape = function() { - - org_apache_flex_core_graphics_GraphicShape.base(this, 'constructor'); - - /** - * @private - * @type {org_apache_flex_core_graphics_IFill} - */ - this.fill_ = null; - - /** - * @private - * @type {org_apache_flex_core_graphics_IStroke} - */ - this.stroke_ = null; - - /** - * @private - * @type {number} - */ - this.x_ = 0; - - /** - * @private - * @type {number} - */ - this.y_ = 0; - - /** - * @private - * @type {number} - */ - this.xOffset_ = 0; - - /** - * @private - * @type {number} - */ - this.yOffset_ = 0; - - /** - * @expose - * @type {SVGElement} - */ - this.element = document.createElementNS('http://www.w3.org/2000/svg', 'svg'); - this.element.flexjs_wrapper = this; - this.element.offsetLeft = 0; - this.element.offsetTop = 0; - this.element.offsetParent = null; - this.positioner = this.element; -}; -goog.inherits(org_apache_flex_core_graphics_GraphicShape, - org_apache_flex_core_UIBase); - - -/** - * Metadata - * - * @type {Object.>} - */ -org_apache_flex_core_graphics_GraphicShape.prototype.FLEXJS_CLASS_INFO = - { names: [{ name: 'GraphicShape', - qName: 'org_apache_flex_core_graphics_GraphicShape' }] }; - - -Object.defineProperties(org_apache_flex_core_graphics_GraphicShape.prototype, { - /** @expose */ - fill: { - /** @this {org_apache_flex_core_graphics_GraphicShape} */ - get: function() { - return this.fill_; - }, - /** @this {org_apache_flex_core_graphics_GraphicShape} */ - set: function(value) { - this.fill_ = value; - } - }, - stroke: { - /** @this {org_apache_flex_core_graphics_GraphicShape} */ - get: function() { - return this.stroke_; - }, - /** @this {org_apache_flex_core_graphics_GraphicShape} */ - set: function(value) { - this.stroke_ = value; - } - } -}); - - -/** - * - */ -org_apache_flex_core_graphics_GraphicShape.prototype.addedToParent = function() { - this.draw(); - this.element.style.overflow = 'visible'; - /* - * not sure this is valuable any longer - var bbox = this.element.getBBox(); - if (bbox.width === 0 && !isNaN(this.width)) bbox.width = this.width; - if (bbox.height === 0 && !isNaN(this.height)) bbox.height = this.height; - this.resize(this.x, this.y, bbox);*/ -}; - - -/** - * This is where the drawing methods get called from. - */ -org_apache_flex_core_graphics_GraphicShape.prototype.draw = function() { - //Overwrite in subclass -}; - - -/** - * @expose - * @return {string} The style attribute. - */ -org_apache_flex_core_graphics_GraphicShape.prototype.getStyleStr = function() { - var fillStr; - if (this.fill) - { - fillStr = this.fill.addFillAttrib(this); - } - else - { - fillStr = 'fill:none'; - } - - var strokeStr; - if (this.stroke) - { - strokeStr = this.stroke.addStrokeAttrib(this); - } - else - { - strokeStr = 'stroke:none'; - } - - - return fillStr + ';' + strokeStr; -}; - - -/** - * @expose - * @param {number} x X position. - * @param {number} y Y position. - * @param {Object} bbox The bounding box of the svg element. - */ -org_apache_flex_core_graphics_GraphicShape.prototype.resize = function(x, y, bbox) { - var width = Math.max(this.width, bbox.width); - var height = Math.max(this.height, bbox.height); - - this.element.style.position = 'absolute'; - if (!isNaN(x)) this.element.style.top = String(x) + 'px'; - if (!isNaN(y)) this.element.style.left = String(y) + 'px'; - this.element.style.width = String(width) + 'px'; - this.element.style.height = String(height) + 'px'; - this.element.offsetLeft = x; - this.element.offsetTop = y; -}; - - -/** - * @expose - * @param {number} x X position. - * @param {number} y Y position. - * @param {number} xOffset offset from x position. - * @param {number} yOffset offset from y position. - */ -org_apache_flex_core_graphics_GraphicShape.prototype.setPosition = function(x, y, xOffset, yOffset) { - this.x_ = x; - this.y_ = y; - this.xOffset_ = xOffset; - this.yOffset_ = yOffset; - this.element.offsetLeft = xOffset; - this.element.offsetTop = yOffset; -}; - http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/379e517c/frameworks/projects/Core/js/src/org/apache/flex/core/graphics/GraphicsContainer.js ---------------------------------------------------------------------- diff --git a/frameworks/projects/Core/js/src/org/apache/flex/core/graphics/GraphicsContainer.js b/frameworks/projects/Core/js/src/org/apache/flex/core/graphics/GraphicsContainer.js deleted file mode 100644 index b5ec97f..0000000 --- a/frameworks/projects/Core/js/src/org/apache/flex/core/graphics/GraphicsContainer.js +++ /dev/null @@ -1,232 +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_core_graphics_GraphicsContainer'); - -goog.require('org_apache_flex_core_graphics_GraphicShape'); - - - -/** - * @constructor - * @extends {org_apache_flex_core_graphics_GraphicShape} - */ -org_apache_flex_core_graphics_GraphicsContainer = function() { - org_apache_flex_core_graphics_GraphicsContainer.base(this, 'constructor'); -}; -goog.inherits(org_apache_flex_core_graphics_GraphicsContainer, org_apache_flex_core_graphics_GraphicShape); - - -/** - * Metadata - * - * @type {Object.>} - */ -org_apache_flex_core_graphics_GraphicsContainer.prototype.FLEXJS_CLASS_INFO = - { names: [{ name: 'GraphicsContainer', - qName: 'org_apache_flex_core_graphics_GraphicsContainer'}] }; - - -/** - * @expose - */ -org_apache_flex_core_graphics_GraphicsContainer.prototype.removeAllElements = function() { - var svg = this.element; - while (svg.lastChild) { - svg.removeChild(svg.lastChild); - } -}; - - -Object.defineProperties(org_apache_flex_core_graphics_GraphicsContainer.prototype, { - /** @expose */ - numChildren: { - /** @this {org_apache_flex_core_graphics_GraphicsContainer} */ - get: function() { - return this.internalChildren().length; - } - }, - /** @expose */ - width: { - /** @this {org_apache_flex_core_graphics_GraphicsContainer} */ - set: function(value) { - org_apache_flex_utils_Language.superSetter( - org_apache_flex_core_graphics_GraphicsContainer, this, 'width', value); - this.element.setAttribute('width', String(value) + 'px'); - this.element.style.width = String(value) + 'px'; - } - }, - /** @expose */ - height: { - /** @this {org_apache_flex_core_graphics_GraphicsContainer} */ - set: function(value) { - org_apache_flex_utils_Language.superSetter( - org_apache_flex_core_graphics_GraphicsContainer, this, 'height', value); - this.element.setAttribute('height', String(value) + 'px'); - this.element.style.height = String(value) + 'px'; - } - }, - /** @expose */ - x: { - /** @this {org_apache_flex_core_graphics_GraphicsContainer} */ - set: function(value) { - org_apache_flex_utils_Language.superSetter( - org_apache_flex_core_graphics_GraphicsContainer, this, 'x', value); - this.element.setAttribute('x', String(value) + 'px'); - this.element.style.position = 'absolute'; - this.element.style.left = String(value) + 'px'; - this.element.offsetLeft = value; - } - }, - /** @expose */ - y: { - /** @this {org_apache_flex_core_graphics_GraphicsContainer} */ - set: function(value) { - org_apache_flex_utils_Language.superSetter( - org_apache_flex_core_graphics_GraphicsContainer, this, 'y', value); - this.element.setAttribute('y', String(value) + 'px'); - this.element.style.position = 'absolute'; - this.element.style.top = String(value) + 'px'; - this.element.offsetTop = value; - } - } -}); - - -/** - * @expose - * @param {number} x The x position of the top-left corner of the rectangle. - * @param {number} y The y position of the top-left corner. - * @param {number} width The width of the rectangle. - * @param {number} height The height of the rectangle. - */ -org_apache_flex_core_graphics_GraphicsContainer.prototype.drawRect = function(x, y, width, height) { - var style = this.getStyleStr(); - var rect = document.createElementNS('http://www.w3.org/2000/svg', 'rect'); - rect.flexjs_wrapper = this; - rect.offsetLeft = x; - rect.offsetTop = y; - rect.offsetParent = this; - rect.setAttribute('style', style); - rect.setAttribute('x', String(x) + 'px'); - rect.setAttribute('y', String(y) + 'px'); - rect.setAttribute('width', String(width) + 'px'); - rect.setAttribute('height', String(height) + 'px'); - this.element.appendChild(rect); -}; - - -/** - * @expose - * @param {number} x The x position of the top-left corner of the bounding box of the ellipse. - * @param {number} y The y position of the top-left corner of the bounding box of the ellipse. - * @param {number} width The width of the ellipse. - * @param {number} height The height of the ellipse. - */ -org_apache_flex_core_graphics_GraphicsContainer.prototype.drawEllipse = function(x, y, width, height) { - var style = this.getStyleStr(); - var ellipse = document.createElementNS('http://www.w3.org/2000/svg', 'ellipse'); - ellipse.flexjs_wrapper = this; - ellipse.offsetLeft = x; - ellipse.offsetTop = y; - ellipse.offsetParent = this; - ellipse.setAttribute('style', style); - ellipse.setAttribute('cx', String(x + width / 2)); - ellipse.setAttribute('cy', String(y + height / 2)); - ellipse.setAttribute('rx', String(width / 2)); - ellipse.setAttribute('ry', String(height / 2)); - this.element.appendChild(ellipse); -}; - - -/** - * @expose - * @param {number} x The x location of the center of the circle. - * @param {number} y The y location of the center of the circle. - * @param {number} radius The radius of the circle. - */ -org_apache_flex_core_graphics_GraphicsContainer.prototype.drawCircle = function(x, y, radius) { - var style = this.getStyleStr(); - var circle = document.createElementNS('http://www.w3.org/2000/svg', 'ellipse'); - circle.flexjs_wrapper = this; - circle.offsetLeft = x; - circle.offsetTop = y; - circle.offsetParent = this; - circle.setAttribute('style', style); - circle.setAttribute('cx', String(x)); - circle.setAttribute('cy', String(y)); - circle.setAttribute('rx', String(radius)); - circle.setAttribute('ry', String(radius)); - this.element.appendChild(circle); -}; - - -/** - * @expose - * @param {string} data A string containing a compact represention of the path segments. - * The value is a space-delimited string describing each path segment. Each - * segment entry has a single character which denotes the segment type and - * two or more segment parameters. - * - * If the segment command is upper-case, the parameters are absolute values. - * If the segment command is lower-case, the parameters are relative values. - */ -org_apache_flex_core_graphics_GraphicsContainer.prototype.drawPath = function(data) { - var style = this.getStyleStr(); - var path = document.createElementNS('http://www.w3.org/2000/svg', 'path'); - path.flexjs_wrapper = this; - path.offsetLeft = 0; - path.offsetTop = 0; - path.offsetParent = this; - path.setAttribute('style', style); - path.setAttribute('d', data); - this.element.appendChild(path); -}; - - -/** - * @expose - * @param {string} value The text string to draw. - * @param {number} x The x position of the text. - * @param {number} y The y position of the text. - */ -org_apache_flex_core_graphics_GraphicsContainer.prototype.drawText = function(value, x, y) { - var style = this.getStyleStr(); - var text = document.createElementNS('http://www.w3.org/2000/svg', 'text'); - text.flexjs_wrapper = this; - text.offsetLeft = x; - text.offsetTop = y; - text.offsetParent = this; - text.setAttribute('style', style); - text.setAttribute('x', String(x) + 'px'); - text.setAttribute('y', String(y + 15) + 'px'); - var textNode = document.createTextNode(value); - text.appendChild(textNode); - this.element.appendChild(text); -}; - - -/** - * @expose - */ -org_apache_flex_core_graphics_GraphicsContainer.prototype.drawLine = function() { -}; - - -/** - * @expose - */ -org_apache_flex_core_graphics_GraphicsContainer.prototype.drawPolygon = function() { -}; - http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/379e517c/frameworks/projects/Core/js/src/org/apache/flex/core/graphics/IFill.js ---------------------------------------------------------------------- diff --git a/frameworks/projects/Core/js/src/org/apache/flex/core/graphics/IFill.js b/frameworks/projects/Core/js/src/org/apache/flex/core/graphics/IFill.js deleted file mode 100644 index ac572d7..0000000 --- a/frameworks/projects/Core/js/src/org/apache/flex/core/graphics/IFill.js +++ /dev/null @@ -1,52 +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 - * @suppress {checkTypes} - */ - -goog.provide('org_apache_flex_core_graphics_IFill'); - - - -/** - * IFill - * - * @interface - */ -org_apache_flex_core_graphics_IFill = function() { -}; - - -/** - * Metadata - * - * @type {Object.>} - */ -org_apache_flex_core_graphics_IFill.prototype.FLEXJS_CLASS_INFO = - { names: [{ name: 'IFill', - qName: 'org_apache_flex_core_graphics_IFill' }] }; - - -/** - * addFillAttrib() - * - * @expose - * @param {org_apache_flex_core_graphics_GraphicShape} value The GraphicShape object on which the fill must be added. - * @return {string} The fill style attribute. - */ -org_apache_flex_core_graphics_IFill.prototype.addFillAttrib = - function(value) {}; - http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/379e517c/frameworks/projects/Core/js/src/org/apache/flex/core/graphics/IStroke.js ---------------------------------------------------------------------- diff --git a/frameworks/projects/Core/js/src/org/apache/flex/core/graphics/IStroke.js b/frameworks/projects/Core/js/src/org/apache/flex/core/graphics/IStroke.js deleted file mode 100644 index 398b4e6..0000000 --- a/frameworks/projects/Core/js/src/org/apache/flex/core/graphics/IStroke.js +++ /dev/null @@ -1,52 +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 - * @suppress {checkTypes} - */ - -goog.provide('org_apache_flex_core_graphics_IStroke'); - - - -/** - * IStroke - * - * @interface - */ -org_apache_flex_core_graphics_IStroke = function() { -}; - - -/** - * Metadata - * - * @type {Object.>} - */ -org_apache_flex_core_graphics_IStroke.prototype.FLEXJS_CLASS_INFO = - { names: [{ name: 'IStroke', - qName: 'org_apache_flex_core_graphics_IStroke' }] }; - - -/** - * addStrokeAttrib() - * - * @expose - * @param {org_apache_flex_core_graphics_GraphicShape} value The GraphicShape object on which the stroke must be added. - * @return {string} The stroke style attribute. - */ -org_apache_flex_core_graphics_IStroke.prototype.addStrokeAttrib = - function(value) {}; - http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/379e517c/frameworks/projects/Core/js/src/org/apache/flex/core/graphics/Line.js ---------------------------------------------------------------------- diff --git a/frameworks/projects/Core/js/src/org/apache/flex/core/graphics/Line.js b/frameworks/projects/Core/js/src/org/apache/flex/core/graphics/Line.js deleted file mode 100644 index b45f8d7..0000000 --- a/frameworks/projects/Core/js/src/org/apache/flex/core/graphics/Line.js +++ /dev/null @@ -1,79 +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_core_graphics_Line'); - -goog.require('org_apache_flex_core_graphics_GraphicShape'); - - - -/** - * @constructor - * @extends {org_apache_flex_core_graphics_GraphicShape} - */ -org_apache_flex_core_graphics_Line = function() { - org_apache_flex_core_graphics_Line.base(this, 'constructor'); - -}; -goog.inherits(org_apache_flex_core_graphics_Line, - org_apache_flex_core_graphics_GraphicShape); - - -/** - * Metadata - * - * @type {Object.>} - */ -org_apache_flex_core_graphics_Line.prototype.FLEXJS_CLASS_INFO = - { names: [{ name: 'Line', - qName: 'org_apache_flex_core_graphics_Line' }] }; - - -/** - * @expose - * @param {number} x1 The x1 attribute defines the start of the line on the x-axis. - * @param {number} y1 The y1 attribute defines the start of the line on the y-axis. - * @param {number} x2 The x2 attribute defines the end of the line on the x-axis. - * @param {number} y2 The y2 attribute defines the end of the line on the y-axis. - */ -org_apache_flex_core_graphics_Line.prototype.drawLine = function(x1, y1, x2, y2) { - var style = this.getStyleStr(); - var line = document.createElementNS('http://www.w3.org/2000/svg', 'line'); - line.flexjs_wrapper = this; - line.setAttribute('style', style); - line.setAttribute('x1', 0); - line.setAttribute('y1', y1); - line.setAttribute('x2', x2 - x1); - line.setAttribute('y2', y2); - this.setPosition(x1, y2, this.stroke.weight, this.stroke.weight); - this.element.appendChild(line); - - this.resize(x, y, line.getBBox()); - }; - - -/** - * @override - * @expose - * @param {number} x X position. - * @param {number} y Y position. - * @param {Object} bbox The bounding box of the svg element. - */ -org_apache_flex_core_graphics_Line.prototype.resize = function(x, y, bbox) { - this.element.setAttribute('width', String(bbox.width) + 'px'); - this.element.setAttribute('height', String(bbox.height) + 'px'); - - this.element.setAttribute('style', 'position:absolute; left:' + String(x + bbox.x - this.xOffset_) + - 'px; top:' + String(bbox.y - this.yOffset_) + 'px;'); -}; http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/379e517c/frameworks/projects/Core/js/src/org/apache/flex/core/graphics/LinearGradient.js ---------------------------------------------------------------------- diff --git a/frameworks/projects/Core/js/src/org/apache/flex/core/graphics/LinearGradient.js b/frameworks/projects/Core/js/src/org/apache/flex/core/graphics/LinearGradient.js deleted file mode 100644 index 5711ffc..0000000 --- a/frameworks/projects/Core/js/src/org/apache/flex/core/graphics/LinearGradient.js +++ /dev/null @@ -1,125 +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. - */ - -/** - * org_apache_flex_core_graphics_LinearGradient - * - * @fileoverview - * - * @suppress {checkTypes} - */ - -goog.provide('org_apache_flex_core_graphics_LinearGradient'); -goog.require('org_apache_flex_core_graphics_GradientBase'); - - - -/** - * @constructor - * @extends {org_apache_flex_core_graphics_GradientBase} - * @implements {org_apache_flex_core_graphics_IFill} - */ -org_apache_flex_core_graphics_LinearGradient = function() { - org_apache_flex_core_graphics_LinearGradient.base(this, 'constructor'); -}; -goog.inherits(org_apache_flex_core_graphics_LinearGradient, org_apache_flex_core_graphics_GradientBase); - - -/** - * @type {number} - */ -org_apache_flex_core_graphics_LinearGradient.prototype._scaleX = 1.0; - - -Object.defineProperties(org_apache_flex_core_graphics_LinearGradient.prototype, { - /** @expose */ - scaleX: { - /** @this {org_apache_flex_core_graphics_LinearGradient} */ - get: function() { - return this._scaleX; - }, - /** @this {org_apache_flex_core_graphics_LinearGradient} */ - set: function(value) { - this._scaleX = value; - } - } -}); - - -/** - * addFillAttrib() - * - * @expose - * @param {org_apache_flex_core_graphics_GraphicShape} value The GraphicShape object on which the fill must be added. - * @return {string} - */ -org_apache_flex_core_graphics_LinearGradient.prototype.addFillAttrib = function(value) { - //Create and add a linear gradient def - var svgNS = value.element.namespaceURI; - var grad = document.createElementNS(svgNS, 'linearGradient'); - var gradientId = this.newId; - grad.setAttribute('id', gradientId); - - //Set x1, y1, x2, y2 of gradient - grad.setAttribute('x1', '0%'); - grad.setAttribute('y1', '0%'); - grad.setAttribute('x2', '100%'); - grad.setAttribute('y2', '0%'); - - //Apply rotation to the gradient if rotation is a number - if (this.rotation) - { - grad.setAttribute('gradientTransform', 'rotate(' + this.rotation + ' 0.5 0.5)'); - } - - //Process gradient entries and create a stop for each entry - var entries = this.entries; - for (var i = 0; i < entries.length; i++) - { - var gradientEntry = entries[i]; - var stop = document.createElementNS(svgNS, 'stop'); - //Set Offset - stop.setAttribute('offset', String(gradientEntry.ratio * 100) + '%'); - //Set Color - var color = Number(gradientEntry.color).toString(16); - if (color.length == 1) color = '00' + color; - if (color.length == 2) color = '00' + color; - if (color.length == 4) color = '00' + color; - stop.setAttribute('stop-color', '#' + String(color)); - //Set Alpha - stop.setAttribute('stop-opacity', String(gradientEntry.alpha)); - - grad.appendChild(stop); - } - - //Add defs element if not available already - //Add newly created gradient to defs element - var defs = value.element.querySelector('defs') || - value.element.insertBefore(document.createElementNS(svgNS, 'defs'), value.element.firstChild); - defs.appendChild(grad); - - //Return the fill attribute - return 'fill:url(#' + gradientId + ')'; -}; - - -/** - * Metadata - * - * @type {Object.>} - */ -org_apache_flex_core_graphics_LinearGradient.prototype.FLEXJS_CLASS_INFO = { - names: [{ name: 'LinearGradient', qName: 'org_apache_flex_core_graphics_LinearGradient'}], - interfaces: [org_apache_flex_core_graphics_IFill] - }; http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/379e517c/frameworks/projects/Core/js/src/org/apache/flex/core/graphics/Path.js ---------------------------------------------------------------------- diff --git a/frameworks/projects/Core/js/src/org/apache/flex/core/graphics/Path.js b/frameworks/projects/Core/js/src/org/apache/flex/core/graphics/Path.js deleted file mode 100644 index 1a8c04c..0000000 --- a/frameworks/projects/Core/js/src/org/apache/flex/core/graphics/Path.js +++ /dev/null @@ -1,101 +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_core_graphics_Path'); - -goog.require('org_apache_flex_core_graphics_GraphicShape'); - - - -/** - * @constructor - * @extends {org_apache_flex_core_graphics_GraphicShape} - */ -org_apache_flex_core_graphics_Path = function() { - org_apache_flex_core_graphics_Path.base(this, 'constructor'); - - /** - * @private - * @type {string} - */ - this.data_ = ''; -}; -goog.inherits(org_apache_flex_core_graphics_Path, - org_apache_flex_core_graphics_GraphicShape); - - -/** - * Metadata - * - * @type {Object.>} - */ -org_apache_flex_core_graphics_Path.prototype.FLEXJS_CLASS_INFO = - { names: [{ name: 'Path', - qName: 'org_apache_flex_core_graphics_Path' }] }; - - -Object.defineProperties(org_apache_flex_core_graphics_Path.prototype, { - /** @expose */ - data: { - /** @this {org_apache_flex_core_graphics_Path} */ - set: function(v) { - this.data_ = v; - }, - /** @this {org_apache_flex_core_graphics_Path} */ - get: function() { - return this.data_; - } - } -}); - - -/** - * @expose - * @param {number} x The x location of the Path. - * @param {number} y The y location of the Path. - * @param {string} data A string containing a compact represention of the path segments. - * The value is a space-delimited string describing each path segment. Each - * segment entry has a single character which denotes the segment type and - * two or more segment parameters. - * - * If the segment command is upper-case, the parameters are absolute values. - * If the segment command is lower-case, the parameters are relative values. - */ -org_apache_flex_core_graphics_Path.prototype.drawPath = function(x, y, data) { - if (data == null || data.length === 0) return; - var style = this.getStyleStr(); - var path = document.createElementNS('http://www.w3.org/2000/svg', 'path'); - path.flexjs_wrapper = this; - path.setAttribute('style', style); - path.setAttribute('d', data); - this.element.appendChild(path); - if (this.stroke) - { - this.setPosition(x, y, this.stroke.weight, this.stroke.weight); - } - else - { - this.setPosition(x, y, 0, 0); - } - - this.resize(x, y, path.getBBox()); - }; - - - /** - * @override - */ -org_apache_flex_core_graphics_Path.prototype.draw = function() { - this.drawPath(this.x, this.y, this.data); - }; http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/379e517c/frameworks/projects/Core/js/src/org/apache/flex/core/graphics/Rect.js ---------------------------------------------------------------------- diff --git a/frameworks/projects/Core/js/src/org/apache/flex/core/graphics/Rect.js b/frameworks/projects/Core/js/src/org/apache/flex/core/graphics/Rect.js deleted file mode 100644 index 2a3c849..0000000 --- a/frameworks/projects/Core/js/src/org/apache/flex/core/graphics/Rect.js +++ /dev/null @@ -1,80 +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_core_graphics_Rect'); - -goog.require('org_apache_flex_core_graphics_GraphicShape'); - - - -/** - * @constructor - * @extends {org_apache_flex_core_graphics_GraphicShape} - */ -org_apache_flex_core_graphics_Rect = function() { - org_apache_flex_core_graphics_Rect.base(this, 'constructor'); - -}; -goog.inherits(org_apache_flex_core_graphics_Rect, - org_apache_flex_core_graphics_GraphicShape); - - -/** - * Metadata - * - * @type {Object.>} - */ -org_apache_flex_core_graphics_Rect.prototype.FLEXJS_CLASS_INFO = - { names: [{ name: 'Rect', - qName: 'org_apache_flex_core_graphics_Rect' }] }; - - -/** - * @expose - * @param {number} x The x position of the top-left corner of the rectangle. - * @param {number} y The y position of the top-left corner. - * @param {number} width The width of the rectangle. - * @param {number} height The height of the rectangle. - */ -org_apache_flex_core_graphics_Rect.prototype.drawRect = function(x, y, width, height) { - var style = this.getStyleStr(); - var rect = document.createElementNS('http://www.w3.org/2000/svg', 'rect'); - rect.flexjs_wrapper = this; - rect.setAttribute('style', style); - if (this.stroke) - { - rect.setAttribute('x', String(this.stroke.weight / 2) + 'px'); - rect.setAttribute('y', String(this.stroke.weight / 2) + 'px'); - this.setPosition(x, y, this.stroke.weight, this.stroke.weight); - } - else - { - rect.setAttribute('x', '0' + 'px'); - rect.setAttribute('y', '0' + 'px'); - this.setPosition(x, y, 0, 0); - } - rect.setAttribute('width', String(width) + 'px'); - rect.setAttribute('height', String(height) + 'px'); - this.element.appendChild(rect); - - this.resize(x, y, rect.getBBox()); - }; - - -/** - * @override -*/ -org_apache_flex_core_graphics_Rect.prototype.draw = function() { - this.drawRect(this.x, this.y, this.width, this.height); - }; http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/379e517c/frameworks/projects/Core/js/src/org/apache/flex/core/graphics/SolidColor.js ---------------------------------------------------------------------- diff --git a/frameworks/projects/Core/js/src/org/apache/flex/core/graphics/SolidColor.js b/frameworks/projects/Core/js/src/org/apache/flex/core/graphics/SolidColor.js deleted file mode 100644 index d534260..0000000 --- a/frameworks/projects/Core/js/src/org/apache/flex/core/graphics/SolidColor.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_core_graphics_SolidColor'); -goog.require('org_apache_flex_core_graphics_IFill'); - - - -/** - * @constructor - * @implements {org_apache_flex_core_graphics_IFill} - */ -org_apache_flex_core_graphics_SolidColor = function() { - - /** - * @private - * @type {number} - */ - this.alpha_ = 1.0; - - /** - * @private - * @type {number} - */ - this.color_ = 1.0; - -}; - - -/** - * Metadata - * - * @type {Object.>} - */ -org_apache_flex_core_graphics_SolidColor.prototype.FLEXJS_CLASS_INFO = - { names: [{ name: 'SolidColor', - qName: 'org_apache_flex_core_graphics_SolidColor' }], - interfaces: [org_apache_flex_core_graphics_IFill] }; - - -Object.defineProperties(org_apache_flex_core_graphics_SolidColor.prototype, { - /** @expose */ - color: { - /** @this {org_apache_flex_core_graphics_SolidColor} */ - get: function() { - return this.color_; - }, - /** @this {org_apache_flex_core_graphics_SolidColor} */ - set: function(value) { - this.color_ = value; - } - }, - /** @expose */ - alpha: { - /** @this {org_apache_flex_core_graphics_SolidColor} */ - get: function() { - return this.alpha_; - }, - /** @this {org_apache_flex_core_graphics_SolidColor} */ - set: function(value) { - this.alpha_ = value; - } - } -}); - - -/** - * addFillAttrib() - * - * @expose - * @param {org_apache_flex_core_graphics_GraphicShape} value The GraphicShape object on which the fill must be added. - * @return {string} - */ -org_apache_flex_core_graphics_SolidColor.prototype.addFillAttrib = function(value) { - var color = Number(this.color).toString(16); - if (color.length == 1) color = '00' + color; - if (color.length == 2) color = '00' + color; - if (color.length == 4) color = '00' + color; - return 'fill:#' + String(color) + ';fill-opacity:' + String(this.alpha); -}; - http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/379e517c/frameworks/projects/Core/js/src/org/apache/flex/core/graphics/SolidColorStroke.js ---------------------------------------------------------------------- diff --git a/frameworks/projects/Core/js/src/org/apache/flex/core/graphics/SolidColorStroke.js b/frameworks/projects/Core/js/src/org/apache/flex/core/graphics/SolidColorStroke.js deleted file mode 100644 index 1ce52f6..0000000 --- a/frameworks/projects/Core/js/src/org/apache/flex/core/graphics/SolidColorStroke.js +++ /dev/null @@ -1,109 +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_core_graphics_SolidColorStroke'); -goog.require('org_apache_flex_core_graphics_IStroke'); - - - -/** - * @constructor - * @implements {org_apache_flex_core_graphics_IStroke} - * - */ -org_apache_flex_core_graphics_SolidColorStroke = function() { - - /** - * @private - * @type {number} - */ - this.alpha_ = 1.0; - - /** - * @private - * @type {number} - */ - this.color_ = 1.0; - - /** - * @private - * @type {number} - */ - this.weight_ = 1.0; - -}; - - -/** - * Metadata - * - * @type {Object.>} - */ -org_apache_flex_core_graphics_SolidColorStroke.prototype.FLEXJS_CLASS_INFO = - { names: [{ name: 'SolidColorStroke', - qName: 'org_apache_flex_core_graphics_SolidColorStroke' }] }; - - -Object.defineProperties(org_apache_flex_core_graphics_SolidColorStroke.prototype, { - /** @expose */ - color: { - /** @this {org_apache_flex_core_graphics_SolidColorStroke} */ - get: function() { - return this.color_; - }, - /** @this {org_apache_flex_core_graphics_SolidColorStroke} */ - set: function(value) { - this.color_ = value; - } - }, - /** @expose */ - alpha: { - /** @this {org_apache_flex_core_graphics_SolidColorStroke} */ - get: function() { - return this.alpha_; - }, - /** @this {org_apache_flex_core_graphics_SolidColorStroke} */ - set: function(value) { - this.alpha_ = value; - } - }, - /** @expose */ - weight: { - /** @this {org_apache_flex_core_graphics_SolidColorStroke} */ - get: function() { - return this.weight_; - }, - /** @this {org_apache_flex_core_graphics_SolidColorStroke} */ - set: function(value) { - this.weight_ = value; - } - } -}); - - -/** - * addStrokeAttrib() - * - * @expose - * @param {org_apache_flex_core_graphics_GraphicShape} value The GraphicShape object on which the stroke must be added. - * @return {string} - */ -org_apache_flex_core_graphics_SolidColorStroke.prototype.addStrokeAttrib = function(value) { - var strokeColor = Number(this.color).toString(16); - if (strokeColor.length == 1) strokeColor = '00' + strokeColor; - if (strokeColor.length == 2) strokeColor = '00' + strokeColor; - if (strokeColor.length == 4) strokeColor = '00' + strokeColor; - return 'stroke:#' + String(strokeColor) + ';stroke-width:' + - String(this.weight) + ';stroke-opacity:' + String(this.alpha); - }; http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/379e517c/frameworks/projects/Core/js/src/org/apache/flex/core/graphics/Text.js ---------------------------------------------------------------------- diff --git a/frameworks/projects/Core/js/src/org/apache/flex/core/graphics/Text.js b/frameworks/projects/Core/js/src/org/apache/flex/core/graphics/Text.js deleted file mode 100644 index 80afbda..0000000 --- a/frameworks/projects/Core/js/src/org/apache/flex/core/graphics/Text.js +++ /dev/null @@ -1,70 +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_core_graphics_Text'); - -goog.require('org_apache_flex_core_graphics_GraphicShape'); - - - -/** - * @constructor - * @extends {org_apache_flex_core_graphics_GraphicShape} - */ -org_apache_flex_core_graphics_Text = function() { - org_apache_flex_core_graphics_Text.base(this, 'constructor'); - -}; -goog.inherits(org_apache_flex_core_graphics_Text, - org_apache_flex_core_graphics_GraphicShape); - - -/** - * Metadata - * - * @type {Object.>} - */ -org_apache_flex_core_graphics_Text.prototype.FLEXJS_CLASS_INFO = - { names: [{ name: 'Rect', - qName: 'org_apache_flex_core_graphics_Text' }] }; - - -/** - * @expose - * @param {string} value The text to be drawn. - * @param {number} x The x position of the top-left corner of the rectangle. - * @param {number} y The y position of the top-left corner. - */ -org_apache_flex_core_graphics_Text.prototype.drawText = function(value, x, y) { - var style = this.getStyleStr(); - var text = document.createElementNS('http://www.w3.org/2000/svg', 'text'); - text.flexjs_wrapper = this; - text.setAttribute('style', style); - text.setAttribute('x', String(x) + 'px'); - text.setAttribute('y', String(y) + 'px'); - this.setPosition(x, y, 0, 0); - var textNode = document.createTextNode(value); - text.appendChild(textNode); - this.element.appendChild(text); - - this.resize(x, y, text.getBBox()); - }; - - -/** - * @override -*/ -org_apache_flex_core_graphics_Text.prototype.draw = function() { - -}; http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/379e517c/frameworks/projects/Core/js/src/org/apache/flex/events/DragEvent.js ---------------------------------------------------------------------- diff --git a/frameworks/projects/Core/js/src/org/apache/flex/events/DragEvent.js b/frameworks/projects/Core/js/src/org/apache/flex/events/DragEvent.js deleted file mode 100644 index 3212ebe..0000000 --- a/frameworks/projects/Core/js/src/org/apache/flex/events/DragEvent.js +++ /dev/null @@ -1,146 +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_events_DragEvent'); - -goog.require('goog.events.BrowserEvent'); -goog.require('org_apache_flex_events_ElementEvents'); -goog.require('org_apache_flex_events_EventDispatcher'); - - - -/** - * @constructor - * This is a shim class. A native MouseEvent is actually - * sent with additional properties like dragInitiator and - * dragSource tacked on. - * - * @extends {goog.events.BrowserEvent} - * @param {string} type The event type. - */ -org_apache_flex_events_DragEvent = function(type) { - org_apache_flex_events_DragEvent.base(this, 'constructor'); - - this.type = type; -}; -goog.inherits(org_apache_flex_events_DragEvent, - goog.events.BrowserEvent); - - -/** - * Metadata - * - * @type {Object.>} - */ -org_apache_flex_events_DragEvent.prototype.FLEXJS_CLASS_INFO = - { names: [{ name: 'DragEvent', - qName: 'org_apache_flex_events_DragEvent'}] }; - - -/** - * @expose - * @param {string} type The event type. - * @param {Event} e The mouse event to base the DragEvent on. - * @return {MouseEvent} The new event. - */ -org_apache_flex_events_DragEvent.createDragEvent = - function(type, e) { - var out = new MouseEvent(type); - out.initMouseEvent(type, true, true, - e.view, e.detail, e.screenX, e.screenY, - e.clientX, e.clientY, e.ctrlKey, e.altKey, - e.shiftKey, e.metaKey, e.button, e.relatedTarget); - return out; -}; - - -/** - * @expose - * @param {Event} event The drag event. - * @param {Object} target The target for the event. - */ -org_apache_flex_events_DragEvent.dispatchDragEvent = - function(event, target) { - target.element.dispatchEvent(event); -}; - - -/** - * @expose - * @type {string} DRAG_START The event type for starting drag-drop. - */ -org_apache_flex_events_DragEvent.DRAG_START = 'dragStart'; - - -/** - * @expose - * @type {string} DRAG_MOVE The event type when moving mouse during drag-drop. - */ -org_apache_flex_events_DragEvent.DRAG_MOVE = 'dragMove'; - - -/** - * @expose - * @type {string} DRAG_END The event type for ending drag-drop. - */ -org_apache_flex_events_DragEvent.DRAG_END = 'dragEnd'; - - -/** - * @expose - * @type {string} DRAG_ENTER The event type for entering a potential drop target. - */ -org_apache_flex_events_DragEvent.DRAG_ENTER = 'dragEnter'; - - -/** - * @expose - * @type {string} DRAG_OVER The event type for moving over a potential drop target. - */ -org_apache_flex_events_DragEvent.DRAG_OVER = 'dragOver'; - - -/** - * @expose - * @type {string} DRAG_EXIT The event type for leaving a potential drop target. - */ -org_apache_flex_events_DragEvent.DRAG_EXIT = 'dragExit'; - - -/** - * @expose - * @type {string} DRAG_DROP The event type for dropping on a target. - */ -org_apache_flex_events_DragEvent.DRAG_DROP = 'dragDrop'; - - -/** - * @return {boolean} - */ -org_apache_flex_events_DragEvent.installDragEventMixin = function() { - var o = org_apache_flex_events_ElementEvents.elementEvents; - o['dragEnd'] = 1; - o['dragMove'] = 1; - return true; -}; - - -/** - * Add some other events to listen from the element - */ -/** - * @type {boolean} - */ -org_apache_flex_events_DragEvent.dragEventMixin = - org_apache_flex_events_DragEvent.installDragEventMixin(); http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/379e517c/frameworks/projects/CreateJS/build.xml ---------------------------------------------------------------------- diff --git a/frameworks/projects/CreateJS/build.xml b/frameworks/projects/CreateJS/build.xml index 6a72d46..f15e7de 100644 --- a/frameworks/projects/CreateJS/build.xml +++ b/frameworks/projects/CreateJS/build.xml @@ -27,16 +27,31 @@ + + + + + + + + + + + + + @@ -78,4 +93,43 @@ + + + + + + + + + + + + + + + running gjslint + + + + + + + + + + + + + + + + + running jshint + + + + + + + http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/379e517c/frameworks/projects/DragDrop/asjs/src/DragDropASJSClasses.as ---------------------------------------------------------------------- diff --git a/frameworks/projects/DragDrop/asjs/src/DragDropASJSClasses.as b/frameworks/projects/DragDrop/asjs/src/DragDropASJSClasses.as index fab5c6a..a3df9ef 100644 --- a/frameworks/projects/DragDrop/asjs/src/DragDropASJSClasses.as +++ b/frameworks/projects/DragDrop/asjs/src/DragDropASJSClasses.as @@ -26,7 +26,8 @@ package * from the classes specified in manifest.xml. */ internal class DragDropASJSClasses -{ +{ + import org.apache.flex.core.DropType; DropType; } } http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/379e517c/frameworks/projects/DragDrop/build.xml ---------------------------------------------------------------------- diff --git a/frameworks/projects/DragDrop/build.xml b/frameworks/projects/DragDrop/build.xml index bea4ec1..52f668a 100644 --- a/frameworks/projects/DragDrop/build.xml +++ b/frameworks/projects/DragDrop/build.xml @@ -27,16 +27,32 @@ - + + + + + + + - + + + + + + + --> + + + + @@ -78,4 +94,59 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + running gjslint + + + + + + + + + + + + + + + + + running jshint + + + + + + + http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/379e517c/frameworks/projects/DragDrop/compile-asjs-config.xml ---------------------------------------------------------------------- diff --git a/frameworks/projects/DragDrop/compile-asjs-config.xml b/frameworks/projects/DragDrop/compile-asjs-config.xml new file mode 100644 index 0000000..e274596 --- /dev/null +++ b/frameworks/projects/DragDrop/compile-asjs-config.xml @@ -0,0 +1,70 @@ + + + + + false + + + ${env.AIR_HOME}/frameworks/libs/air/airglobal.swc + ../../libs/Core.swc + ../../libs/DragDrop.swc + + + + true + + org.apache.flex.events.ValueChangeEvent + org.apache.flex.events.ValueChangeEvent + valueChange + + + Bindable + Managed + ChangeEvent + NonCommittingChangeEvent + Transient + + + + + + + + asjs/src + + + false + + + + + + + asjs/src + + + + library://ns.apache.org/flexjs/basic + + + ${playerglobal.version} + + + http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/379e517c/frameworks/projects/DragDrop/js/src/org/apache/flex/events/DragEvent.js ---------------------------------------------------------------------- diff --git a/frameworks/projects/DragDrop/js/src/org/apache/flex/events/DragEvent.js b/frameworks/projects/DragDrop/js/src/org/apache/flex/events/DragEvent.js new file mode 100644 index 0000000..3212ebe --- /dev/null +++ b/frameworks/projects/DragDrop/js/src/org/apache/flex/events/DragEvent.js @@ -0,0 +1,146 @@ +/** + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +goog.provide('org_apache_flex_events_DragEvent'); + +goog.require('goog.events.BrowserEvent'); +goog.require('org_apache_flex_events_ElementEvents'); +goog.require('org_apache_flex_events_EventDispatcher'); + + + +/** + * @constructor + * This is a shim class. A native MouseEvent is actually + * sent with additional properties like dragInitiator and + * dragSource tacked on. + * + * @extends {goog.events.BrowserEvent} + * @param {string} type The event type. + */ +org_apache_flex_events_DragEvent = function(type) { + org_apache_flex_events_DragEvent.base(this, 'constructor'); + + this.type = type; +}; +goog.inherits(org_apache_flex_events_DragEvent, + goog.events.BrowserEvent); + + +/** + * Metadata + * + * @type {Object.>} + */ +org_apache_flex_events_DragEvent.prototype.FLEXJS_CLASS_INFO = + { names: [{ name: 'DragEvent', + qName: 'org_apache_flex_events_DragEvent'}] }; + + +/** + * @expose + * @param {string} type The event type. + * @param {Event} e The mouse event to base the DragEvent on. + * @return {MouseEvent} The new event. + */ +org_apache_flex_events_DragEvent.createDragEvent = + function(type, e) { + var out = new MouseEvent(type); + out.initMouseEvent(type, true, true, + e.view, e.detail, e.screenX, e.screenY, + e.clientX, e.clientY, e.ctrlKey, e.altKey, + e.shiftKey, e.metaKey, e.button, e.relatedTarget); + return out; +}; + + +/** + * @expose + * @param {Event} event The drag event. + * @param {Object} target The target for the event. + */ +org_apache_flex_events_DragEvent.dispatchDragEvent = + function(event, target) { + target.element.dispatchEvent(event); +}; + + +/** + * @expose + * @type {string} DRAG_START The event type for starting drag-drop. + */ +org_apache_flex_events_DragEvent.DRAG_START = 'dragStart'; + + +/** + * @expose + * @type {string} DRAG_MOVE The event type when moving mouse during drag-drop. + */ +org_apache_flex_events_DragEvent.DRAG_MOVE = 'dragMove'; + + +/** + * @expose + * @type {string} DRAG_END The event type for ending drag-drop. + */ +org_apache_flex_events_DragEvent.DRAG_END = 'dragEnd'; + + +/** + * @expose + * @type {string} DRAG_ENTER The event type for entering a potential drop target. + */ +org_apache_flex_events_DragEvent.DRAG_ENTER = 'dragEnter'; + + +/** + * @expose + * @type {string} DRAG_OVER The event type for moving over a potential drop target. + */ +org_apache_flex_events_DragEvent.DRAG_OVER = 'dragOver'; + + +/** + * @expose + * @type {string} DRAG_EXIT The event type for leaving a potential drop target. + */ +org_apache_flex_events_DragEvent.DRAG_EXIT = 'dragExit'; + + +/** + * @expose + * @type {string} DRAG_DROP The event type for dropping on a target. + */ +org_apache_flex_events_DragEvent.DRAG_DROP = 'dragDrop'; + + +/** + * @return {boolean} + */ +org_apache_flex_events_DragEvent.installDragEventMixin = function() { + var o = org_apache_flex_events_ElementEvents.elementEvents; + o['dragEnd'] = 1; + o['dragMove'] = 1; + return true; +}; + + +/** + * Add some other events to listen from the element + */ +/** + * @type {boolean} + */ +org_apache_flex_events_DragEvent.dragEventMixin = + org_apache_flex_events_DragEvent.installDragEventMixin(); http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/379e517c/frameworks/projects/Effects/asjs/src/EffectsASJSClasses.as ---------------------------------------------------------------------- diff --git a/frameworks/projects/Effects/asjs/src/EffectsASJSClasses.as b/frameworks/projects/Effects/asjs/src/EffectsASJSClasses.as index 226a9c9..8791afc 100644 --- a/frameworks/projects/Effects/asjs/src/EffectsASJSClasses.as +++ b/frameworks/projects/Effects/asjs/src/EffectsASJSClasses.as @@ -27,6 +27,7 @@ package */ internal class EffectsASJSClasses { + import org.apache.flex.core.StatesWithTransitionsImpl; StatesWithTransitionsImpl; import org.apache.flex.effects.Tween; Tween; import org.apache.flex.effects.Move; Move; import org.apache.flex.effects.Fade; Fade; http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/379e517c/frameworks/projects/Effects/build.xml ---------------------------------------------------------------------- diff --git a/frameworks/projects/Effects/build.xml b/frameworks/projects/Effects/build.xml index 89bed19..1cb2677 100644 --- a/frameworks/projects/Effects/build.xml +++ b/frameworks/projects/Effects/build.xml @@ -27,16 +27,33 @@ + + + + + + + + + - + + + + + + @@ -78,4 +95,59 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + running gjslint + + + + + + + + + + + + + + + + + running jshint + + + + + + + http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/379e517c/frameworks/projects/Effects/compile-asjs-config.xml ---------------------------------------------------------------------- diff --git a/frameworks/projects/Effects/compile-asjs-config.xml b/frameworks/projects/Effects/compile-asjs-config.xml new file mode 100644 index 0000000..95cc01b --- /dev/null +++ b/frameworks/projects/Effects/compile-asjs-config.xml @@ -0,0 +1,70 @@ + + + + + false + + + ${env.AIR_HOME}/frameworks/libs/air/airglobal.swc + ../../libs/Core.swc + ../../libs/Effects.swc + + + + true + + org.apache.flex.events.ValueChangeEvent + org.apache.flex.events.ValueChangeEvent + valueChange + + + Bindable + Managed + ChangeEvent + NonCommittingChangeEvent + Transient + + + + + + + + asjs/src + + + false + + + + + + + asjs/src + + + + library://ns.apache.org/flexjs/basic + + + ${playerglobal.version} + + + http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/379e517c/frameworks/projects/Formatters/build.xml ---------------------------------------------------------------------- diff --git a/frameworks/projects/Formatters/build.xml b/frameworks/projects/Formatters/build.xml index 8e9cd37..ebd561f 100644 --- a/frameworks/projects/Formatters/build.xml +++ b/frameworks/projects/Formatters/build.xml @@ -27,16 +27,33 @@ - + + + + + + + - + + + + + + + + + @@ -78,4 +95,59 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + running gjslint + + + + + + + + + + + + + + + + + running jshint + + + + + + + http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/379e517c/frameworks/projects/Formatters/compile-asjs-config.xml ---------------------------------------------------------------------- diff --git a/frameworks/projects/Formatters/compile-asjs-config.xml b/frameworks/projects/Formatters/compile-asjs-config.xml new file mode 100644 index 0000000..84b8c31 --- /dev/null +++ b/frameworks/projects/Formatters/compile-asjs-config.xml @@ -0,0 +1,71 @@ + + + + + false + + + ${env.AIR_HOME}/frameworks/libs/air/airglobal.swc + ../../libs/Core.swc + ../../libs/HTML.swc + ../../libs/Formatters.swc + + + + true + + org.apache.flex.events.ValueChangeEvent + org.apache.flex.events.ValueChangeEvent + valueChange + + + Bindable + Managed + ChangeEvent + NonCommittingChangeEvent + Transient + + + + + + + + asjs/src + + + false + + + + + + + asjs/src + + + + library://ns.apache.org/flexjs/basic + + + ${playerglobal.version} + + + http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/379e517c/frameworks/projects/Formatters/js/src/org/apache/flex/core/FormatBase.js ---------------------------------------------------------------------- diff --git a/frameworks/projects/Formatters/js/src/org/apache/flex/core/FormatBase.js b/frameworks/projects/Formatters/js/src/org/apache/flex/core/FormatBase.js new file mode 100644 index 0000000..41358eb --- /dev/null +++ b/frameworks/projects/Formatters/js/src/org/apache/flex/core/FormatBase.js @@ -0,0 +1,126 @@ +/** + * 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 + * @suppress {checkTypes} + */ + +goog.provide('org_apache_flex_core_FormatBase'); + +goog.require('org_apache_flex_core_IFormatBead'); +goog.require('org_apache_flex_events_EventDispatcher'); + + + +/** + * @constructor + * @implements {org_apache_flex_core_IFormatBead} + * @extends {org_apache_flex_events_EventDispatcher} + */ +org_apache_flex_core_FormatBase = function() { + goog.base(this); +}; +goog.inherits(org_apache_flex_core_FormatBase, + org_apache_flex_events_EventDispatcher); + + +/** + * Metadata + * + * @type {Object.>} + */ +org_apache_flex_core_FormatBase.prototype.FLEXJS_CLASS_INFO = + { names: [{ name: 'FormatBase', + qName: 'org_apache_flex_core_FormatBase' }], + interfaces: [org_apache_flex_core_IFormatBead] }; + + +/** + * @private + * @type {org_apache_flex_core_IStrand} + */ +org_apache_flex_core_FormatBase.prototype.strand_ = null; + + +/** + * @type {string} + */ +org_apache_flex_core_FormatBase.prototype._propertyName = 'text'; + + +/** + * @type {string} + */ +org_apache_flex_core_FormatBase.prototype._eventName = 'textChange'; + + +/** + * @type {string} + */ +org_apache_flex_core_FormatBase.prototype._formattedResult = ''; + + +Object.defineProperties(org_apache_flex_core_FormatBase.prototype, { + /** @expose */ + strand: { + /** @this {org_apache_flex_core_FormatBase} */ + set: function(value) { + this.strand_ = value; + } + }, + /** @expose */ + propertyValue: { + /** @this {org_apache_flex_core_FormatBase} */ + get: function() { + var value = this.strand_[this.propertyName]; + return value; + } + }, + /** @expose */ + propertyName: { + /** @this {org_apache_flex_core_FormatBase} */ + get: function() { + if (this._propertyName == null) { + this._propertyName = 'text'; + } + return this._propertyName; + }, + /** @this {org_apache_flex_core_FormatBase} */ + set: function(value) { + this._propertyName = value; + } + }, + /** @expose */ + eventName: { + /** @this {org_apache_flex_core_FormatBase} */ + get: function() { + if (this._eventName == null) { + return this._propertyName + 'Change'; + } + return this._eventName; + }, + /** @this {org_apache_flex_core_FormatBase} */ + set: function(value) { + this._eventName = value; + } + }, + /** @expose */ + formattedString: { + /** @this {org_apache_flex_core_FormatBase} */ + get: function() { + return null; + } + } +}); http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/379e517c/frameworks/projects/GoogleMaps/build.xml ---------------------------------------------------------------------- diff --git a/frameworks/projects/GoogleMaps/build.xml b/frameworks/projects/GoogleMaps/build.xml index 95105ef..ffcd0b9 100644 --- a/frameworks/projects/GoogleMaps/build.xml +++ b/frameworks/projects/GoogleMaps/build.xml @@ -27,13 +27,29 @@ - + + + + + + + - + + + + + + + + @@ -78,4 +94,43 @@ + + + + + + + + + + + + + + + running gjslint + + + + + + + + + + + + + + + + + running jshint + + + + + + +