remove JS files that should now be generated via cross-compile
Project: http://git-wip-us.apache.org/repos/asf/flex-asjs/repo Commit: http://git-wip-us.apache.org/repos/asf/flex-asjs/commit/4d640b8a Tree: http://git-wip-us.apache.org/repos/asf/flex-asjs/tree/4d640b8a Diff: http://git-wip-us.apache.org/repos/asf/flex-asjs/diff/4d640b8a Branch: refs/heads/develop Commit: 4d640b8a04b8beb48cd1bc3e5f9f55cdc4b7680e Parents: 5114764 Author: Alex Harui <[email protected]> Authored: Wed Jan 22 23:21:27 2014 -0800 Committer: Alex Harui <[email protected]> Committed: Wed Jan 22 23:21:27 2014 -0800 ---------------------------------------------------------------------- .../apache/flex/html/staticControls/DataGrid.js | 112 -------------- .../staticControls/beads/DataGridColumnView.js | 117 -------------- .../html/staticControls/beads/DataGridView.js | 155 ------------------- .../DataItemRendererFactoryForColumnData.js | 135 ---------------- .../beads/models/DataGridPresentationModel.js | 95 ------------ 5 files changed, 614 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/4d640b8a/frameworks/js/FlexJS/src/org/apache/flex/html/staticControls/DataGrid.js ---------------------------------------------------------------------- diff --git a/frameworks/js/FlexJS/src/org/apache/flex/html/staticControls/DataGrid.js b/frameworks/js/FlexJS/src/org/apache/flex/html/staticControls/DataGrid.js deleted file mode 100644 index af5ebe2..0000000 --- a/frameworks/js/FlexJS/src/org/apache/flex/html/staticControls/DataGrid.js +++ /dev/null @@ -1,112 +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.html.staticControls.DataGrid'); - -goog.require('org.apache.flex.core.UIBase'); -goog.require('org.apache.flex.html.staticControls.beads.models.DataGridModel'); - - - -/** - * @constructor - * @extends {org.apache.flex.core.UIBase} - */ -org.apache.flex.html.staticControls.DataGrid = function() { - - // this.model = new - // org.apache.flex.html.staticControls.beads.models.DataGridModel(); - // this.addBead(this.model); - - goog.base(this); -}; -goog.inherits(org.apache.flex.html.staticControls.DataGrid, - org.apache.flex.core.UIBase); - - -/** - * Metadata - * - * @type {Object.<string, Array.<Object>>} - */ -org.apache.flex.html.staticControls.DataGrid.prototype.FLEXJS_CLASS_INFO = - { names: [{ name: 'DataGrid', - qName: 'org.apache.flex.html.staticControls.DataGrid' }] }; - - -/** - * @override - */ -org.apache.flex.html.staticControls.DataGrid.prototype.createElement = - function() { - this.element = document.createElement('div'); - this.positioner = this.element; - this.element.flexjs_wrapper = this; - this.set_className('DataGrid'); - - // this.addBead(new - // org.apache.flex.html.staticControls.beads.DataGridView()); - - return this.element; -}; - - -/** - * @expose - * @return {string} The dataProvider getter. - */ -org.apache.flex.html.staticControls.DataGrid.prototype.get_dataProvider = - function() { - return this.get_model().get_dataProvider(); -}; - - -/** - * @expose - * @param {string} value The dataProvider setter. - */ -org.apache.flex.html.staticControls.DataGrid.prototype.set_dataProvider = - function(value) { - this.get_model().set_dataProvider(value); -}; - - -/** - * @expose - * @param {Array} value The DataGridColumn definitions for this DataGrid. - */ -org.apache.flex.html.staticControls.DataGrid.prototype.set_columns = - function(value) { - this.get_model().set_columns(value); -}; - - -/** - * @expose - * @return {Array} The DataGridColumns in this DataGrid. - */ -org.apache.flex.html.staticControls.DataGrid.prototype.get_columns = - function() { - return this.get_model().get_columns(); -}; - - -/** - * @expose - * @return {string} value The current selectedIndex. - */ -org.apache.flex.html.staticControls.DataGrid.prototype.get_selectedIndex = - function() { - return this.get_model().get_selectedIndex(); -}; http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/4d640b8a/frameworks/js/FlexJS/src/org/apache/flex/html/staticControls/beads/DataGridColumnView.js ---------------------------------------------------------------------- diff --git a/frameworks/js/FlexJS/src/org/apache/flex/html/staticControls/beads/DataGridColumnView.js b/frameworks/js/FlexJS/src/org/apache/flex/html/staticControls/beads/DataGridColumnView.js deleted file mode 100644 index 4b64f20..0000000 --- a/frameworks/js/FlexJS/src/org/apache/flex/html/staticControls/beads/DataGridColumnView.js +++ /dev/null @@ -1,117 +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.html.staticControls.beads.DataGridColumnView'); - -goog.require('org.apache.flex.html.staticControls.beads.ListView'); -goog.require('org.apache.flex.html.staticControls.supportClasses.DataGridColumn'); - - - -/** - * @constructor - * @extends {org.apache.flex.html.staticControls.beads.ListView} - */ -org.apache.flex.html.staticControls.beads.DataGridColumnView = function() { - goog.base(this); - this.className = 'DataGridColumnView'; -}; -goog.inherits( - org.apache.flex.html.staticControls.beads.DataGridColumnView, - org.apache.flex.html.staticControls.beads.ListView); - - -/** - * Metadata - * - * @type {Object.<string, Array.<Object>>} - */ -org.apache.flex.html.staticControls.beads.DataGridColumnView. - prototype.FLEXJS_CLASS_INFO = - { names: [{ name: 'DataGridColumnView', - qName: 'org.apache.flex.html.staticControls.beads.DataGridColumnView' }], - interfaces: [org.apache.flex.html.staticControls.beads.IListView, - org.apache.flex.core.IBeadView]}; - - -/** - * @expose - * @param {Object} value The new host. - */ -org.apache.flex.html.staticControls.beads.DataGridColumnView.prototype. - set_strand = function(value) { - this.strand_ = value; - - goog.base(this, 'set_strand', value); -}; - - -/** - * @expose - * @return {number} The column index for this grid column. - */ -org.apache.flex.html.staticControls.beads.DataGridColumnView.prototype. - get_columnIndex = function() { - return this.columnIndex_; -}; - - -/** - * @expose - * @param {number} value The column index for this grid column. - */ -org.apache.flex.html.staticControls.beads.DataGridColumnView.prototype. - set_columnIndex = function(value) { - this.columnIndex_ = value; -}; - - -/** - * @expose - * @return {string} The field in the data to use for the column's label. - */ -org.apache.flex.html.staticControls.beads.DataGridColumnView.prototype. - get_labelField = function() { - return this.labelField_; -}; - - -/** - * @expose - * @param {string} value The field in the data to use for the column's label. - */ -org.apache.flex.html.staticControls.beads.DataGridColumnView.prototype. - set_labelField = function(value) { - this.labelField_ = value; -}; - - -/** - * @expose - * @return {org.apache.flex.html.staticControls.supportClasses.DataGridColumn} The column data being displayed. - */ -org.apache.flex.html.staticControls.beads.DataGridColumnView.prototype.get_column = -function() { - return this.column_; -}; - - -/** - * @expose - * @param {org.apache.flex.html.staticControls.supportClasses.DataGridColumn} value The column data being displayed. - */ -org.apache.flex.html.staticControls.beads.DataGridColumnView.prototype.set_column = -function(value) { - this.column_ = value; -}; http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/4d640b8a/frameworks/js/FlexJS/src/org/apache/flex/html/staticControls/beads/DataGridView.js ---------------------------------------------------------------------- diff --git a/frameworks/js/FlexJS/src/org/apache/flex/html/staticControls/beads/DataGridView.js b/frameworks/js/FlexJS/src/org/apache/flex/html/staticControls/beads/DataGridView.js deleted file mode 100644 index f384cbb..0000000 --- a/frameworks/js/FlexJS/src/org/apache/flex/html/staticControls/beads/DataGridView.js +++ /dev/null @@ -1,155 +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.html.staticControls.beads.DataGridView'); - -goog.require('org.apache.flex.core.IBeadView'); -goog.require('org.apache.flex.core.IItemRendererParent'); -goog.require('org.apache.flex.events.Event'); -goog.require('org.apache.flex.html.staticControls.ButtonBar'); -goog.require('org.apache.flex.html.staticControls.Container'); -goog.require('org.apache.flex.html.staticControls.List'); -goog.require('org.apache.flex.html.staticControls.beads.DataItemRendererFactoryForColumnData'); -goog.require('org.apache.flex.html.staticControls.beads.TextItemRendererFactoryForArrayData'); -goog.require('org.apache.flex.html.staticControls.beads.layouts.NonVirtualHorizontalLayout'); -goog.require('org.apache.flex.html.staticControls.beads.models.ArraySelectionModel'); -goog.require('org.apache.flex.html.staticControls.beads.models.DataGridModel'); -goog.require('org.apache.flex.html.staticControls.supportClasses.DataGridColumn'); - - - -/** - * @constructor - * @extends {org.apache.flex.events.EventDispatcher} - * @implements {org.apache.flex.core.IBeadView} - */ -org.apache.flex.html.staticControls.beads.DataGridView = function() { - this.lastSelectedIndex = -1; - goog.base(this); -}; -goog.inherits( - org.apache.flex.html.staticControls.beads.DataGridView, - org.apache.flex.events.EventDispatcher); - - -/** - * Metadata - * - * @type {Object.<string, Array.<Object>>} - */ -org.apache.flex.html.staticControls.beads.DataGridView.prototype. - FLEXJS_CLASS_INFO = - { names: [{ name: 'DataGridView', - qName: 'org.apache.flex.html.staticControls.beads.DataGridView' }], - interfaces: [org.apache.flex.core.IBeadView] }; - - -/** - * @expose - * @return {Array} The columns of this DataGrid. - */ -org.apache.flex.html.staticControls.beads.DataGridView.prototype.getColumnLists = -function() { - return this.columns; -}; - - -/** - * @expose - * @param {Object} value The new host. - */ -org.apache.flex.html.staticControls.beads.DataGridView.prototype.set_strand = - function(value) { - - this.strand_ = value; - - var sharedModel = value.getBeadByType( - org.apache.flex.html.staticControls.beads.models.DataGridModel); - - // Use the presentation model's columnLabels as the dataProvider for the - // ButtonBar header. - - var columnLabels = new Array(); - var buttonWidths = new Array(); - for (var i = 0; i < sharedModel.get_columns().length; i++) { - columnLabels.push(sharedModel.get_columns()[i].get_label()); - buttonWidths.push(sharedModel.get_columns()[i].get_columnWidth()); - } - var bblayout = new org.apache.flex.html.staticControls.beads.layouts.ButtonBarLayout(); - bblayout.set_buttonWidths(buttonWidths); - this.buttonBarModel = new - org.apache.flex.html.staticControls.beads.models.ArraySelectionModel(); - this.buttonBarModel.set_dataProvider(columnLabels); - this.buttonBar = new org.apache.flex.html.staticControls.ButtonBar(); - this.buttonBar.addBead(this.buttonBarModel); - this.buttonBar.addBead(bblayout); - - this.buttonBar.set_height(20); - this.buttonBar.set_width(this.strand_.get_width()); - this.strand_.addElement(this.buttonBar); - - this.columnContainer = new org.apache.flex.html.staticControls.Container(); - var layout = new org.apache.flex.html.staticControls.beads.layouts. - NonVirtualHorizontalLayout(); - this.columnContainer.addBead(layout); - this.strand_.addElement(this.columnContainer); - this.columnContainer.positioner.style.width = - this.strand_.positioner.style.width; - - var columnWidth = this.strand_.get_width() / columnLabels.length - 2; - var columnHeight = this.strand_.get_height() - this.buttonBar.get_height(); - - this.columns = new Array(); - - for (var i = 0; i < sharedModel.get_columns().length; i++) { - var listModel = new org.apache.flex.html.staticControls.beads.models.ArraySelectionModel(); - listModel.set_dataProvider(sharedModel.get_dataProvider()); - - var dataGridColumn = sharedModel.get_columns()[i]; - - var list = new org.apache.flex.html.staticControls.List(); - list.addBead(listModel); - list.set_itemRenderer(dataGridColumn.get_itemRenderer()); - list.set_labelField(dataGridColumn.get_dataField()); - list.set_width(dataGridColumn.get_columnWidth() - 2); - list.set_height(columnHeight); - this.columnContainer.addElement(list); - this.columns.push(list); - list.addEventListener('change', goog.bind(this.columnListChangeHandler, this)); - } - - this.strand_.dispatchEvent(new org.apache.flex.events.Event('layoutComplete')); -}; - - -/** - * @param {Object} event The selection change event from one of the column - * lists. - */ -org.apache.flex.html.staticControls.beads.DataGridView.prototype. - columnListChangeHandler = function(event) { - var list = event.target; - var index = list.get_selectedIndex(); - - if (index != this.strand_.get_model().get_selectedIndex()) { - for (var i = 0; i < this.columns.length; i++) { - if (list != this.columns[i]) { - this.columns[i].set_selectedIndex(index); - } - } - this.strand_.get_model().set_selectedIndex(index); - var newEvent = new org.apache.flex.events.Event('change'); - this.strand_.dispatchEvent(newEvent); - } -}; http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/4d640b8a/frameworks/js/FlexJS/src/org/apache/flex/html/staticControls/beads/DataItemRendererFactoryForColumnData.js ---------------------------------------------------------------------- diff --git a/frameworks/js/FlexJS/src/org/apache/flex/html/staticControls/beads/DataItemRendererFactoryForColumnData.js b/frameworks/js/FlexJS/src/org/apache/flex/html/staticControls/beads/DataItemRendererFactoryForColumnData.js deleted file mode 100644 index 617e70b..0000000 --- a/frameworks/js/FlexJS/src/org/apache/flex/html/staticControls/beads/DataItemRendererFactoryForColumnData.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.html.staticControls.beads.DataItemRendererFactoryForColumnData'); - -goog.require('org.apache.flex.core.IItemRenderer'); -goog.require('org.apache.flex.core.ValuesManager'); -goog.require('org.apache.flex.events.EventDispatcher'); -goog.require('org.apache.flex.html.staticControls.beads.DataGridColumnView'); -goog.require('org.apache.flex.html.staticControls.beads.models.ArraySelectionModel'); -goog.require('org.apache.flex.html.staticControls.supportClasses.ButtonBarButtonItemRenderer'); -goog.require('org.apache.flex.html.staticControls.supportClasses.StringItemRenderer'); - - - -/** - * @constructor - * @extends {org.apache.flex.events.EventDispatcher} - * @implements {org.apache.flex.core.IItemRenderer} - */ -org.apache.flex.html.staticControls.beads.DataItemRendererFactoryForColumnData = - function() { - goog.base(this); -}; -goog.inherits( - org.apache.flex.html.staticControls.beads. - DataItemRendererFactoryForColumnData, - org.apache.flex.events.EventDispatcher); - - -/** - * Metadata - * - * @type {Object.<string, Array.<Object>>} - */ -org.apache.flex.html.staticControls.beads.DataItemRendererFactoryForColumnData - .prototype.FLEXJS_CLASS_INFO = - { names: [{ name: 'DataItemRendererFactoryForColumnData', - qName: 'org.apache.flex.html.staticControls.beads.DataItemRendererFactoryForColumnData'}], - interfaces: [org.apache.flex.core.IItemRenderer] }; - - -/** - * @expose - DataItemRendererFactoryForColumnData} - * @param {Object} value The component strand. - */ -org.apache.flex.html.staticControls.beads.DataItemRendererFactoryForColumnData. - prototype.set_strand = function(value) { - var Irf; - - this.strand_ = value; - - this.model = value.getBeadByType( - org.apache.flex.html.staticControls.beads.models.ArraySelectionModel); - - this.listView = value.getBeadByType( - org.apache.flex.html.staticControls.beads.DataGridColumnView); - this.dataGroup = this.listView.get_dataGroup(); - - this.model.addEventListener('dataProviderChanged', - goog.bind(this.dataProviderChangedHandler, this)); - - if (!this.itemRendererFactory_) { - Irf = org.apache.flex.core.ValuesManager.valuesImpl. - getValue(this.strand_, 'iItemRendererClassFactory'); - this.itemRendererFactory_ = new Irf(); - this.strand_.addBead(this.itemRendererFactory_); - } - - this.dataProviderChangedHandler(null); -}; - - -/** - * @expose - * DataItemRendererFactoryForColumnData} - * @return {Object} The factory class to use for creating item renderers. - */ -org.apache.flex.html.staticControls.beads.DataItemRendererFactoryForColumnData. - prototype.get_itemRendererFactory = function() { - return this.itemRendererFactory_; -}; - - -/** - * @expose - * DataItemRendererFactoryForColumnData} - * @param {Object} value The factory class to use for creating item renderers. - */ -org.apache.flex.html.staticControls.beads.DataItemRendererFactoryForColumnData. - prototype.set_itemRendererFactory = function(value) { - this.itemRendererFactory_ = value; -}; - - -/** - * @expose - DataItemRendererFactoryForColumnData} - * @param {Object} event The event that triggered the dataProvider change. - */ -org.apache.flex.html.staticControls.beads.DataItemRendererFactoryForColumnData. - prototype.dataProviderChangedHandler = function(event) { - var dp, fieldName, i, n, newEvent, opt, view; - - dp = this.model.get_dataProvider(); - n = dp.length; - - // todo: this.dataGroup.removeAllElements(); - - view = this.listView; - for (i = 0; i < n; i++) { - fieldName = view.get_column().get_dataField(); - - // todo: grab an itemRenderer from a factory for this column - opt = this.itemRendererFactory_.createItemRenderer(this.dataGroup); - opt.set_dataField(fieldName); - this.dataGroup.addElement(opt); - opt.set_data(dp[i]); - } - - newEvent = new org.apache.flex.events.Event('itemsCreated'); - this.strand_.dispatchEvent(newEvent); -}; http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/4d640b8a/frameworks/js/FlexJS/src/org/apache/flex/html/staticControls/beads/models/DataGridPresentationModel.js ---------------------------------------------------------------------- diff --git a/frameworks/js/FlexJS/src/org/apache/flex/html/staticControls/beads/models/DataGridPresentationModel.js b/frameworks/js/FlexJS/src/org/apache/flex/html/staticControls/beads/models/DataGridPresentationModel.js deleted file mode 100644 index 55ff0bb..0000000 --- a/frameworks/js/FlexJS/src/org/apache/flex/html/staticControls/beads/models/DataGridPresentationModel.js +++ /dev/null @@ -1,95 +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.html.staticControls.beads.models.DataGridPresentationModel'); - -goog.require('org.apache.flex.events.EventDispatcher'); - - - -/** - * @constructor - * @extends {org.apache.flex.events.EventDispatcher} - */ -org.apache.flex.html.staticControls.beads.models.DataGridPresentationModel = - function() { - goog.base(this); - - this.className = 'DataGridPresentationModel'; -}; -goog.inherits( - org.apache.flex.html.staticControls.beads.models.DataGridPresentationModel, - org.apache.flex.events.EventDispatcher); - - -/** - * Metadata - * - * @type {Object.<string, Array.<Object>>} - */ -org.apache.flex.html.staticControls.beads.models.DataGridPresentationModel.prototype.FLEXJS_CLASS_INFO = - { names: [{ name: 'DataGridPresentationModel', - qName: 'org.apache.flex.html.staticControls.beads.models.DataGridPresentationModel'}] }; - - -/** - * @expose - * @param {Object} value The strand. - */ -org.apache.flex.html.staticControls.beads.models.DataGridPresentationModel. - prototype.set_strand = function(value) { - this.strand_ = value; -}; - - -/** - * @expose - * @return {Object} value The array of column labels. - */ -org.apache.flex.html.staticControls.beads.models.DataGridPresentationModel. - prototype.get_columnLabels = function() { - return this.columnLabels_; -}; - - -/** - * @expose - * @param {Object} value The column labels. - */ -org.apache.flex.html.staticControls.beads.models.DataGridPresentationModel. - prototype.set_columnLabels = function(value) { - this.columnLabels_ = value; - this.dispatchEvent('columnLabelsChanged'); -}; - - -/** - * @expose - * @return {Object} value The height of every row. - */ -org.apache.flex.html.staticControls.beads.models.DataGridPresentationModel. - prototype.get_rowHeight = function() { - return this.rowHeight_; -}; - - -/** - * @expose - * @param {Object} value The height of every row. - */ -org.apache.flex.html.staticControls.beads.models.DataGridPresentationModel. - prototype.set_rowHeight = function(value) { - this.rowHeight_ = value; - this.dispatchEvent('rowHeightChanged'); -};
