diff options
author | Derrell Lipman <derrell@samba.org> | 2007-02-11 20:22:45 +0000 |
---|---|---|
committer | Gerald (Jerry) Carter <jerry@samba.org> | 2007-10-10 14:44:59 -0500 |
commit | 7deea1aead01beabde1218379b72dd20f64f93ce (patch) | |
tree | e23a057f604558f7a6c9d4267bbf39ef7cf9f8ea /webapps/qooxdoo-0.6.5-sdk/frontend/framework/source/class/qx/ui/treevirtual/TreeVirtual.js | |
parent | 9bdb49455aa6ad38f71375f602e691d2b7765d04 (diff) | |
download | samba-7deea1aead01beabde1218379b72dd20f64f93ce.tar.gz samba-7deea1aead01beabde1218379b72dd20f64f93ce.tar.bz2 samba-7deea1aead01beabde1218379b72dd20f64f93ce.zip |
r21285: - Add the new ResizeTableColumnModel and make use of it in TreeVirtual. This
allows the Ldb Browser tree to properly size itself upon initially appearing
and upon window resizes. There are still a few problems with it that I need
to resolve, including an occasional set of double scrollbars, and making it
resize the tree column when the splitter is resized.
(This used to be commit c3c93ad36a9e850865aa8b09e319a77441243b01)
Diffstat (limited to 'webapps/qooxdoo-0.6.5-sdk/frontend/framework/source/class/qx/ui/treevirtual/TreeVirtual.js')
-rw-r--r-- | webapps/qooxdoo-0.6.5-sdk/frontend/framework/source/class/qx/ui/treevirtual/TreeVirtual.js | 40 |
1 files changed, 18 insertions, 22 deletions
diff --git a/webapps/qooxdoo-0.6.5-sdk/frontend/framework/source/class/qx/ui/treevirtual/TreeVirtual.js b/webapps/qooxdoo-0.6.5-sdk/frontend/framework/source/class/qx/ui/treevirtual/TreeVirtual.js index 39e9a1c54f..c32cb15f25 100644 --- a/webapps/qooxdoo-0.6.5-sdk/frontend/framework/source/class/qx/ui/treevirtual/TreeVirtual.js +++ b/webapps/qooxdoo-0.6.5-sdk/frontend/framework/source/class/qx/ui/treevirtual/TreeVirtual.js @@ -56,9 +56,19 @@ function(headings) return new qx.ui.treevirtual.SelectionManager(obj); }); + this.setNewTableColumnModel( + function(obj) + { + return new qx.ui.table.ResizeTableColumnModel(obj); + }); + // Call our superclass constructor qx.ui.table.Table.call(this, tableModel); + // By default, present the column visibility button only if there are + // multiple columns. + this.setColumnVisibilityButtonVisible(headings.length > 1); + // Set sizes this.setRowHeight(16); this.setMetaColumnCounts([1, -1]); @@ -112,7 +122,7 @@ function(headings) // For each scroller... for (var i = 0; i < scrollers.length; i++) { - // ... remove the outline on focus, + // ... remove the outline on focus, scrollers[i]._focusIndicator.setAppearance("treevirtual-focus-indicator"); // ... and set the pane scrollers to handle the selection before @@ -371,22 +381,8 @@ qx.Proto.toggleOpened = function(node) // Determine if this node was selected var rowIndex = dm.getNodeRowMap()[node.nodeId]; - // Is this row already selected? - var bSelected = sm.isSelectedIndex(rowIndex); - // Clear the old selections in the tree this.getSelectionModel()._clearSelection(); - -/* - // Clear the old selections in the data model - dm._clearSelections(); - - // If this row was selected, re-select it - if (bSelected) - { - this.setState(node.nodeId, { bSelected : true }); - } -*/ } // Re-render the row data since formerly visible rows may now be invisible, @@ -470,7 +466,7 @@ qx.Proto.setCellFocusAttributes = function(attributes) for (var i = 0; i < scrollers.length; i++) { scrollers[i]._focusIndicator.set(attributes); - } + } }; @@ -542,7 +538,7 @@ qx.Proto._onkeydown = function(evt) // ... then close it this.toggleOpened(node); } - + // Reset the focus to the current node this.setFocusedCell(treeCol, focusedRow, true); @@ -569,7 +565,7 @@ qx.Proto._onkeydown = function(evt) // Reset the focus to the current node this.setFocusedCell(treeCol, focusedRow, true); - + consumed = true; break; } @@ -592,11 +588,11 @@ qx.Proto._onkeydown = function(evt) { // Find out what rendered row our parent node is at var rowIndex = dm.getNodeRowMap()[node.parentNodeId]; - + // Set the focus to our parent this.setFocusedCell(this._focusedCol, rowIndex, true); } - + consumed = true; break; @@ -626,7 +622,7 @@ qx.Proto._onkeydown = function(evt) this.moveFocusedCell(0, 1); } } - + consumed = true; break; } @@ -759,7 +755,7 @@ qx.Proto.getHierarchy = function(nodeId) * * @return {Array} * An array of nodes matching the set of rows which are selected on the - * screen. + * screen. */ qx.Proto._calculateSelectedNodes = function() { |