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:37 UTC
[32/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/core/ViewBaseDataBinding.js
----------------------------------------------------------------------
diff --git a/frameworks/js/FlexJS/src/org/apache/flex/core/ViewBaseDataBinding.js b/frameworks/js/FlexJS/src/org/apache/flex/core/ViewBaseDataBinding.js
deleted file mode 100644
index 6271c0f..0000000
--- a/frameworks/js/FlexJS/src/org/apache/flex/core/ViewBaseDataBinding.js
+++ /dev/null
@@ -1,345 +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_ViewBaseDataBinding');
-
-goog.require('org_apache_flex_binding_ConstantBinding');
-goog.require('org_apache_flex_binding_GenericBinding');
-goog.require('org_apache_flex_binding_PropertyWatcher');
-goog.require('org_apache_flex_binding_SimpleBinding');
-goog.require('org_apache_flex_events_Event');
-goog.require('org_apache_flex_events_ValueChangeEvent');
-
-
-
-/**
- * @constructor
- */
-org_apache_flex_core_ViewBaseDataBinding = function() {
-
- /**
- * @private
- * @type {Object}
- */
- this.strand_ = null;
-
- /**
- * @protected
- * @type {Object}
- */
- this.deferredBindings = {};
-
-};
-
-
-/**
- * Metadata
- *
- * @type {Object.<string, Array.<Object>>}
- */
-org_apache_flex_core_ViewBaseDataBinding.prototype.FLEXJS_CLASS_INFO =
- { names: [{ name: 'ViewBaseDataBinding',
- qName: 'org_apache_flex_core_ViewBaseDataBinding'}] };
-
-
-Object.defineProperties(org_apache_flex_core_ViewBaseDataBinding.prototype, {
- /** @expose */
- strand: {
- /** @this {org_apache_flex_core_ViewBaseDataBinding} */
- set: function(value) {
- if (this.strand_ !== value) {
- this.strand_ = value;
- this.strand_.addEventListener('initComplete',
- goog.bind(this.initCompleteHandler, this));
- }
- }
- }
-});
-
-
-/**
- * @protected
- * @param {Object} event The event.
- */
-org_apache_flex_core_ViewBaseDataBinding.prototype.initCompleteHandler =
- function(event) {
-
- var prop;
- var fieldWatcher;
- var sb;
- var bindingData = this.strand_._bindings;
- var n = bindingData[0];
- var bindings = [];
- var i;
- var binding;
- var destination;
- var index = 1;
- for (i = 0; i < n; i++)
- {
- binding = {};
- binding.source = bindingData[index++];
- binding.destFunc = bindingData[index++];
- binding.destination = bindingData[index++];
- bindings.push(binding);
- }
- var watchers = this.decodeWatcher(bindingData.slice(index));
- for (i = 0; i < n; i++)
- {
- binding = bindings[i];
- // try to determine if it is an array
- if (typeof(binding.source) == 'object' &&
- typeof(binding.source.slice) == 'function')
- {
- if (binding.source[0] == 'applicationModel')
- {
- if (binding.source.length == 2 &&
- binding.destination.length == 2)
- {
- // can be simplebinding or constantbinding
- var modelWatcher =
- watchers.watcherMap.applicationModel;
- var childMap = modelWatcher.children.watcherMap;
- fieldWatcher = childMap[binding.source[1]];
- if (typeof(fieldWatcher.eventNames) == 'string')
- {
- sb = new org_apache_flex_binding_SimpleBinding();
- sb.destinationPropertyName =
- binding.destination[1];
- sb.eventName = fieldWatcher.eventNames;
- sb.sourceID = binding.source[0];
- sb.sourcePropertyName = binding.source[1];
- sb.setDocument(this.strand_);
- prop = binding.destination[0];
-
- destination = this.strand_[prop];
-
- if (destination)
- destination.addBead(sb);
- else
- {
- this.deferredBindings[prop] =
- sb;
- this.strand_.addEventListener('valueChange',
- goog.bind(this.deferredBindingsHandler, this));
- }
- }
- else if (fieldWatcher.eventNames == null)
- {
- var cb;
- cb = org_apache_flex_binding_ConstantBinding;
- cb = new cb();
- cb.destinationPropertyName =
- binding.destination[1];
- cb.sourceID = binding.source[0];
- cb.sourcePropertyName = binding.source[1];
- cb.setDocument(this.strand_);
- prop = binding.destination[0];
- destination = this.strand_[prop];
-
- if (destination)
- destination.addBead(cb);
- else
- {
- this.deferredBindings[prop] =
- cb;
- this.strand_.addEventListener('valueChange',
- this.deferredBindingsHandler);
- }
- }
- }
- }
- }
- else if (typeof(binding.source) == 'string')
- {
- fieldWatcher = watchers.watcherMap[binding.source];
- if (typeof(fieldWatcher.eventNames) == 'string')
- {
- sb = new org_apache_flex_binding_SimpleBinding();
- sb.destinationPropertyName = binding.destination[1];
- sb.eventName = fieldWatcher.eventNames;
- sb.sourcePropertyName = binding.source;
- sb.setDocument(this.strand_);
- prop = binding.destination[0];
- destination = this.strand_[prop];
-
- if (destination)
- destination.addBead(sb);
- else
- {
- this.deferredBindings[prop] = sb;
- this.strand_.addEventListener('valueChange',
- this.deferredBindingsHandler);
- }
- }
- }
- else
- {
- this.makeGenericBinding(binding, i, watchers);
- }
- }
-};
-
-
-/**
- * @protected
- * @param {Object} binding The binding object.
- * @param {number} index The offset in the Binding database.
- * @param {Object} watchers The database of Watchers.
- */
-org_apache_flex_core_ViewBaseDataBinding.prototype.makeGenericBinding =
- function(binding, index, watchers) {
- var gb = new org_apache_flex_binding_GenericBinding();
- gb.setDocument(this.strand_);
- gb.destinationData = binding.destination;
- gb.destinationFunction = binding.destFunc;
- gb.source = binding.source;
- this.setupWatchers(gb, index, watchers.watchers, null);
-};
-
-
-/**
- * @protected
- * @param {Object} gb The generic binding object.
- * @param {number} index The offset in the Binding database.
- * @param {Object} watchers The array of Watchers.
- * @param {Object} parentWatcher The parent Watcher or null if top.
- */
-org_apache_flex_core_ViewBaseDataBinding.prototype.setupWatchers =
- function(gb, index, watchers, parentWatcher) {
- var i, n;
- n = watchers.length;
- for (i = 0; i < n; i++)
- {
- var watcher = watchers[i];
- if (watcher.bindings.indexOf(index) != -1)
- {
- var type = watcher.type;
- switch (type)
- {
- case 'property':
- {
- var pw = new org_apache_flex_binding_PropertyWatcher(
- this,
- watcher.propertyName,
- watcher.eventNames,
- watcher.getterFunction);
- watcher.watcher = pw;
- if (parentWatcher)
- pw.parentChanged(parentWatcher.value);
- else
- pw.parentChanged(this.strand_);
- if (parentWatcher)
- parentWatcher.addChild(pw);
- if (watcher.children == null)
- pw.addBinding(gb);
- break;
- }
- }
- if (watcher.children)
- {
- this.setupWatchers(gb, index, watcher.children,
- watcher.watcher);
- }
- }
- }
-};
-
-
-/**
- * @protected
- * @param {Object} bindingData The watcher data to decode.
- * @return {Object} The watcher tree structure.
- */
-org_apache_flex_core_ViewBaseDataBinding.prototype.decodeWatcher =
- function(bindingData) {
- var watcherMap = {};
- var watchers = [];
- var n = bindingData.length - 1; // there is an extra null because
- // it is easier for the compiler
- var index = 0;
- var watcherData;
- while (index < n)
- {
- var watcherIndex = bindingData[index++];
- var type = bindingData[index++];
- switch (type)
- {
- case 0:
- {
- watcherData = { type: 'function' };
- watcherData.functionName = bindingData[index++];
- watcherData.paramFunction = bindingData[index++];
- watcherData.eventNames = bindingData[index++];
- watcherData.bindings = bindingData[index++];
- break;
- }
- case 1:
- {
- watcherData = { type: 'static' };
- watcherData.propertyName = bindingData[index++];
- watcherData.eventNames = bindingData[index++];
- watcherData.bindings = bindingData[index++];
- watcherData.getterFunction = bindingData[index++];
- watcherData.parentObj = bindingData[index++];
- watcherMap[watcherData.propertyName] = watcherData;
- break;
- }
- case 2:
- {
- watcherData = { type: 'property' };
- watcherData.propertyName = bindingData[index++];
- watcherData.eventNames = bindingData[index++];
- watcherData.bindings = bindingData[index++];
- watcherData.getterFunction = bindingData[index++];
- watcherMap[watcherData.propertyName] = watcherData;
- break;
- }
- case 3:
- {
- watcherData = { type: 'xml' };
- watcherData.propertyName = bindingData[index++];
- watcherData.bindings = bindingData[index++];
- watcherMap[watcherData.propertyName] = watcherData;
- break;
- }
- }
- watcherData.children = bindingData[index++];
- if (watcherData.children != null)
- {
- watcherData.children = this.decodeWatcher(watcherData.children);
- }
- watcherData.index = watcherIndex;
- watchers.push(watcherData);
- }
- return { watchers: watchers, watcherMap: watcherMap };
-};
-
-
-/**
- * @protected
- * @param {org_apache_flex_events_ValueChangeEvent} event The event.
- */
-org_apache_flex_core_ViewBaseDataBinding.prototype.deferredBindingsHandler =
- function(event) {
- var p;
- var destination;
- for (p in this.deferredBindings)
- {
- if (p != event.propertyName) continue;
- destination = this.strand_[p];
- destination.addBead(this.deferredBindings[p]);
- delete this.deferredBindings[p];
- }
-};
-
http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/b677c658/frameworks/js/FlexJS/src/org/apache/flex/core/graphics/Circle.js
----------------------------------------------------------------------
diff --git a/frameworks/js/FlexJS/src/org/apache/flex/core/graphics/Circle.js b/frameworks/js/FlexJS/src/org/apache/flex/core/graphics/Circle.js
deleted file mode 100644
index 9dba559..0000000
--- a/frameworks/js/FlexJS/src/org/apache/flex/core/graphics/Circle.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_Circle');
-
-goog.require('org_apache_flex_core_graphics_GraphicShape');
-
-
-
-/**
- * @constructor
- * @extends {org_apache_flex_core_graphics_GraphicShape}
- */
-org_apache_flex_core_graphics_Circle = function() {
- org_apache_flex_core_graphics_Circle.base(this, 'constructor');
-
- /**
- * @private
- * @type {number}
- */
- this.radius_ = 0;
-};
-goog.inherits(org_apache_flex_core_graphics_Circle,
- org_apache_flex_core_graphics_GraphicShape);
-
-
-/**
- * Metadata
- *
- * @type {Object.<string, Array.<Object>>}
- */
-org_apache_flex_core_graphics_Circle.prototype.FLEXJS_CLASS_INFO =
- { names: [{ name: 'Circle',
- qName: 'org_apache_flex_core_graphics_Circle' }] };
-
-
-
-Object.defineProperties(org_apache_flex_core_graphics_Circle.prototype, {
- /** @expose */
- radius: {
- /** @this {org_apache_flex_core_graphics_Circle} */
- set: function(v) {
- this.radius_ = v;
- },
- /** @this {org_apache_flex_core_graphics_Circle} */
- get: function() {
- return this.radius_;
- }
- }
-});
-
-
-/**
- * @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_Circle.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.setAttribute('style', style);
- if (this.stroke)
- {
- circle.setAttribute('cx', String(radius + this.stroke.weight));
- circle.setAttribute('cy', String(radius + this.stroke.weight));
- this.setPosition(x - radius, y - radius, this.stroke.weight, this.stroke.weight);
- }
- else
- {
- circle.setAttribute('cx', String(radius));
- circle.setAttribute('cy', String(radius));
- this.setPosition(x - radius, y - radius, 0, 0);
- }
-
- circle.setAttribute('rx', String(radius));
- circle.setAttribute('ry', String(radius));
- this.element.appendChild(circle);
-
- this.resize(x, y, circle.getBBox());
- };
-
-
-/**
- * @override
- */
-org_apache_flex_core_graphics_Circle.prototype.draw = function() {
- this.drawCircle(this.x, this.y, this.radius);
- };
http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/b677c658/frameworks/js/FlexJS/src/org/apache/flex/core/graphics/Ellipse.js
----------------------------------------------------------------------
diff --git a/frameworks/js/FlexJS/src/org/apache/flex/core/graphics/Ellipse.js b/frameworks/js/FlexJS/src/org/apache/flex/core/graphics/Ellipse.js
deleted file mode 100644
index 65469bb..0000000
--- a/frameworks/js/FlexJS/src/org/apache/flex/core/graphics/Ellipse.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_Ellipse');
-
-goog.require('org_apache_flex_core_graphics_GraphicShape');
-
-
-
-/**
- * @constructor
- * @extends {org_apache_flex_core_graphics_GraphicShape}
- */
-org_apache_flex_core_graphics_Ellipse = function() {
- org_apache_flex_core_graphics_Ellipse.base(this, 'constructor');
-
-};
-goog.inherits(org_apache_flex_core_graphics_Ellipse,
- org_apache_flex_core_graphics_GraphicShape);
-
-
-/**
- * Metadata
- *
- * @type {Object.<string, Array.<Object>>}
- */
-org_apache_flex_core_graphics_Ellipse.prototype.FLEXJS_CLASS_INFO =
- { names: [{ name: 'Ellipse',
- qName: 'org_apache_flex_core_graphics_Ellipse' }] };
-
-
-/**
- * @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_Ellipse.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.setAttribute('style', style);
- if (this.stroke)
- {
- ellipse.setAttribute('cx', String(width / 2 + this.stroke.weight));
- ellipse.setAttribute('cy', String(height / 2 + this.stroke.weight));
- this.setPosition(x, y, this.stroke.weight * 2, this.stroke.weight * 2);
- }
- else
- {
- ellipse.setAttribute('cx', String(width / 2));
- ellipse.setAttribute('cy', String(height / 2));
- this.setPosition(x, y, 0, 0);
- }
- ellipse.setAttribute('rx', String(width / 2));
- ellipse.setAttribute('ry', String(height / 2));
- this.element.appendChild(ellipse);
-
- this.resize(x, y, ellipse.getBBox());
- };
-
-
-/**
- * @override
-*/
-org_apache_flex_core_graphics_Ellipse.prototype.draw = function() {
- this.drawEllipse(this.x, this.y, this.width, this.height);
- };
http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/b677c658/frameworks/js/FlexJS/src/org/apache/flex/core/graphics/GradientBase.js
----------------------------------------------------------------------
diff --git a/frameworks/js/FlexJS/src/org/apache/flex/core/graphics/GradientBase.js b/frameworks/js/FlexJS/src/org/apache/flex/core/graphics/GradientBase.js
deleted file mode 100644
index 3d66aaf..0000000
--- a/frameworks/js/FlexJS/src/org/apache/flex/core/graphics/GradientBase.js
+++ /dev/null
@@ -1,141 +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_GradientBase
- *
- * @fileoverview
- *
- * @suppress {checkTypes}
- */
-
-goog.provide('org_apache_flex_core_graphics_GradientBase');
-
-
-
-/**
- * @constructor
- */
-org_apache_flex_core_graphics_GradientBase = function() {
-};
-
-
-/**
- * @protected
- * @type {Array}
- */
-org_apache_flex_core_graphics_GradientBase.prototype.colors = [];
-
-
-/**
- * @protected
- * @type {Array}
- */
-org_apache_flex_core_graphics_GradientBase.prototype.ratios = [];
-
-
-/**
- * @protected
- * @type {Array}
- */
-org_apache_flex_core_graphics_GradientBase.prototype.alphas = [];
-
-
-/**
- * @type {Array}
- */
-org_apache_flex_core_graphics_GradientBase.prototype._entries = [];
-
-
-/**
- * @type {number}
- */
-org_apache_flex_core_graphics_GradientBase.prototype._rotation = 0.0;
-
-
-Object.defineProperties(org_apache_flex_core_graphics_GradientBase.prototype, {
- /** @expose */
- entries: {
- /** @this {org_apache_flex_core_graphics_GradientBase} */
- get: function() {
- return this._entries;
- },
- /** @this {org_apache_flex_core_graphics_GradientBase} */
- set: function(value) {
- this._entries = value;
- }
- },
- /** @expose */
- rotation: {
- /** @this {org_apache_flex_core_graphics_GradientBase} */
- get: function() {
- return this._rotation;
- },
- /** @this {org_apache_flex_core_graphics_GradientBase} */
- set: function(value) {
- this._rotation = value;
- }
- },
- /** @expose */
- x: {
- /** @this {org_apache_flex_core_graphics_GradientBase} */
- get: function() {
- return this._x;
- },
- /** @this {org_apache_flex_core_graphics_GradientBase} */
- set: function(value) {
- this._x = value;
- }
- },
- /** @expose */
- y: {
- /** @this {org_apache_flex_core_graphics_GradientBase} */
- set: function(value) {
- this._y = value;
- },
- /** @this {org_apache_flex_core_graphics_GradientBase} */
- get: function() {
- return this._y;
- }
- },
- /** @expose */
- newId: {
- /** @this {org_apache_flex_core_graphics_GradientBase} */
- get: function() {
- return 'gradient' + String(Math.floor((Math.random() * 100000) + 1));
- }
- }
-});
-
-
-/**
- * @type {number}
- */
-org_apache_flex_core_graphics_GradientBase.prototype._x = 0;
-
-
-/**
- * @type {number}
- */
-org_apache_flex_core_graphics_GradientBase.prototype._y = 0;
-
-
-/**
- * Metadata
- *
- * @type {Object.<string, Array.<Object>>}
- */
-org_apache_flex_core_graphics_GradientBase.prototype.FLEXJS_CLASS_INFO = {
- names: [{ name: 'GradientBase', qName: 'org_apache_flex_core_graphics_GradientBase'}]
- };
http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/b677c658/frameworks/js/FlexJS/src/org/apache/flex/core/graphics/GradientEntry.js
----------------------------------------------------------------------
diff --git a/frameworks/js/FlexJS/src/org/apache/flex/core/graphics/GradientEntry.js b/frameworks/js/FlexJS/src/org/apache/flex/core/graphics/GradientEntry.js
deleted file mode 100644
index 632a4ed..0000000
--- a/frameworks/js/FlexJS/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.<string, Array.<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/b677c658/frameworks/js/FlexJS/src/org/apache/flex/core/graphics/GraphicShape.js
----------------------------------------------------------------------
diff --git a/frameworks/js/FlexJS/src/org/apache/flex/core/graphics/GraphicShape.js b/frameworks/js/FlexJS/src/org/apache/flex/core/graphics/GraphicShape.js
deleted file mode 100644
index 4f6851c..0000000
--- a/frameworks/js/FlexJS/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.<string, Array.<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/b677c658/frameworks/js/FlexJS/src/org/apache/flex/core/graphics/GraphicsContainer.js
----------------------------------------------------------------------
diff --git a/frameworks/js/FlexJS/src/org/apache/flex/core/graphics/GraphicsContainer.js b/frameworks/js/FlexJS/src/org/apache/flex/core/graphics/GraphicsContainer.js
deleted file mode 100644
index b5ec97f..0000000
--- a/frameworks/js/FlexJS/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.<string, Array.<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/b677c658/frameworks/js/FlexJS/src/org/apache/flex/core/graphics/IFill.js
----------------------------------------------------------------------
diff --git a/frameworks/js/FlexJS/src/org/apache/flex/core/graphics/IFill.js b/frameworks/js/FlexJS/src/org/apache/flex/core/graphics/IFill.js
deleted file mode 100644
index ac572d7..0000000
--- a/frameworks/js/FlexJS/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.<string, Array.<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/b677c658/frameworks/js/FlexJS/src/org/apache/flex/core/graphics/IStroke.js
----------------------------------------------------------------------
diff --git a/frameworks/js/FlexJS/src/org/apache/flex/core/graphics/IStroke.js b/frameworks/js/FlexJS/src/org/apache/flex/core/graphics/IStroke.js
deleted file mode 100644
index 398b4e6..0000000
--- a/frameworks/js/FlexJS/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.<string, Array.<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/b677c658/frameworks/js/FlexJS/src/org/apache/flex/core/graphics/Line.js
----------------------------------------------------------------------
diff --git a/frameworks/js/FlexJS/src/org/apache/flex/core/graphics/Line.js b/frameworks/js/FlexJS/src/org/apache/flex/core/graphics/Line.js
deleted file mode 100644
index b45f8d7..0000000
--- a/frameworks/js/FlexJS/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.<string, Array.<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/b677c658/frameworks/js/FlexJS/src/org/apache/flex/core/graphics/LinearGradient.js
----------------------------------------------------------------------
diff --git a/frameworks/js/FlexJS/src/org/apache/flex/core/graphics/LinearGradient.js b/frameworks/js/FlexJS/src/org/apache/flex/core/graphics/LinearGradient.js
deleted file mode 100644
index 5711ffc..0000000
--- a/frameworks/js/FlexJS/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.<string, Array.<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/b677c658/frameworks/js/FlexJS/src/org/apache/flex/core/graphics/Path.js
----------------------------------------------------------------------
diff --git a/frameworks/js/FlexJS/src/org/apache/flex/core/graphics/Path.js b/frameworks/js/FlexJS/src/org/apache/flex/core/graphics/Path.js
deleted file mode 100644
index 1a8c04c..0000000
--- a/frameworks/js/FlexJS/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.<string, Array.<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/b677c658/frameworks/js/FlexJS/src/org/apache/flex/core/graphics/Rect.js
----------------------------------------------------------------------
diff --git a/frameworks/js/FlexJS/src/org/apache/flex/core/graphics/Rect.js b/frameworks/js/FlexJS/src/org/apache/flex/core/graphics/Rect.js
deleted file mode 100644
index 2a3c849..0000000
--- a/frameworks/js/FlexJS/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.<string, Array.<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/b677c658/frameworks/js/FlexJS/src/org/apache/flex/core/graphics/SolidColor.js
----------------------------------------------------------------------
diff --git a/frameworks/js/FlexJS/src/org/apache/flex/core/graphics/SolidColor.js b/frameworks/js/FlexJS/src/org/apache/flex/core/graphics/SolidColor.js
deleted file mode 100644
index d534260..0000000
--- a/frameworks/js/FlexJS/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.<string, Array.<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/b677c658/frameworks/js/FlexJS/src/org/apache/flex/core/graphics/SolidColorStroke.js
----------------------------------------------------------------------
diff --git a/frameworks/js/FlexJS/src/org/apache/flex/core/graphics/SolidColorStroke.js b/frameworks/js/FlexJS/src/org/apache/flex/core/graphics/SolidColorStroke.js
deleted file mode 100644
index 1ce52f6..0000000
--- a/frameworks/js/FlexJS/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.<string, Array.<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/b677c658/frameworks/js/FlexJS/src/org/apache/flex/core/graphics/Text.js
----------------------------------------------------------------------
diff --git a/frameworks/js/FlexJS/src/org/apache/flex/core/graphics/Text.js b/frameworks/js/FlexJS/src/org/apache/flex/core/graphics/Text.js
deleted file mode 100644
index 80afbda..0000000
--- a/frameworks/js/FlexJS/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.<string, Array.<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/b677c658/frameworks/js/FlexJS/src/org/apache/flex/createjs/Application.js
----------------------------------------------------------------------
diff --git a/frameworks/js/FlexJS/src/org/apache/flex/createjs/Application.js b/frameworks/js/FlexJS/src/org/apache/flex/createjs/Application.js
deleted file mode 100644
index 82ffdcc..0000000
--- a/frameworks/js/FlexJS/src/org/apache/flex/createjs/Application.js
+++ /dev/null
@@ -1,121 +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.
- */
-
-// ------------------------------------------------------------------
-// createjs
-// ------------------------------------------------------------------
-
-// Bring in the createjs sources. You can use the minified versions for
-// better performance.
-//var mainjs = document.createElement('script');
-//mainjs.src = './createjs/easeljs-0.6.0.min.js';
-//document.head.appendChild(mainjs);
-
-// ------------------------------------------------------------------
-// end createjs
-// ------------------------------------------------------------------
-
-goog.provide('org_apache_flex_createjs_Application');
-
-goog.require('org_apache_flex_core_HTMLElementWrapper');
-goog.require('org_apache_flex_utils_MXMLDataInterpreter');
-
-
-
-/**
- * @constructor
- * @extends {org_apache_flex_core_HTMLElementWrapper}
- */
-org_apache_flex_createjs_Application = function() {
- org_apache_flex_createjs_Application.base(this, 'constructor');
-};
-goog.inherits(org_apache_flex_createjs_Application,
- org_apache_flex_core_HTMLElementWrapper);
-
-
-/**
- * @expose
- * @type {Object}
- */
-org_apache_flex_createjs_Application.prototype.controller = null;
-
-
-/**
- * @expose
- * @type {org_apache_flex_createjs_core_ViewBase}
- */
-org_apache_flex_createjs_Application.prototype.initialView = null;
-
-
-/**
- * @expose
- * @type {createjs.Stage}
- */
-org_apache_flex_createjs_Application.prototype.stage = null;
-
-
-/**
- * @expose
- * @type {org_apache_flex_events_EventDispatcher}
- */
-org_apache_flex_createjs_Application.prototype.model = null;
-
-
-/**
- * @expose
- * @type {org_apache_flex_core_SimpleValuesImpl}
- */
-org_apache_flex_createjs_Application.prototype.valuesImpl = null;
-
-
-/**
- * @expose
- */
-org_apache_flex_createjs_Application.prototype.start = function() {
- var body;
-
- // For createjs, the application is the same as the canvas
- // and it provides convenient access to the stage.
-
- this.element = document.createElement('canvas');
- this.element.id = 'flexjsCanvas';
- this.element.width = 700;
- this.element.height = 500;
-
- body = document.getElementsByTagName('body')[0];
- body.appendChild(this.element);
-
- this.stage = new createjs.Stage('flexjsCanvas');
-
- org_apache_flex_utils_MXMLDataInterpreter.generateMXMLProperties(this,
- this.MXMLProperties);
-
- this.dispatchEvent('initialize');
-
- this.initialView.applicationModel = this.model;
- this.addElement(this.initialView);
-
- this.dispatchEvent('viewChanged');
-};
-
-
-/**
- * @param {Object} c The child element.
- */
-org_apache_flex_createjs_core_Application.prototype.addElement =
- function(c) {
- this.stage.addChild(c.element);
- c.addedToParent();
-};
-
http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/b677c658/frameworks/js/FlexJS/src/org/apache/flex/createjs/CheckBox.js
----------------------------------------------------------------------
diff --git a/frameworks/js/FlexJS/src/org/apache/flex/createjs/CheckBox.js b/frameworks/js/FlexJS/src/org/apache/flex/createjs/CheckBox.js
deleted file mode 100644
index 06c89a8..0000000
--- a/frameworks/js/FlexJS/src/org/apache/flex/createjs/CheckBox.js
+++ /dev/null
@@ -1,130 +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_createjs_CheckBox');
-
-goog.require('org_apache_flex_createjs_core_UIBase');
-
-
-
-/**
- * @constructor
- * @extends {org_apache_flex_createjs_core_UIBase}
- */
-org_apache_flex_createjs_CheckBox = function() {
- org_apache_flex_createjs_CheckBox.base(this, 'constructor');
-};
-goog.inherits(org_apache_flex_createjs_CheckBox,
- org_apache_flex_createjs_core_UIBase);
-
-
-/**
- * @expose
- * @type {Object}
- */
-org_apache_flex_createjs_CheckBox.prototype.checkMark = null;
-
-
-/**
- * @expose
- * @type {Object}
- */
-org_apache_flex_createjs_CheckBox.prototype.checkMarkBackground =
- null;
-
-
-/**
- * @expose
- * @type {Object}
- */
-org_apache_flex_createjs_CheckBox.prototype.checkBoxLabel = null;
-
-
-/**
- * @override
- */
-org_apache_flex_createjs_CheckBox.prototype.createElement =
- function() {
- this.checkMarkBackground = new createjs.Shape();
- this.checkMarkBackground.name = 'checkmarkbackground';
- this.checkMarkBackground.graphics.beginFill('red').
- drawRoundRect(0, 0, 40, 40, 8);
- //this.checkMarkBackground.graphics.setStrokeStyle( 0 ).beginStroke('#000').
- // drawRect( 0, 0, this.width, this.height);
- //var hit = new createjs.Shape();
- //hit.graphics.beginFill("#000").drawRect(0, 0, this.width, this.height);
- //this.checkMarkBackground.hitArea = hit;
-
- this.checkMark = new createjs.Shape();
- this.checkMark.name = 'checkmark';
- this.checkMark.graphics.beginFill('white').drawRoundRect(0, 0, 32, 32, 6);
- this.checkMark.x = 4;
- this.checkMark.y = 4;
- this.checkMark.visible = this.selected;
-
- this.checkBoxLabel = new createjs.Text('checkbox', '20px Arial', '#ff7700');
- this.checkBoxLabel.name = 'label';
- this.checkBoxLabel.textAlign = 'left';
- this.checkBoxLabel.textBaseline = 'middle';
- this.checkBoxLabel.x = 45;
- this.checkBoxLabel.y = 40 / 2;
-
- this.element = new createjs.Container();
- this.element.name = 'checkbox';
- this.element.addChild(this.checkMarkBackground, this.checkBoxLabel,
- this.checkMark);
- // use bind(this) to avoid loose scope
- this.element.onClick = this.clickHandler.bind(this);
-
- this.positioner = this.element;
-
- return this.element;
-};
-
-
-Object.defineProperties(org_apache_flex_createjs_CheckBox.prototype, {
- /** @expose */
- text: {
- /** @this {org_apache_flex_createjs_CheckBox} */
- get: function() {
- return this.checkBoxLabel.text;
- },
- /** @this {org_apache_flex_createjs_CheckBox} */
- set: function(value) {
- this.checkBoxLabel.text = value;
- }
- },
- /** @expose */
- selected: {
- /** @this {org_apache_flex_createjs_CheckBox} */
- get: function() {
- return this.selected;
- },
- /** @this {org_apache_flex_createjs_CheckBox} */
- set: function(value) {
- this.checkMark.visible = this.selected = value;
- this.element.getStage().update();
- }
- }
-});
-
-
-/**
- * @expose
- * @param {string|Object|goog.events.Event} event The event.
- */
-org_apache_flex_createjs_CheckBox.prototype.clickHandler =
- function(event) {
- this.selected = !this.selected;
-};
http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/b677c658/frameworks/js/FlexJS/src/org/apache/flex/createjs/Label.js
----------------------------------------------------------------------
diff --git a/frameworks/js/FlexJS/src/org/apache/flex/createjs/Label.js b/frameworks/js/FlexJS/src/org/apache/flex/createjs/Label.js
deleted file mode 100644
index 6dc5f10..0000000
--- a/frameworks/js/FlexJS/src/org/apache/flex/createjs/Label.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_createjs_Label');
-
-goog.require('org_apache_flex_createjs_core_UIBase');
-
-
-
-/**
- * @constructor
- * @extends {org_apache_flex_createjs_core_UIBase}
- */
-org_apache_flex_createjs_Label = function() {
- org_apache_flex_createjs_core_UIBase.call(this);
-};
-goog.inherits(org_apache_flex_createjs_Label,
- org_apache_flex_createjs_core_UIBase);
-
-
-/**
- * @override
- */
-org_apache_flex_createjs_Label.prototype.createElement =
- function(p) {
- org_apache_flex_createjs_Label.base(this, 'createElement');
-
- this.element = new createjs.Text('default text', '20px Arial', '#ff7700');
- this.element.x = 0;
- this.element.y = 20;
- this.element.textBaseline = 'alphabetic';
- p.addChild(this.element);
- p.getStage().update();
-
- this.positioner = this.element;
-};
-
-
-Object.defineProperties(org_apache_flex_createjs_Label.prototype, {
- /** @expose */
- text: {
- /** @this {org_apache_flex_createjs_Label} */
- get: function() {
- return this.element.text;
- },
- /** @this {org_apache_flex_createjs_Label} */
- set: function(value) {
- this.element.text = value;
- this.element.getStage().update();
- }
- }
-});
http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/b677c658/frameworks/js/FlexJS/src/org/apache/flex/createjs/TextButton.js
----------------------------------------------------------------------
diff --git a/frameworks/js/FlexJS/src/org/apache/flex/createjs/TextButton.js b/frameworks/js/FlexJS/src/org/apache/flex/createjs/TextButton.js
deleted file mode 100644
index d6b8425..0000000
--- a/frameworks/js/FlexJS/src/org/apache/flex/createjs/TextButton.js
+++ /dev/null
@@ -1,90 +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_createjs_TextButton');
-
-goog.require('org_apache_flex_createjs_core_UIBase');
-
-
-
-/**
- * @constructor
- * @extends {org_apache_flex_createjs_core_UIBase}
- */
-org_apache_flex_createjs_TextButton = function() {
- org_apache_flex_createjs_core_UIBase.call(this);
-};
-goog.inherits(org_apache_flex_createjs_TextButton,
- org_apache_flex_createjs_core_UIBase);
-
-
-/**
- * @expose
- * @type {Object}
- */
-org_apache_flex_createjs_TextButton.prototype.buttonLabel = null;
-
-
-/**
- * @expose
- * @type {Object}
- */
-org_apache_flex_createjs_TextButton.prototype.buttonBackground =
- null;
-
-
-/**
- * @override
- */
-org_apache_flex_createjs_TextButton.prototype.createElement =
- function(p) {
-
- this.buttonBackground = new createjs.Shape();
- this.buttonBackground.name = 'background';
- this.buttonBackground.graphics.beginFill('red').
- drawRoundRect(0, 0, 200, 60, 10);
-
- this.buttonLabel = new createjs.Text('button', 'bold 24px Arial',
- '#FFFFFF');
- this.buttonLabel.name = 'label';
- this.buttonLabel.textAlign = 'center';
- this.buttonLabel.textBaseline = 'middle';
- this.buttonLabel.x = 200 / 2;
- this.buttonLabel.y = 60 / 2;
-
- this.element = new createjs.Container();
- this.element.name = 'button';
- this.element.x = 50;
- this.element.y = 25;
- this.element.addChild(this.buttonBackground, this.buttonLabel);
- p.addChild(this.element);
-
- this.positioner = this.element;
- this.element.flexjs_wrapper = this;
-};
-
-
-Object.defineProperties(org_apache_flex_createjs_TextButton.prototype, {
- /** @expose */
- text: {
- /** @this {org_apache_flex_createjs_TextButton} */
- get: function() {
- return this.buttonLabel.text;
- },
- /** @this {org_apache_flex_createjs_TextButton} */
- set: function(value) {
- this.buttonLabel.text = value;
- }
- }
-});
http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/b677c658/frameworks/js/FlexJS/src/org/apache/flex/createjs/core/UIBase.js
----------------------------------------------------------------------
diff --git a/frameworks/js/FlexJS/src/org/apache/flex/createjs/core/UIBase.js b/frameworks/js/FlexJS/src/org/apache/flex/createjs/core/UIBase.js
deleted file mode 100644
index ee80cd7..0000000
--- a/frameworks/js/FlexJS/src/org/apache/flex/createjs/core/UIBase.js
+++ /dev/null
@@ -1,135 +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_createjs_core_UIBase');
-
-goog.require('org_apache_flex_core_HTMLElementWrapper');
-
-
-
-/**
- * @constructor
- * @extends {org_apache_flex_core_HTMLElementWrapper}
- */
-org_apache_flex_createjs_core_UIBase = function() {
- org_apache_flex_createjs_core_UIBase.base(this, 'constructor');
-
- /**
- * @protected
- * @type {Object}
- */
- this.positioner = null;
-
- this.createElement();
-};
-goog.inherits(org_apache_flex_createjs_core_UIBase,
- org_apache_flex_core_HTMLElementWrapper);
-
-
-/**
- * @param {Object} c The child element.
- */
-org_apache_flex_createjs_core_UIBase.prototype.addElement =
- function(c) {
- this.addChild(c.element);
-};
-
-
-/**
- */
-org_apache_flex_createjs_core_UIBase.prototype.createElement =
- function() {
- this.element = new createjs.Container();
-
- this.positioner = this.element;
-};
-
-
-Object.defineProperties(org_apache_flex_createjs_core_UIBase.prototype, {
- /** @expose */
- x: {
- /** @this {org_apache_flex_createjs_core_UIBase} */
- set: function(pixels) {
- this.positioner.x = pixels;
- this.element.getStage().update();
- }
- },
- /** @expose */
- y: {
- /** @this {org_apache_flex_createjs_core_UIBase} */
- set: function(pixels) {
- this.positioner.y = pixels;
- this.element.getStage().update();
- }
- },
- /** @expose */
- width: {
- /** @this {org_apache_flex_createjs_core_UIBase} */
- set: function(pixels) {
- this.positioner.width = pixels;
- this.element.getStage().update();
- }
- },
- /** @expose */
- height: {
- /** @this {org_apache_flex_createjs_core_UIBase} */
- set: function(pixels) {
- this.positioner.height = pixels;
- this.element.getStage().update();
- }
- },
- /** @expose */
- id: {
- /** @this {org_apache_flex_createjs_core_UIBase} */
- get: function() {
- return this.name;
- },
- /** @this {org_apache_flex_createjs_core_UIBase} */
- set: function(value) {
- if (this.name !== value) {
- this.element.name = value;
- this.name = value;
- this.dispatchEvent('idChanged');
- }
- }
- },
- /** @expose */
- model: {
- /** @this {org_apache_flex_createjs_core_UIBase} */
- get: function() {
- return this.model;
- },
- /** @this {org_apache_flex_createjs_core_UIBase} */
- set: function(value) {
- if (this.model !== value) {
- this.addBead(value);
- this.dispatchEvent('modelChanged');
- }
- }
- }
-});
-
-
-/**
- * @expose
- * @type {string}
- */
-org_apache_flex_createjs_core_UIBase.prototype.id = null;
-
-
-/**
- * @expose
- * @type {object}
- */
-org_apache_flex_createjs_core_UIBase.prototype.model = null;
http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/b677c658/frameworks/js/FlexJS/src/org/apache/flex/createjs/core/ViewBase.js
----------------------------------------------------------------------
diff --git a/frameworks/js/FlexJS/src/org/apache/flex/createjs/core/ViewBase.js b/frameworks/js/FlexJS/src/org/apache/flex/createjs/core/ViewBase.js
deleted file mode 100644
index baf26a3..0000000
--- a/frameworks/js/FlexJS/src/org/apache/flex/createjs/core/ViewBase.js
+++ /dev/null
@@ -1,76 +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_createjs_core_ViewBase');
-
-goog.require('org_apache_flex_createjs_core_UIBase');
-goog.require('org_apache_flex_utils_MXMLDataInterpreter');
-
-
-
-/**
- * @constructor
- * @extends {org_apache_flex_createjs_core_UIBase}
- */
-org_apache_flex_createjs_core_ViewBase = function() {
- org_apache_flex_createjs_core_ViewBase.base(this, 'constructor');
-
- /**
- * @private
- * @type {org_apache_flex_createjs_core_ViewBase}
- */
- this.currentObject_ = null;
-};
-goog.inherits(org_apache_flex_createjs_core_ViewBase,
- org_apache_flex_createjs_core_UIBase);
-
-
-Object.defineProperties(org_apache_flex_createjs_core_ViewBase.prototype, {
- /** @expose */
- applicationModel: {
- /** @this {org_apache_flex_createjs_core_ViewBase} */
- get: function() {
- return this.applicationModel_;
- },
- set: function(value) {
- this.applicationModel = value;
- }
- }
-});
-
-
-/**
- * @expose
- * @type {Array}
- */
-org_apache_flex_createjs_core_ViewBase.prototype.MXMLProperties = null;
-
-
-/**
- * @expose
- * @type {Array}
- */
-org_apache_flex_createjs_core_ViewBase.prototype.MXMLDescriptor = null;
-
-
-/**
- * @param {Object} model The model for this view.
- */
-org_apache_flex_createjs_core_ViewBase.prototype.initUI = function(model) {
- this.applicationModel = model;
- org_apache_flex_utils_MXMLDataInterpreter.generateMXMLProperties(this,
- this.MXMLProperties);
- org_apache_flex_utils_MXMLDataInterpreter.generateMXMLInstances(this,
- this, this.MXMLDescriptor);
-};