Repository: flex-asjs Updated Branches: refs/heads/VF2JS f5acbdf43 -> cb5e9a795
Moving the VF2JS classes into the FlexJS JS framework. In order to stay as close to FlexJS as I can I have moved the VF2JS files into the FlexJS JS framework. This should also cause them to be included in future FlexJS releases. Signed-off-by: Erik de Bruin <e...@ixsoftware.nl> Project: http://git-wip-us.apache.org/repos/asf/flex-asjs/repo Commit: http://git-wip-us.apache.org/repos/asf/flex-asjs/commit/cb5e9a79 Tree: http://git-wip-us.apache.org/repos/asf/flex-asjs/tree/cb5e9a79 Diff: http://git-wip-us.apache.org/repos/asf/flex-asjs/diff/cb5e9a79 Branch: refs/heads/VF2JS Commit: cb5e9a79551a4b0cef52ec565d225905106ccec1 Parents: f5acbdf Author: Erik de Bruin <e...@ixsoftware.nl> Authored: Thu Jul 31 14:56:23 2014 +0200 Committer: Erik de Bruin <e...@ixsoftware.nl> Committed: Thu Jul 31 14:56:23 2014 +0200 ---------------------------------------------------------------------- .../js/FlexJS/src/vf2js_mx/components/Button.js | 24 +++ .../src/vf2js_s/components/Application.js | 30 ++++ .../js/FlexJS/src/vf2js_s/components/Button.css | 17 ++ .../js/FlexJS/src/vf2js_s/components/Button.js | 163 +++++++++++++++++++ .../src/vf2js_s/components/ButtonRenderer.js | 92 +++++++++++ .../js/VF2JS/src/vf2js_mx/components/Button.js | 24 --- .../VF2JS/src/vf2js_s/components/Application.js | 30 ---- .../js/VF2JS/src/vf2js_s/components/Button.css | 17 -- .../js/VF2JS/src/vf2js_s/components/Button.js | 163 ------------------- .../src/vf2js_s/components/ButtonRenderer.js | 92 ----------- 10 files changed, 326 insertions(+), 326 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/cb5e9a79/frameworks/js/FlexJS/src/vf2js_mx/components/Button.js ---------------------------------------------------------------------- diff --git a/frameworks/js/FlexJS/src/vf2js_mx/components/Button.js b/frameworks/js/FlexJS/src/vf2js_mx/components/Button.js new file mode 100644 index 0000000..6e984b8 --- /dev/null +++ b/frameworks/js/FlexJS/src/vf2js_mx/components/Button.js @@ -0,0 +1,24 @@ +/** + * Licensed under the Apache License, Version 2.0 (the 'License'); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an 'AS IS' BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +'use strict'; + +goog.provide('vf2js_mx.components.Button'); + + + +/** + * @constructor + */ +vf2js_mx.components.Button = function() {}; \ No newline at end of file http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/cb5e9a79/frameworks/js/FlexJS/src/vf2js_s/components/Application.js ---------------------------------------------------------------------- diff --git a/frameworks/js/FlexJS/src/vf2js_s/components/Application.js b/frameworks/js/FlexJS/src/vf2js_s/components/Application.js new file mode 100644 index 0000000..247b13c --- /dev/null +++ b/frameworks/js/FlexJS/src/vf2js_s/components/Application.js @@ -0,0 +1,30 @@ +/** + * Licensed under the Apache License, Version 2.0 (the 'License'); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an 'AS IS' BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +/** + * @fileoverview 'Spark' Application class. + * + * @author erikdebr...@apache.org (Erik de Bruin) + */ + +'use strict'; + +goog.provide('vf2js_s.components.Application'); + + + +/** + * @constructor + */ +vf2js_s.components.Application = function() {}; http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/cb5e9a79/frameworks/js/FlexJS/src/vf2js_s/components/Button.css ---------------------------------------------------------------------- diff --git a/frameworks/js/FlexJS/src/vf2js_s/components/Button.css b/frameworks/js/FlexJS/src/vf2js_s/components/Button.css new file mode 100644 index 0000000..4d05b32 --- /dev/null +++ b/frameworks/js/FlexJS/src/vf2js_s/components/Button.css @@ -0,0 +1,17 @@ +/** + * Licensed under the Apache License, Version 2.0 (the 'License'); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an 'AS IS' BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +.vf2js_s-components-buttonrenderer { + color: red; +} \ No newline at end of file http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/cb5e9a79/frameworks/js/FlexJS/src/vf2js_s/components/Button.js ---------------------------------------------------------------------- diff --git a/frameworks/js/FlexJS/src/vf2js_s/components/Button.js b/frameworks/js/FlexJS/src/vf2js_s/components/Button.js new file mode 100644 index 0000000..a0beed4 --- /dev/null +++ b/frameworks/js/FlexJS/src/vf2js_s/components/Button.js @@ -0,0 +1,163 @@ +/** + * Licensed under the Apache License, Version 2.0 (the 'License'); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an 'AS IS' BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +/** + * @fileoverview A 'Spark' button component. + * + * @author erikdebr...@apache.org (Erik de Bruin) + */ + +'use strict'; + +goog.provide('vf2js_s.components.Button'); + +goog.require('goog.ui.Control'); +goog.require('vf2js_s.components.ButtonRenderer'); + + + +/** + * @constructor + * + * @extends {goog.ui.Control} + */ +vf2js_s.components.Button = function() { + vf2js_s.components.Button.base(this, 'constructor'); +}; +goog.inherits(vf2js_s.components.Button, goog.ui.Control); + + +//------------------------------------------------------------------------------ +// +// Enums +// +//------------------------------------------------------------------------------ + + +/** + * IdFragment + * + * @enum {string} + */ +vf2js_s.components.Button.IdFragment = { + BUTTON: 'button' +}; + + +//------------------------------------------------------------------------------ +// +// Properties +// +//------------------------------------------------------------------------------ + + +//-------------------------------------- +// id +//-------------------------------------- + +/** + * @type {string} + */ +vf2js_s.components.Button.prototype.id; + + +//-------------------------------------- +// label +//-------------------------------------- + +/** + * @private + * + * @type {string} + */ +vf2js_s.components.Button.prototype.label_; + +/** + * @type {string} + */ +vf2js_s.components.Button.prototype.label; + +Object.defineProperty(vf2js_s.components.Button.prototype, 'label', { + get: function () { + return this.label_; + }, + set: function (value) { + var /** @type {Element} */ element; + + this.label_ = value; + + element = this.getElement(); + if (element) { + element.firstChild.value = this.label_; + } + } +}); + + +//------------------------------------------------------------------------------ +// +// Methods +// +//------------------------------------------------------------------------------ + + +/** + * enterDocument + * + * @inheritDoc + */ +vf2js_s.components.Button.prototype.enterDocument = function() { + vf2js_s.components.Button.base(this, 'enterDocument'); + + this.setId(this.id); + + this.label = this.label_; + + // - add handlers using 'this.getHandler()' +}; + + +/** + * exitDocument + * + * @inheritDoc + */ +vf2js_s.components.Button.prototype.exitDocument = function() { + vf2js_s.components.Button.base(this, 'exitDocument'); + + // - remove handlers that are not attached with 'this.getHandler()' +}; + + +/** + * disposeInternal + * + * @inheritDoc + */ +vf2js_s.components.Button.prototype.disposeInternal = function() { + vf2js_s.components.Button.base(this, 'disposeInternal'); + + // +}; + + +//------------------------------------------------------------------------------ +// +// Metadata +// +//------------------------------------------------------------------------------ + + +goog.ui.registry.setDefaultRenderer(vf2js_s.components.Button, + vf2js_s.components.ButtonRenderer); http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/cb5e9a79/frameworks/js/FlexJS/src/vf2js_s/components/ButtonRenderer.js ---------------------------------------------------------------------- diff --git a/frameworks/js/FlexJS/src/vf2js_s/components/ButtonRenderer.js b/frameworks/js/FlexJS/src/vf2js_s/components/ButtonRenderer.js new file mode 100644 index 0000000..009e9b3 --- /dev/null +++ b/frameworks/js/FlexJS/src/vf2js_s/components/ButtonRenderer.js @@ -0,0 +1,92 @@ +/** + * Licensed under the Apache License, Version 2.0 (the 'License'); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an 'AS IS' BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +/** + * @fileoverview The renderer for 'Spark' button components. + * + * @author erikdebr...@apache.org (Erik de Bruin) + */ + +'use strict'; + +goog.provide('vf2js_s.components.ButtonRenderer'); + +goog.require('goog.ui.ControlRenderer'); + + + +/** + * @constructor + * + * @extends {goog.ui.ControlRenderer} + */ +vf2js_s.components.ButtonRenderer = function() { + vf2js_s.components.ButtonRenderer.base(this, 'constructor'); +}; +goog.inherits(vf2js_s.components.ButtonRenderer, goog.ui.ControlRenderer); +goog.addSingletonGetter(vf2js_s.components.ButtonRenderer); + + +//------------------------------------------------------------------------------ +// +// Static Constants +// +//------------------------------------------------------------------------------ + + +/** + * CSS_CLASS + * + * @const + * + * @type {string} + */ +vf2js_s.components.ButtonRenderer.CSS_CLASS = + 'vf2js_s-components-buttonrenderer'; + + +//------------------------------------------------------------------------------ +// +// Methods +// +//------------------------------------------------------------------------------ + + +/** + * getCssClass + * + * @inheritDoc + */ +vf2js_s.components.ButtonRenderer.prototype.getCssClass = function () { + return vf2js_s.components.ButtonRenderer.CSS_CLASS; +}; + + +/** + * createDom + * + * @inheritDoc + */ +vf2js_s.components.ButtonRenderer.prototype.createDom = function (button) { + var /** @type {?Element} */ element; + + element = vf2js_s.components.ButtonRenderer.base(this, 'createDom', button); + + element.appendChild( + goog.dom.createDom('input', { 'type': 'button' })); + + button.setElementInternal(element); + + return element; +}; http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/cb5e9a79/frameworks/js/VF2JS/src/vf2js_mx/components/Button.js ---------------------------------------------------------------------- diff --git a/frameworks/js/VF2JS/src/vf2js_mx/components/Button.js b/frameworks/js/VF2JS/src/vf2js_mx/components/Button.js deleted file mode 100644 index 6e984b8..0000000 --- a/frameworks/js/VF2JS/src/vf2js_mx/components/Button.js +++ /dev/null @@ -1,24 +0,0 @@ -/** - * Licensed under the Apache License, Version 2.0 (the 'License'); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an 'AS IS' BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -'use strict'; - -goog.provide('vf2js_mx.components.Button'); - - - -/** - * @constructor - */ -vf2js_mx.components.Button = function() {}; \ No newline at end of file http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/cb5e9a79/frameworks/js/VF2JS/src/vf2js_s/components/Application.js ---------------------------------------------------------------------- diff --git a/frameworks/js/VF2JS/src/vf2js_s/components/Application.js b/frameworks/js/VF2JS/src/vf2js_s/components/Application.js deleted file mode 100644 index 247b13c..0000000 --- a/frameworks/js/VF2JS/src/vf2js_s/components/Application.js +++ /dev/null @@ -1,30 +0,0 @@ -/** - * Licensed under the Apache License, Version 2.0 (the 'License'); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an 'AS IS' BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -/** - * @fileoverview 'Spark' Application class. - * - * @author erikdebr...@apache.org (Erik de Bruin) - */ - -'use strict'; - -goog.provide('vf2js_s.components.Application'); - - - -/** - * @constructor - */ -vf2js_s.components.Application = function() {}; http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/cb5e9a79/frameworks/js/VF2JS/src/vf2js_s/components/Button.css ---------------------------------------------------------------------- diff --git a/frameworks/js/VF2JS/src/vf2js_s/components/Button.css b/frameworks/js/VF2JS/src/vf2js_s/components/Button.css deleted file mode 100644 index 4d05b32..0000000 --- a/frameworks/js/VF2JS/src/vf2js_s/components/Button.css +++ /dev/null @@ -1,17 +0,0 @@ -/** - * Licensed under the Apache License, Version 2.0 (the 'License'); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an 'AS IS' BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -.vf2js_s-components-buttonrenderer { - color: red; -} \ No newline at end of file http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/cb5e9a79/frameworks/js/VF2JS/src/vf2js_s/components/Button.js ---------------------------------------------------------------------- diff --git a/frameworks/js/VF2JS/src/vf2js_s/components/Button.js b/frameworks/js/VF2JS/src/vf2js_s/components/Button.js deleted file mode 100644 index a0beed4..0000000 --- a/frameworks/js/VF2JS/src/vf2js_s/components/Button.js +++ /dev/null @@ -1,163 +0,0 @@ -/** - * Licensed under the Apache License, Version 2.0 (the 'License'); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an 'AS IS' BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -/** - * @fileoverview A 'Spark' button component. - * - * @author erikdebr...@apache.org (Erik de Bruin) - */ - -'use strict'; - -goog.provide('vf2js_s.components.Button'); - -goog.require('goog.ui.Control'); -goog.require('vf2js_s.components.ButtonRenderer'); - - - -/** - * @constructor - * - * @extends {goog.ui.Control} - */ -vf2js_s.components.Button = function() { - vf2js_s.components.Button.base(this, 'constructor'); -}; -goog.inherits(vf2js_s.components.Button, goog.ui.Control); - - -//------------------------------------------------------------------------------ -// -// Enums -// -//------------------------------------------------------------------------------ - - -/** - * IdFragment - * - * @enum {string} - */ -vf2js_s.components.Button.IdFragment = { - BUTTON: 'button' -}; - - -//------------------------------------------------------------------------------ -// -// Properties -// -//------------------------------------------------------------------------------ - - -//-------------------------------------- -// id -//-------------------------------------- - -/** - * @type {string} - */ -vf2js_s.components.Button.prototype.id; - - -//-------------------------------------- -// label -//-------------------------------------- - -/** - * @private - * - * @type {string} - */ -vf2js_s.components.Button.prototype.label_; - -/** - * @type {string} - */ -vf2js_s.components.Button.prototype.label; - -Object.defineProperty(vf2js_s.components.Button.prototype, 'label', { - get: function () { - return this.label_; - }, - set: function (value) { - var /** @type {Element} */ element; - - this.label_ = value; - - element = this.getElement(); - if (element) { - element.firstChild.value = this.label_; - } - } -}); - - -//------------------------------------------------------------------------------ -// -// Methods -// -//------------------------------------------------------------------------------ - - -/** - * enterDocument - * - * @inheritDoc - */ -vf2js_s.components.Button.prototype.enterDocument = function() { - vf2js_s.components.Button.base(this, 'enterDocument'); - - this.setId(this.id); - - this.label = this.label_; - - // - add handlers using 'this.getHandler()' -}; - - -/** - * exitDocument - * - * @inheritDoc - */ -vf2js_s.components.Button.prototype.exitDocument = function() { - vf2js_s.components.Button.base(this, 'exitDocument'); - - // - remove handlers that are not attached with 'this.getHandler()' -}; - - -/** - * disposeInternal - * - * @inheritDoc - */ -vf2js_s.components.Button.prototype.disposeInternal = function() { - vf2js_s.components.Button.base(this, 'disposeInternal'); - - // -}; - - -//------------------------------------------------------------------------------ -// -// Metadata -// -//------------------------------------------------------------------------------ - - -goog.ui.registry.setDefaultRenderer(vf2js_s.components.Button, - vf2js_s.components.ButtonRenderer); http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/cb5e9a79/frameworks/js/VF2JS/src/vf2js_s/components/ButtonRenderer.js ---------------------------------------------------------------------- diff --git a/frameworks/js/VF2JS/src/vf2js_s/components/ButtonRenderer.js b/frameworks/js/VF2JS/src/vf2js_s/components/ButtonRenderer.js deleted file mode 100644 index 009e9b3..0000000 --- a/frameworks/js/VF2JS/src/vf2js_s/components/ButtonRenderer.js +++ /dev/null @@ -1,92 +0,0 @@ -/** - * Licensed under the Apache License, Version 2.0 (the 'License'); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an 'AS IS' BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -/** - * @fileoverview The renderer for 'Spark' button components. - * - * @author erikdebr...@apache.org (Erik de Bruin) - */ - -'use strict'; - -goog.provide('vf2js_s.components.ButtonRenderer'); - -goog.require('goog.ui.ControlRenderer'); - - - -/** - * @constructor - * - * @extends {goog.ui.ControlRenderer} - */ -vf2js_s.components.ButtonRenderer = function() { - vf2js_s.components.ButtonRenderer.base(this, 'constructor'); -}; -goog.inherits(vf2js_s.components.ButtonRenderer, goog.ui.ControlRenderer); -goog.addSingletonGetter(vf2js_s.components.ButtonRenderer); - - -//------------------------------------------------------------------------------ -// -// Static Constants -// -//------------------------------------------------------------------------------ - - -/** - * CSS_CLASS - * - * @const - * - * @type {string} - */ -vf2js_s.components.ButtonRenderer.CSS_CLASS = - 'vf2js_s-components-buttonrenderer'; - - -//------------------------------------------------------------------------------ -// -// Methods -// -//------------------------------------------------------------------------------ - - -/** - * getCssClass - * - * @inheritDoc - */ -vf2js_s.components.ButtonRenderer.prototype.getCssClass = function () { - return vf2js_s.components.ButtonRenderer.CSS_CLASS; -}; - - -/** - * createDom - * - * @inheritDoc - */ -vf2js_s.components.ButtonRenderer.prototype.createDom = function (button) { - var /** @type {?Element} */ element; - - element = vf2js_s.components.ButtonRenderer.base(this, 'createDom', button); - - element.appendChild( - goog.dom.createDom('input', { 'type': 'button' })); - - button.setElementInternal(element); - - return element; -};