diff options
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() { |