summaryrefslogtreecommitdiff
path: root/webapps/qooxdoo-0.6.3-sdk/frontend/framework/source/class/qx/ui/table/AbstractTableModel.js
diff options
context:
space:
mode:
authorDerrell Lipman <derrell@samba.org>2007-01-03 19:57:40 +0000
committerGerald (Jerry) Carter <jerry@samba.org>2007-10-10 14:36:06 -0500
commit2e7c59c24470766e37309c7a8bfa4c7b81c57614 (patch)
treec44c89911868c52f25ca66bdefa68e13248db8e6 /webapps/qooxdoo-0.6.3-sdk/frontend/framework/source/class/qx/ui/table/AbstractTableModel.js
parent57f5bf78fa9fc9d190c3cb25251e686a1488f790 (diff)
downloadsamba-2e7c59c24470766e37309c7a8bfa4c7b81c57614.tar.gz
samba-2e7c59c24470766e37309c7a8bfa4c7b81c57614.tar.bz2
samba-2e7c59c24470766e37309c7a8bfa4c7b81c57614.zip
r20515: Continued work on the Web Application Framework. Until we get all of the
functionality of the old scripts incorporated into the new framework, the old scripts need to still be available. I've reverted to having the old scripts be the default pages, and added an option to access the preview of the new SWAT. (This used to be commit b43620d4b8eff815f4a6dc02522a8dfc9fdcaef4)
Diffstat (limited to 'webapps/qooxdoo-0.6.3-sdk/frontend/framework/source/class/qx/ui/table/AbstractTableModel.js')
-rw-r--r--webapps/qooxdoo-0.6.3-sdk/frontend/framework/source/class/qx/ui/table/AbstractTableModel.js150
1 files changed, 0 insertions, 150 deletions
diff --git a/webapps/qooxdoo-0.6.3-sdk/frontend/framework/source/class/qx/ui/table/AbstractTableModel.js b/webapps/qooxdoo-0.6.3-sdk/frontend/framework/source/class/qx/ui/table/AbstractTableModel.js
deleted file mode 100644
index 99470e9361..0000000000
--- a/webapps/qooxdoo-0.6.3-sdk/frontend/framework/source/class/qx/ui/table/AbstractTableModel.js
+++ /dev/null
@@ -1,150 +0,0 @@
-/* ************************************************************************
-
- qooxdoo - the new era of web development
-
- http://qooxdoo.org
-
- Copyright:
- 2006 by STZ-IDA, Germany, http://www.stz-ida.de
-
- License:
- LGPL 2.1: http://www.gnu.org/licenses/lgpl.html
-
- Authors:
- * Til Schneider (til132)
-
-************************************************************************ */
-
-/* ************************************************************************
-
-#module(ui_table)
-
-************************************************************************ */
-
-/**
- * An abstract table model that performs the column handling, so subclasses only
- * need to care for row handling.
- */
-qx.OO.defineClass("qx.ui.table.AbstractTableModel", qx.ui.table.TableModel,
-function() {
- qx.ui.table.TableModel.call(this);
-
- this._columnIdArr = [];
- this._columnNameArr = [];
- this._columnIndexMap = {};
-});
-
-
-// overridden
-qx.Proto.getColumnCount = function() {
- return this._columnIdArr.length;
-}
-
-
-// overridden
-qx.Proto.getColumnIndexById = function(columnId) {
- return this._columnIndexMap[columnId];
-}
-
-
-// overridden
-qx.Proto.getColumnId = function(columnIndex) {
- return this._columnIdArr[columnIndex];
-}
-
-
-// overridden
-qx.Proto.getColumnName = function(columnIndex) {
- return this._columnNameArr[columnIndex];
-}
-
-
-/**
- * Sets the column IDs. These IDs may be used internally to identify a column.
- * <p>
- * Note: This will clear previously set column names.
- * </p>
- *
- * @param columnIdArr {string[]} the IDs of the columns.
- * @see #setColumns
- */
-qx.Proto.setColumnIds = function(columnIdArr) {
- this._columnIdArr = columnIdArr;
-
- // Create the reverse map
- this._columnIndexMap = {};
- for (var i = 0; i < columnIdArr.length; i++) {
- this._columnIndexMap[columnIdArr[i]] = i;
- }
- this._columnNameArr = new Array(columnIdArr.length);
-
- // Inform the listeners
- if (!this._internalChange) {
- this.createDispatchEvent(qx.ui.table.TableModel.EVENT_TYPE_META_DATA_CHANGED);
- }
-}
-
-
-/**
- * Sets the column names. These names will be shown to the user.
- * <p>
- * Note: The column IDs have to be defined before.
- * </p>
- *
- * @param columnNameArr {string[]} the names of the columns.
- * @see #setColumnIds
- */
-qx.Proto.setColumnNamesByIndex = function(columnNameArr) {
- if (this._columnIdArr.length != columnNameArr.length) {
- throw new Error("this._columnIdArr and columnNameArr have different length: "
- + this._columnIdArr.length + " != " + columnNameArr.length);
- }
- this._columnNameArr = columnNameArr;
-
- // Inform the listeners
- this.createDispatchEvent(qx.ui.table.TableModel.EVENT_TYPE_META_DATA_CHANGED);
-}
-
-
-/**
- * Sets the column names. These names will be shown to the user.
- * <p>
- * Note: The column IDs have to be defined before.
- * </p>
- *
- * @param columnNameMap {Map} a map containing the column IDs as keys and the
- * column name as values.
- * @see #setColumnIds
- */
-qx.Proto.setColumnNamesById = function(columnNameMap) {
- this._columnNameArr = new Array(this._columnIdArr.length);
- for (var i = 0; i < this._columnIdArr.length; ++i) {
- this._columnNameArr[i] = columnNameMap[this._columnIdArr[i]];
- }
-}
-
-
-/**
- * Sets the columns.
- *
- * @param columnNameArr {string[]} The column names. These names will be shown to
- * the user.
- * @param columnIdArr {string[] ? null} The column IDs. These IDs may be used
- * internally to identify a column. If null, the column names are used as
- * IDs.
- */
-qx.Proto.setColumns = function(columnNameArr, columnIdArr) {
- if (columnIdArr == null) {
- columnIdArr = columnNameArr;
- }
-
- if (columnIdArr.length != columnNameArr.length) {
- throw new Error("columnIdArr and columnNameArr have different length: "
- + columnIdArr.length + " != " + columnNameArr.length);
- }
-
- this._internalChange = true;
- this.setColumnIds(columnIdArr);
- this._internalChange = false;
- this.setColumnNamesByIndex(columnNameArr);
-}