a:127:{s:9:"#provides";s:29:"dojox.grid.compat.VirtualGrid";s:9:"#resource";s:26:"grid/compat/VirtualGrid.js";s:9:"#requires";a:11:{i:0;a:2:{i:0;s:6:"common";i:1;s:27:"dojox.grid.compat._grid.lib";}i:1;a:2:{i:0;s:6:"common";i:1;s:32:"dojox.grid.compat._grid.scroller";}i:2;a:2:{i:0;s:6:"common";i:1;s:28:"dojox.grid.compat._grid.view";}i:3;a:2:{i:0;s:6:"common";i:1;s:29:"dojox.grid.compat._grid.views";}i:4;a:2:{i:0;s:6:"common";i:1;s:30:"dojox.grid.compat._grid.layout";}i:5;a:2:{i:0;s:6:"common";i:1;s:28:"dojox.grid.compat._grid.rows";}i:6;a:2:{i:0;s:6:"common";i:1;s:29:"dojox.grid.compat._grid.focus";}i:7;a:2:{i:0;s:6:"common";i:1;s:33:"dojox.grid.compat._grid.selection";}i:8;a:2:{i:0;s:6:"common";i:1;s:28:"dojox.grid.compat._grid.edit";}i:9;a:2:{i:0;s:6:"common";i:1;s:30:"dojox.grid.compat._grid.rowbar";}i:10;a:2:{i:0;s:6:"common";i:1;s:36:"dojox.grid.compat._grid.publicEvents";}}s:17:"dojox.VirtualGrid";a:7:{s:4:"type";s:8:"Function";s:6:"chains";a:2:{s:9:"prototype";a:1:{i:0;s:13:"dijit._Widget";}s:4:"call";a:2:{i:0;s:13:"dijit._Widget";i:1;s:16:"dijit._Templated";}}s:6:"mixins";a:2:{s:9:"prototype";a:1:{i:0;s:26:"dijit._Templated.prototype";}s:6:"normal";a:1:{i:0;s:23:"dojox.grid.publicEvents";}}s:7:"summary";s:112:"A grid widget with virtual scrolling, cell editing, complex rows,
sorting, fixed columns, sizeable columns, etc.";s:11:"description";s:296:"VirtualGrid provides the full set of grid features without any
direct connection to a data store.
The grid exposes a get function for the grid, or optionally
individual columns, to populate cell contents.
The grid is rendered based on its structure, an object describing
column and cell layout.";s:8:"examples";a:1:{i:0;s:477:"A quick sample:
define a get function
function get(inRowIndex){ // called in cell context
return [this.index, inRowIndex].join(', ');
}
define the grid structure:
var structure = [ // array of view objects
{ cells: [// array of rows, a row is an array of cells
[
{ name: "Alpha", width: 6 },
{ name: "Beta" },
{ name: "Gamma", get: get }]
]}
];
";}s:9:"classlike";b:1;}s:30:"dojox.VirtualGrid.templatePath";a:2:{s:9:"prototype";s:17:"dojox.VirtualGrid";s:7:"summary";s:0:"";}s:26:"dojox.VirtualGrid.classTag";a:3:{s:9:"prototype";s:17:"dojox.VirtualGrid";s:4:"type";s:6:"String";s:7:"summary";s:39:"CSS class applied to the grid's domNode";}s:21:"dojox.VirtualGrid.get";a:8:{s:9:"prototype";s:17:"dojox.VirtualGrid";s:4:"type";s:8:"Function";s:10:"parameters";a:1:{s:10:"inRowIndex";a:2:{s:4:"type";s:7:"Integer";s:7:"summary";s:29:"Row for which to provide data";}}s:6:"source";s:295:" // summary: Default data getter.
// description:
// Provides data to display in a grid cell. Called in grid cell context.
// So this.cell.index is the column index.
// inRowIndex: Integer
// Row for which to provide data
// returns:
// Data to display for a given grid cell.";s:7:"summary";s:20:"Default data getter.";s:11:"description";s:109:"Provides data to display in a grid cell. Called in grid cell context.
So this.cell.index is the column index.";s:14:"return_summary";s:38:"Data to display for a given grid cell.";s:8:"instance";s:17:"dojox.VirtualGrid";}s:26:"dojox.VirtualGrid.rowCount";a:4:{s:9:"prototype";s:17:"dojox.VirtualGrid";s:8:"instance";s:17:"dojox.VirtualGrid";s:4:"type";s:7:"Integer";s:7:"summary";s:26:"Number of rows to display.";}s:26:"dojox.VirtualGrid.keepRows";a:4:{s:9:"prototype";s:17:"dojox.VirtualGrid";s:8:"instance";s:17:"dojox.VirtualGrid";s:4:"type";s:7:"Integer";s:7:"summary";s:46:"Number of rows to keep in the rendering cache.";}s:29:"dojox.VirtualGrid.rowsPerPage";a:3:{s:9:"prototype";s:17:"dojox.VirtualGrid";s:4:"type";s:7:"Integer";s:7:"summary";s:35:"Number of rows to render at a time.";}s:27:"dojox.VirtualGrid.autoWidth";a:3:{s:9:"prototype";s:17:"dojox.VirtualGrid";s:4:"type";s:7:"Boolean";s:7:"summary";s:70:"If autoWidth is true, grid width is automatically set to fit the data.";}s:28:"dojox.VirtualGrid.autoHeight";a:3:{s:9:"prototype";s:17:"dojox.VirtualGrid";s:4:"type";s:7:"Boolean";s:7:"summary";s:72:"If autoHeight is true, grid height is automatically set to fit the data.";}s:28:"dojox.VirtualGrid.autoRender";a:3:{s:9:"prototype";s:17:"dojox.VirtualGrid";s:4:"type";s:7:"Boolean";s:7:"summary";s:68:"If autoRender is true, grid will render itself after initialization.";}s:31:"dojox.VirtualGrid.defaultHeight";a:3:{s:9:"prototype";s:17:"dojox.VirtualGrid";s:4:"type";s:6:"String";s:7:"summary";s:59:"default height of the grid, measured in any valid css unit.";}s:27:"dojox.VirtualGrid.structure";a:4:{s:9:"prototype";s:17:"dojox.VirtualGrid";s:8:"instance";s:17:"dojox.VirtualGrid";s:4:"type";s:13:"Object|String";s:7:"summary";s:97:"View layout defintion. Can be set to a layout object, or to the (string) name of a layout object.";}s:29:"dojox.VirtualGrid.elasticView";a:3:{s:9:"prototype";s:17:"dojox.VirtualGrid";s:4:"type";s:7:"Integer";s:7:"summary";s:98:"Override defaults and make the indexed grid view elastic, thus filling available horizontal space.";}s:33:"dojox.VirtualGrid.singleClickEdit";a:3:{s:9:"prototype";s:17:"dojox.VirtualGrid";s:4:"type";s:7:"boolean";s:7:"summary";s:52:"Single-click starts editing. Default is double-click";}s:24:"dojox.VirtualGrid._click";a:4:{s:9:"prototype";s:17:"dojox.VirtualGrid";s:8:"instance";s:17:"dojox.VirtualGrid";s:7:"private";b:1;s:7:"summary";s:0:"";}s:26:"dojox.VirtualGrid.sortInfo";a:3:{s:9:"prototype";s:17:"dojox.VirtualGrid";s:8:"instance";s:17:"dojox.VirtualGrid";s:7:"summary";s:0:"";}s:27:"dojox.VirtualGrid.themeable";a:2:{s:9:"prototype";s:17:"dojox.VirtualGrid";s:7:"summary";s:0:"";}s:32:"dojox.VirtualGrid.buildRendering";a:4:{s:9:"prototype";s:17:"dojox.VirtualGrid";s:4:"type";s:8:"Function";s:6:"source";s:597:" this.inherited(arguments);
// reset get from blank function (needed for markup parsing) to null, if not changed
if(this.get == dojox.VirtualGrid.prototype.get){
this.get = null;
}
if(!this.domNode.getAttribute('tabIndex')){
this.domNode.tabIndex = "0";
}
this.createScroller();
this.createLayout();
this.createViews();
this.createManagers();
dojox.grid.initTextSizePoll();
this.connect(dojox.grid, "textSizeChanged", "textSizeChanged");
dojox.grid.funnelEvents(this.domNode, this, 'doKeyEvent', dojox.grid.keyEvents);
this.connect(this, "onShow", "renderOnIdle");";s:7:"summary";s:0:"";}s:28:"dojox.VirtualGrid.postCreate";a:4:{s:9:"prototype";s:17:"dojox.VirtualGrid";s:4:"type";s:8:"Function";s:6:"source";s:4420:"dojo.provide("dojox.grid.compat.VirtualGrid");
dojo.require("dojox.grid.compat._grid.lib");
dojo.require("dojox.grid.compat._grid.scroller");
dojo.require("dojox.grid.compat._grid.view");
dojo.require("dojox.grid.compat._grid.views");
dojo.require("dojox.grid.compat._grid.layout");
dojo.require("dojox.grid.compat._grid.rows");
dojo.require("dojox.grid.compat._grid.focus");
dojo.require("dojox.grid.compat._grid.selection");
dojo.require("dojox.grid.compat._grid.edit");
dojo.require("dojox.grid.compat._grid.rowbar");
dojo.require("dojox.grid.compat._grid.publicEvents");
dojo.declare('dojox.VirtualGrid',
[ dijit._Widget, dijit._Templated ],
{
// summary:
// A grid widget with virtual scrolling, cell editing, complex rows,
// sorting, fixed columns, sizeable columns, etc.
//
// description:
// VirtualGrid provides the full set of grid features without any
// direct connection to a data store.
//
// The grid exposes a get function for the grid, or optionally
// individual columns, to populate cell contents.
//
// The grid is rendered based on its structure, an object describing
// column and cell layout.
//
// example:
// A quick sample:
//
// define a get function
// | function get(inRowIndex){ // called in cell context
// | return [this.index, inRowIndex].join(', ');
// | }
//
// define the grid structure:
// | var structure = [ // array of view objects
// | { cells: [// array of rows, a row is an array of cells
// | [
// | { name: "Alpha", width: 6 },
// | { name: "Beta" },
// | { name: "Gamma", get: get }]
// | ]}
// | ];
//
// |
templatePath: dojo.moduleUrl("dojox.grid.compat","resources/VirtualGrid.html"),
// classTag: String
// CSS class applied to the grid's domNode
classTag: 'dojoxGrid',
get: function(inRowIndex){
// summary: Default data getter.
// description:
// Provides data to display in a grid cell. Called in grid cell context.
// So this.cell.index is the column index.
// inRowIndex: Integer
// Row for which to provide data
// returns:
// Data to display for a given grid cell.
},
// settings
// rowCount: Integer
// Number of rows to display.
rowCount: 5,
// keepRows: Integer
// Number of rows to keep in the rendering cache.
keepRows: 75,
// rowsPerPage: Integer
// Number of rows to render at a time.
rowsPerPage: 25,
// autoWidth: Boolean
// If autoWidth is true, grid width is automatically set to fit the data.
autoWidth: false,
// autoHeight: Boolean
// If autoHeight is true, grid height is automatically set to fit the data.
autoHeight: false,
// autoRender: Boolean
// If autoRender is true, grid will render itself after initialization.
autoRender: true,
// defaultHeight: String
// default height of the grid, measured in any valid css unit.
defaultHeight: '15em',
// structure: Object|String
// View layout defintion. Can be set to a layout object, or to the (string) name of a layout object.
structure: '',
// elasticView: Integer
// Override defaults and make the indexed grid view elastic, thus filling available horizontal space.
elasticView: -1,
// singleClickEdit: boolean
// Single-click starts editing. Default is double-click
singleClickEdit: false,
// Used to store the last two clicks, to ensure double-clicking occurs based on the intended row
_click: null,
// private
sortInfo: 0,
themeable: true,
// initialization
buildRendering: function(){
this.inherited(arguments);
// reset get from blank function (needed for markup parsing) to null, if not changed
if(this.get == dojox.VirtualGrid.prototype.get){
this.get = null;
}
if(!this.domNode.getAttribute('tabIndex')){
this.domNode.tabIndex = "0";
}
this.createScroller();
this.createLayout();
this.createViews();
this.createManagers();
dojox.grid.initTextSizePoll();
this.connect(dojox.grid, "textSizeChanged", "textSizeChanged");
dojox.grid.funnelEvents(this.domNode, this, 'doKeyEvent', dojox.grid.keyEvents);
this.connect(this, "onShow", "renderOnIdle");
},
postCreate: function(){
// replace stock styleChanged with one that triggers an update
this.styleChanged = this._styleChanged;
this.setStructure(this.structure);
this._click = [];";s:7:"summary";s:0:"";}s:25:"dojox.VirtualGrid.destroy";a:4:{s:9:"prototype";s:17:"dojox.VirtualGrid";s:4:"type";s:8:"Function";s:6:"source";s:148:" this.domNode.onReveal = null;
this.domNode.onSizeChange = null;
this.edit.destroy();
this.views.destroyViews();
this.inherited(arguments);";s:7:"summary";s:0:"";}s:30:"dojox.VirtualGrid.styleChanged";a:5:{s:9:"prototype";s:17:"dojox.VirtualGrid";s:8:"instance";s:17:"dojox.VirtualGrid";s:4:"type";s:8:"Function";s:6:"source";s:40:" this.setStyledClass(this.domNode, '');";s:7:"summary";s:0:"";}s:31:"dojox.VirtualGrid._styleChanged";a:5:{s:9:"prototype";s:17:"dojox.VirtualGrid";s:4:"type";s:8:"Function";s:6:"source";s:39:" this.styleChanged();
this.update();";s:7:"private";b:1;s:7:"summary";s:0:"";}s:33:"dojox.VirtualGrid.textSizeChanged";a:4:{s:9:"prototype";s:17:"dojox.VirtualGrid";s:4:"type";s:8:"Function";s:6:"source";s:54:" setTimeout(dojo.hitch(this, "_textSizeChanged"), 1);";s:7:"summary";s:0:"";}s:34:"dojox.VirtualGrid._textSizeChanged";a:5:{s:9:"prototype";s:17:"dojox.VirtualGrid";s:4:"type";s:8:"Function";s:6:"source";s:107:" if(this.domNode){
this.views.forEach(function(v){
v.content.update();
});
this.render();
}";s:7:"private";b:1;s:7:"summary";s:0:"";}s:28:"dojox.VirtualGrid.sizeChange";a:4:{s:9:"prototype";s:17:"dojox.VirtualGrid";s:4:"type";s:8:"Function";s:6:"source";s:78:" dojox.grid.jobs.job(this.id + 'SizeChange', 50, dojo.hitch(this, "update"));";s:7:"summary";s:0:"";}s:30:"dojox.VirtualGrid.renderOnIdle";a:4:{s:9:"prototype";s:17:"dojox.VirtualGrid";s:4:"type";s:8:"Function";s:6:"source";s:44:" setTimeout(dojo.hitch(this, "render"), 1);";s:7:"summary";s:0:"";}s:32:"dojox.VirtualGrid.createManagers";a:4:{s:9:"prototype";s:17:"dojox.VirtualGrid";s:4:"type";s:8:"Function";s:6:"source";s:235:" this.rows = new dojox.grid.rows(this);
// focus manager
this.focus = new dojox.grid.focus(this);
// selection manager
this.selection = new dojox.grid.selection(this);
// edit manager
this.edit = new dojox.grid.edit(this);";s:7:"summary";s:93:"create grid managers for various tasks including rows, focus, selection, editing
row manager";}s:32:"dojox.VirtualGrid.createScroller";a:4:{s:9:"prototype";s:17:"dojox.VirtualGrid";s:4:"type";s:8:"Function";s:6:"source";s:218:" this.scroller = new dojox.grid.scroller.columns();
this.scroller._pageIdPrefix = this.id + '-';
this.scroller.renderRow = dojo.hitch(this, "renderRow");
this.scroller.removeRow = dojo.hitch(this, "rowRemoved");";s:7:"summary";s:30:"Creates a new virtual scroller";}s:30:"dojox.VirtualGrid.createLayout";a:4:{s:9:"prototype";s:17:"dojox.VirtualGrid";s:4:"type";s:8:"Function";s:6:"source";s:44:" this.layout = new dojox.grid.layout(this);";s:7:"summary";s:25:"Creates a new Grid layout";}s:29:"dojox.VirtualGrid.createViews";a:4:{s:9:"prototype";s:17:"dojox.VirtualGrid";s:4:"type";s:8:"Function";s:6:"source";s:100:" this.views = new dojox.grid.views(this);
this.views.createView = dojo.hitch(this, "createView");";s:7:"summary";s:0:"";}s:28:"dojox.VirtualGrid.createView";a:5:{s:9:"prototype";s:17:"dojox.VirtualGrid";s:4:"type";s:8:"Function";s:10:"parameters";a:1:{s:7:"inClass";a:1:{s:4:"type";s:0:"";}}s:6:"source";s:571:" if(dojo.isAIR){
var obj = window;
var names = inClass.split('.');
for(var i=0;i
templatePath: dojo.moduleUrl("dojox.grid.compat","resources/VirtualGrid.html"),
// classTag: String
// CSS class applied to the grid's domNode
classTag: 'dojoxGrid',
get: function(inRowIndex){
// summary: Default data getter.
// description:
// Provides data to display in a grid cell. Called in grid cell context.
// So this.cell.index is the column index.
// inRowIndex: Integer
// Row for which to provide data
// returns:
// Data to display for a given grid cell.
},
// settings
// rowCount: Integer
// Number of rows to display.
rowCount: 5,
// keepRows: Integer
// Number of rows to keep in the rendering cache.
keepRows: 75,
// rowsPerPage: Integer
// Number of rows to render at a time.
rowsPerPage: 25,
// autoWidth: Boolean
// If autoWidth is true, grid width is automatically set to fit the data.
autoWidth: false,
// autoHeight: Boolean
// If autoHeight is true, grid height is automatically set to fit the data.
autoHeight: false,
// autoRender: Boolean
// If autoRender is true, grid will render itself after initialization.
autoRender: true,
// defaultHeight: String
// default height of the grid, measured in any valid css unit.
defaultHeight: '15em',
// structure: Object|String
// View layout defintion. Can be set to a layout object, or to the (string) name of a layout object.
structure: '',
// elasticView: Integer
// Override defaults and make the indexed grid view elastic, thus filling available horizontal space.
elasticView: -1,
// singleClickEdit: boolean
// Single-click starts editing. Default is double-click
singleClickEdit: false,
// Used to store the last two clicks, to ensure double-clicking occurs based on the intended row
_click: null,
// private
sortInfo: 0,
themeable: true,
// initialization
buildRendering: function(){
this.inherited(arguments);
// reset get from blank function (needed for markup parsing) to null, if not changed
if(this.get == dojox.VirtualGrid.prototype.get){
this.get = null;
}
if(!this.domNode.getAttribute('tabIndex')){
this.domNode.tabIndex = "0";
}
this.createScroller();
this.createLayout();
this.createViews();
this.createManagers();
dojox.grid.initTextSizePoll();
this.connect(dojox.grid, "textSizeChanged", "textSizeChanged");
dojox.grid.funnelEvents(this.domNode, this, 'doKeyEvent', dojox.grid.keyEvents);
this.connect(this, "onShow", "renderOnIdle");
},
postCreate: function(){
// replace stock styleChanged with one that triggers an update
this.styleChanged = this._styleChanged;
this.setStructure(this.structure);
this._click = [];
},
destroy: function(){
this.domNode.onReveal = null;
this.domNode.onSizeChange = null;
this.edit.destroy();
this.views.destroyViews();
this.inherited(arguments);
},
styleChanged: function(){
this.setStyledClass(this.domNode, '');
},
_styleChanged: function(){
this.styleChanged();
this.update();
},
textSizeChanged: function(){
setTimeout(dojo.hitch(this, "_textSizeChanged"), 1);
},
_textSizeChanged: function(){
if(this.domNode){
this.views.forEach(function(v){
v.content.update();
});
this.render();
}
},
sizeChange: function(){
dojox.grid.jobs.job(this.id + 'SizeChange', 50, dojo.hitch(this, "update"));
},
renderOnIdle: function() {
setTimeout(dojo.hitch(this, "render"), 1);
},
createManagers: function(){
// summary:
// create grid managers for various tasks including rows, focus, selection, editing
// row manager
this.rows = new dojox.grid.rows(this);
// focus manager
this.focus = new dojox.grid.focus(this);
// selection manager
this.selection = new dojox.grid.selection(this);
// edit manager
this.edit = new dojox.grid.edit(this);
},
createScroller: function(){
// summary: Creates a new virtual scroller
this.scroller = new dojox.grid.scroller.columns();
this.scroller._pageIdPrefix = this.id + '-';
this.scroller.renderRow = dojo.hitch(this, "renderRow");
this.scroller.removeRow = dojo.hitch(this, "rowRemoved");
},
createLayout: function(){
// summary: Creates a new Grid layout
this.layout = new dojox.grid.layout(this);
},
// views
createViews: function(){
this.views = new dojox.grid.views(this);
this.views.createView = dojo.hitch(this, "createView");
},
createView: function(inClass){
if(dojo.isAIR){
var obj = window;
var names = inClass.split('.');
for(var i=0;i 0){
}else if(this.domNode.clientHeight <= padBorder.h){
if(this.domNode.parentNode == document.body){
this.domNode.style.height = this.defaultHeight;
}else{
this.fitTo = "parent";
}
}
// if we are given dimensions, size the grid's domNode to those dimensions
if(this._sizeBox){
dojo.contentBox(this.domNode, this._sizeBox);
}else if(this.fitTo == "parent"){
var h = dojo._getContentBox(this.domNode.parentNode).h;
dojo.marginBox(this.domNode, { h: Math.max(0, h) });
}
var h = dojo._getContentBox(this.domNode).h;
if(h == 0 && !this.autoHeight){
// We need to hide the header, since the Grid is essentially hidden.
this.viewsHeaderNode.style.display = "none";
}else{
// Otherwise, show the header and give it an appropriate height.
this.viewsHeaderNode.style.display = "block";
}
// NOTE: it is essential that width be applied before height
// Header height can only be calculated properly after view widths have been set.
// This is because flex column width is naturally 0 in Firefox.
// Therefore prior to width sizing flex columns with spaces are maximally wrapped
// and calculated to be too tall.
this.adaptWidth();
this.adaptHeight();
// default row height (FIXME: use running average(?), remove magic #)
this.scroller.defaultRowHeight = this.rows.getDefaultHeightPx() + 1;
this.postresize();";s:7:"private";b:1;s:7:"summary";s:0:"";}s:28:"dojox.VirtualGrid.adaptWidth";a:4:{s:9:"prototype";s:17:"dojox.VirtualGrid";s:4:"type";s:8:"Function";s:6:"source";s:11005:"dojo.provide("dojox.grid.compat.VirtualGrid");
dojo.require("dojox.grid.compat._grid.lib");
dojo.require("dojox.grid.compat._grid.scroller");
dojo.require("dojox.grid.compat._grid.view");
dojo.require("dojox.grid.compat._grid.views");
dojo.require("dojox.grid.compat._grid.layout");
dojo.require("dojox.grid.compat._grid.rows");
dojo.require("dojox.grid.compat._grid.focus");
dojo.require("dojox.grid.compat._grid.selection");
dojo.require("dojox.grid.compat._grid.edit");
dojo.require("dojox.grid.compat._grid.rowbar");
dojo.require("dojox.grid.compat._grid.publicEvents");
dojo.declare('dojox.VirtualGrid',
[ dijit._Widget, dijit._Templated ],
{
// summary:
// A grid widget with virtual scrolling, cell editing, complex rows,
// sorting, fixed columns, sizeable columns, etc.
//
// description:
// VirtualGrid provides the full set of grid features without any
// direct connection to a data store.
//
// The grid exposes a get function for the grid, or optionally
// individual columns, to populate cell contents.
//
// The grid is rendered based on its structure, an object describing
// column and cell layout.
//
// example:
// A quick sample:
//
// define a get function
// | function get(inRowIndex){ // called in cell context
// | return [this.index, inRowIndex].join(', ');
// | }
//
// define the grid structure:
// | var structure = [ // array of view objects
// | { cells: [// array of rows, a row is an array of cells
// | [
// | { name: "Alpha", width: 6 },
// | { name: "Beta" },
// | { name: "Gamma", get: get }]
// | ]}
// | ];
//
// |
templatePath: dojo.moduleUrl("dojox.grid.compat","resources/VirtualGrid.html"),
// classTag: String
// CSS class applied to the grid's domNode
classTag: 'dojoxGrid',
get: function(inRowIndex){
// summary: Default data getter.
// description:
// Provides data to display in a grid cell. Called in grid cell context.
// So this.cell.index is the column index.
// inRowIndex: Integer
// Row for which to provide data
// returns:
// Data to display for a given grid cell.
},
// settings
// rowCount: Integer
// Number of rows to display.
rowCount: 5,
// keepRows: Integer
// Number of rows to keep in the rendering cache.
keepRows: 75,
// rowsPerPage: Integer
// Number of rows to render at a time.
rowsPerPage: 25,
// autoWidth: Boolean
// If autoWidth is true, grid width is automatically set to fit the data.
autoWidth: false,
// autoHeight: Boolean
// If autoHeight is true, grid height is automatically set to fit the data.
autoHeight: false,
// autoRender: Boolean
// If autoRender is true, grid will render itself after initialization.
autoRender: true,
// defaultHeight: String
// default height of the grid, measured in any valid css unit.
defaultHeight: '15em',
// structure: Object|String
// View layout defintion. Can be set to a layout object, or to the (string) name of a layout object.
structure: '',
// elasticView: Integer
// Override defaults and make the indexed grid view elastic, thus filling available horizontal space.
elasticView: -1,
// singleClickEdit: boolean
// Single-click starts editing. Default is double-click
singleClickEdit: false,
// Used to store the last two clicks, to ensure double-clicking occurs based on the intended row
_click: null,
// private
sortInfo: 0,
themeable: true,
// initialization
buildRendering: function(){
this.inherited(arguments);
// reset get from blank function (needed for markup parsing) to null, if not changed
if(this.get == dojox.VirtualGrid.prototype.get){
this.get = null;
}
if(!this.domNode.getAttribute('tabIndex')){
this.domNode.tabIndex = "0";
}
this.createScroller();
this.createLayout();
this.createViews();
this.createManagers();
dojox.grid.initTextSizePoll();
this.connect(dojox.grid, "textSizeChanged", "textSizeChanged");
dojox.grid.funnelEvents(this.domNode, this, 'doKeyEvent', dojox.grid.keyEvents);
this.connect(this, "onShow", "renderOnIdle");
},
postCreate: function(){
// replace stock styleChanged with one that triggers an update
this.styleChanged = this._styleChanged;
this.setStructure(this.structure);
this._click = [];
},
destroy: function(){
this.domNode.onReveal = null;
this.domNode.onSizeChange = null;
this.edit.destroy();
this.views.destroyViews();
this.inherited(arguments);
},
styleChanged: function(){
this.setStyledClass(this.domNode, '');
},
_styleChanged: function(){
this.styleChanged();
this.update();
},
textSizeChanged: function(){
setTimeout(dojo.hitch(this, "_textSizeChanged"), 1);
},
_textSizeChanged: function(){
if(this.domNode){
this.views.forEach(function(v){
v.content.update();
});
this.render();
}
},
sizeChange: function(){
dojox.grid.jobs.job(this.id + 'SizeChange', 50, dojo.hitch(this, "update"));
},
renderOnIdle: function() {
setTimeout(dojo.hitch(this, "render"), 1);
},
createManagers: function(){
// summary:
// create grid managers for various tasks including rows, focus, selection, editing
// row manager
this.rows = new dojox.grid.rows(this);
// focus manager
this.focus = new dojox.grid.focus(this);
// selection manager
this.selection = new dojox.grid.selection(this);
// edit manager
this.edit = new dojox.grid.edit(this);
},
createScroller: function(){
// summary: Creates a new virtual scroller
this.scroller = new dojox.grid.scroller.columns();
this.scroller._pageIdPrefix = this.id + '-';
this.scroller.renderRow = dojo.hitch(this, "renderRow");
this.scroller.removeRow = dojo.hitch(this, "rowRemoved");
},
createLayout: function(){
// summary: Creates a new Grid layout
this.layout = new dojox.grid.layout(this);
},
// views
createViews: function(){
this.views = new dojox.grid.views(this);
this.views.createView = dojo.hitch(this, "createView");
},
createView: function(inClass){
if(dojo.isAIR){
var obj = window;
var names = inClass.split('.');
for(var i=0;i 0){
}else if(this.domNode.clientHeight <= padBorder.h){
if(this.domNode.parentNode == document.body){
this.domNode.style.height = this.defaultHeight;
}else{
this.fitTo = "parent";
}
}
// if we are given dimensions, size the grid's domNode to those dimensions
if(this._sizeBox){
dojo.contentBox(this.domNode, this._sizeBox);
}else if(this.fitTo == "parent"){
var h = dojo._getContentBox(this.domNode.parentNode).h;
dojo.marginBox(this.domNode, { h: Math.max(0, h) });
}
var h = dojo._getContentBox(this.domNode).h;
if(h == 0 && !this.autoHeight){
// We need to hide the header, since the Grid is essentially hidden.
this.viewsHeaderNode.style.display = "none";
}else{
// Otherwise, show the header and give it an appropriate height.
this.viewsHeaderNode.style.display = "block";
}
// NOTE: it is essential that width be applied before height
// Header height can only be calculated properly after view widths have been set.
// This is because flex column width is naturally 0 in Firefox.
// Therefore prior to width sizing flex columns with spaces are maximally wrapped
// and calculated to be too tall.
this.adaptWidth();
this.adaptHeight();
// default row height (FIXME: use running average(?), remove magic #)
this.scroller.defaultRowHeight = this.rows.getDefaultHeightPx() + 1;
this.postresize();
},
adaptWidth: function() {
// private: sets width and position for views and update grid width if necessary
var
w = this.autoWidth ? 0 : this.domNode.clientWidth || (this.domNode.offsetWidth - this._getPadBorder().w);
var vw = this.views.arrange(1, w);
this.views.onEach("adaptWidth");
if (this.autoWidth)
this.domNode.style.width = vw + "px";";s:7:"summary";s:0:"";}s:29:"dojox.VirtualGrid.adaptHeight";a:4:{s:9:"prototype";s:17:"dojox.VirtualGrid";s:4:"type";s:8:"Function";s:6:"source";s:11608:"dojo.provide("dojox.grid.compat.VirtualGrid");
dojo.require("dojox.grid.compat._grid.lib");
dojo.require("dojox.grid.compat._grid.scroller");
dojo.require("dojox.grid.compat._grid.view");
dojo.require("dojox.grid.compat._grid.views");
dojo.require("dojox.grid.compat._grid.layout");
dojo.require("dojox.grid.compat._grid.rows");
dojo.require("dojox.grid.compat._grid.focus");
dojo.require("dojox.grid.compat._grid.selection");
dojo.require("dojox.grid.compat._grid.edit");
dojo.require("dojox.grid.compat._grid.rowbar");
dojo.require("dojox.grid.compat._grid.publicEvents");
dojo.declare('dojox.VirtualGrid',
[ dijit._Widget, dijit._Templated ],
{
// summary:
// A grid widget with virtual scrolling, cell editing, complex rows,
// sorting, fixed columns, sizeable columns, etc.
//
// description:
// VirtualGrid provides the full set of grid features without any
// direct connection to a data store.
//
// The grid exposes a get function for the grid, or optionally
// individual columns, to populate cell contents.
//
// The grid is rendered based on its structure, an object describing
// column and cell layout.
//
// example:
// A quick sample:
//
// define a get function
// | function get(inRowIndex){ // called in cell context
// | return [this.index, inRowIndex].join(', ');
// | }
//
// define the grid structure:
// | var structure = [ // array of view objects
// | { cells: [// array of rows, a row is an array of cells
// | [
// | { name: "Alpha", width: 6 },
// | { name: "Beta" },
// | { name: "Gamma", get: get }]
// | ]}
// | ];
//
// |
templatePath: dojo.moduleUrl("dojox.grid.compat","resources/VirtualGrid.html"),
// classTag: String
// CSS class applied to the grid's domNode
classTag: 'dojoxGrid',
get: function(inRowIndex){
// summary: Default data getter.
// description:
// Provides data to display in a grid cell. Called in grid cell context.
// So this.cell.index is the column index.
// inRowIndex: Integer
// Row for which to provide data
// returns:
// Data to display for a given grid cell.
},
// settings
// rowCount: Integer
// Number of rows to display.
rowCount: 5,
// keepRows: Integer
// Number of rows to keep in the rendering cache.
keepRows: 75,
// rowsPerPage: Integer
// Number of rows to render at a time.
rowsPerPage: 25,
// autoWidth: Boolean
// If autoWidth is true, grid width is automatically set to fit the data.
autoWidth: false,
// autoHeight: Boolean
// If autoHeight is true, grid height is automatically set to fit the data.
autoHeight: false,
// autoRender: Boolean
// If autoRender is true, grid will render itself after initialization.
autoRender: true,
// defaultHeight: String
// default height of the grid, measured in any valid css unit.
defaultHeight: '15em',
// structure: Object|String
// View layout defintion. Can be set to a layout object, or to the (string) name of a layout object.
structure: '',
// elasticView: Integer
// Override defaults and make the indexed grid view elastic, thus filling available horizontal space.
elasticView: -1,
// singleClickEdit: boolean
// Single-click starts editing. Default is double-click
singleClickEdit: false,
// Used to store the last two clicks, to ensure double-clicking occurs based on the intended row
_click: null,
// private
sortInfo: 0,
themeable: true,
// initialization
buildRendering: function(){
this.inherited(arguments);
// reset get from blank function (needed for markup parsing) to null, if not changed
if(this.get == dojox.VirtualGrid.prototype.get){
this.get = null;
}
if(!this.domNode.getAttribute('tabIndex')){
this.domNode.tabIndex = "0";
}
this.createScroller();
this.createLayout();
this.createViews();
this.createManagers();
dojox.grid.initTextSizePoll();
this.connect(dojox.grid, "textSizeChanged", "textSizeChanged");
dojox.grid.funnelEvents(this.domNode, this, 'doKeyEvent', dojox.grid.keyEvents);
this.connect(this, "onShow", "renderOnIdle");
},
postCreate: function(){
// replace stock styleChanged with one that triggers an update
this.styleChanged = this._styleChanged;
this.setStructure(this.structure);
this._click = [];
},
destroy: function(){
this.domNode.onReveal = null;
this.domNode.onSizeChange = null;
this.edit.destroy();
this.views.destroyViews();
this.inherited(arguments);
},
styleChanged: function(){
this.setStyledClass(this.domNode, '');
},
_styleChanged: function(){
this.styleChanged();
this.update();
},
textSizeChanged: function(){
setTimeout(dojo.hitch(this, "_textSizeChanged"), 1);
},
_textSizeChanged: function(){
if(this.domNode){
this.views.forEach(function(v){
v.content.update();
});
this.render();
}
},
sizeChange: function(){
dojox.grid.jobs.job(this.id + 'SizeChange', 50, dojo.hitch(this, "update"));
},
renderOnIdle: function() {
setTimeout(dojo.hitch(this, "render"), 1);
},
createManagers: function(){
// summary:
// create grid managers for various tasks including rows, focus, selection, editing
// row manager
this.rows = new dojox.grid.rows(this);
// focus manager
this.focus = new dojox.grid.focus(this);
// selection manager
this.selection = new dojox.grid.selection(this);
// edit manager
this.edit = new dojox.grid.edit(this);
},
createScroller: function(){
// summary: Creates a new virtual scroller
this.scroller = new dojox.grid.scroller.columns();
this.scroller._pageIdPrefix = this.id + '-';
this.scroller.renderRow = dojo.hitch(this, "renderRow");
this.scroller.removeRow = dojo.hitch(this, "rowRemoved");
},
createLayout: function(){
// summary: Creates a new Grid layout
this.layout = new dojox.grid.layout(this);
},
// views
createViews: function(){
this.views = new dojox.grid.views(this);
this.views.createView = dojo.hitch(this, "createView");
},
createView: function(inClass){
if(dojo.isAIR){
var obj = window;
var names = inClass.split('.');
for(var i=0;i 0){
}else if(this.domNode.clientHeight <= padBorder.h){
if(this.domNode.parentNode == document.body){
this.domNode.style.height = this.defaultHeight;
}else{
this.fitTo = "parent";
}
}
// if we are given dimensions, size the grid's domNode to those dimensions
if(this._sizeBox){
dojo.contentBox(this.domNode, this._sizeBox);
}else if(this.fitTo == "parent"){
var h = dojo._getContentBox(this.domNode.parentNode).h;
dojo.marginBox(this.domNode, { h: Math.max(0, h) });
}
var h = dojo._getContentBox(this.domNode).h;
if(h == 0 && !this.autoHeight){
// We need to hide the header, since the Grid is essentially hidden.
this.viewsHeaderNode.style.display = "none";
}else{
// Otherwise, show the header and give it an appropriate height.
this.viewsHeaderNode.style.display = "block";
}
// NOTE: it is essential that width be applied before height
// Header height can only be calculated properly after view widths have been set.
// This is because flex column width is naturally 0 in Firefox.
// Therefore prior to width sizing flex columns with spaces are maximally wrapped
// and calculated to be too tall.
this.adaptWidth();
this.adaptHeight();
// default row height (FIXME: use running average(?), remove magic #)
this.scroller.defaultRowHeight = this.rows.getDefaultHeightPx() + 1;
this.postresize();
},
adaptWidth: function() {
// private: sets width and position for views and update grid width if necessary
var
w = this.autoWidth ? 0 : this.domNode.clientWidth || (this.domNode.offsetWidth - this._getPadBorder().w);
var vw = this.views.arrange(1, w);
this.views.onEach("adaptWidth");
if (this.autoWidth)
this.domNode.style.width = vw + "px";
},
adaptHeight: function(){
// private: measures and normalizes header height, then sets view heights, and then updates scroller
var vns = this.viewsHeaderNode.style, t = vns.display == "none" ? 0 : this.views.measureHeader();
vns.height = t + 'px';
// header heights are reset during measuring so must be normalized after measuring.
this.views.normalizeHeaderNodeHeight();
// content extent
var h = (this.autoHeight ? -1 : Math.max(this.domNode.clientHeight - t, 0) || 0);
this.views.onEach('setSize', [0, h]);
this.views.onEach('adaptHeight');
this.scroller.windowHeight = h; ";s:7:"summary";s:0:"";}s:24:"dojox.VirtualGrid.render";a:4:{s:9:"prototype";s:17:"dojox.VirtualGrid";s:4:"type";s:8:"Function";s:6:"source";s:308:" if(!this.domNode){return;}
if(!this.hasLayout()) {
this.scroller.init(0, this.keepRows, this.rowsPerPage);
return;
}
//
this.update = this.defaultUpdate;
this.scroller.init(this.rowCount, this.keepRows, this.rowsPerPage);
this.prerender();
this.setScrollTop(0);
this.postrender();";s:7:"summary";s:122:"Render the grid, headers, and views. Edit and scrolling states are reset. To retain edit and
scrolling states, see Update.";}s:27:"dojox.VirtualGrid.prerender";a:4:{s:9:"prototype";s:17:"dojox.VirtualGrid";s:4:"type";s:8:"Function";s:6:"source";s:12391:"dojo.provide("dojox.grid.compat.VirtualGrid");
dojo.require("dojox.grid.compat._grid.lib");
dojo.require("dojox.grid.compat._grid.scroller");
dojo.require("dojox.grid.compat._grid.view");
dojo.require("dojox.grid.compat._grid.views");
dojo.require("dojox.grid.compat._grid.layout");
dojo.require("dojox.grid.compat._grid.rows");
dojo.require("dojox.grid.compat._grid.focus");
dojo.require("dojox.grid.compat._grid.selection");
dojo.require("dojox.grid.compat._grid.edit");
dojo.require("dojox.grid.compat._grid.rowbar");
dojo.require("dojox.grid.compat._grid.publicEvents");
dojo.declare('dojox.VirtualGrid',
[ dijit._Widget, dijit._Templated ],
{
// summary:
// A grid widget with virtual scrolling, cell editing, complex rows,
// sorting, fixed columns, sizeable columns, etc.
//
// description:
// VirtualGrid provides the full set of grid features without any
// direct connection to a data store.
//
// The grid exposes a get function for the grid, or optionally
// individual columns, to populate cell contents.
//
// The grid is rendered based on its structure, an object describing
// column and cell layout.
//
// example:
// A quick sample:
//
// define a get function
// | function get(inRowIndex){ // called in cell context
// | return [this.index, inRowIndex].join(', ');
// | }
//
// define the grid structure:
// | var structure = [ // array of view objects
// | { cells: [// array of rows, a row is an array of cells
// | [
// | { name: "Alpha", width: 6 },
// | { name: "Beta" },
// | { name: "Gamma", get: get }]
// | ]}
// | ];
//
// |
templatePath: dojo.moduleUrl("dojox.grid.compat","resources/VirtualGrid.html"),
// classTag: String
// CSS class applied to the grid's domNode
classTag: 'dojoxGrid',
get: function(inRowIndex){
// summary: Default data getter.
// description:
// Provides data to display in a grid cell. Called in grid cell context.
// So this.cell.index is the column index.
// inRowIndex: Integer
// Row for which to provide data
// returns:
// Data to display for a given grid cell.
},
// settings
// rowCount: Integer
// Number of rows to display.
rowCount: 5,
// keepRows: Integer
// Number of rows to keep in the rendering cache.
keepRows: 75,
// rowsPerPage: Integer
// Number of rows to render at a time.
rowsPerPage: 25,
// autoWidth: Boolean
// If autoWidth is true, grid width is automatically set to fit the data.
autoWidth: false,
// autoHeight: Boolean
// If autoHeight is true, grid height is automatically set to fit the data.
autoHeight: false,
// autoRender: Boolean
// If autoRender is true, grid will render itself after initialization.
autoRender: true,
// defaultHeight: String
// default height of the grid, measured in any valid css unit.
defaultHeight: '15em',
// structure: Object|String
// View layout defintion. Can be set to a layout object, or to the (string) name of a layout object.
structure: '',
// elasticView: Integer
// Override defaults and make the indexed grid view elastic, thus filling available horizontal space.
elasticView: -1,
// singleClickEdit: boolean
// Single-click starts editing. Default is double-click
singleClickEdit: false,
// Used to store the last two clicks, to ensure double-clicking occurs based on the intended row
_click: null,
// private
sortInfo: 0,
themeable: true,
// initialization
buildRendering: function(){
this.inherited(arguments);
// reset get from blank function (needed for markup parsing) to null, if not changed
if(this.get == dojox.VirtualGrid.prototype.get){
this.get = null;
}
if(!this.domNode.getAttribute('tabIndex')){
this.domNode.tabIndex = "0";
}
this.createScroller();
this.createLayout();
this.createViews();
this.createManagers();
dojox.grid.initTextSizePoll();
this.connect(dojox.grid, "textSizeChanged", "textSizeChanged");
dojox.grid.funnelEvents(this.domNode, this, 'doKeyEvent', dojox.grid.keyEvents);
this.connect(this, "onShow", "renderOnIdle");
},
postCreate: function(){
// replace stock styleChanged with one that triggers an update
this.styleChanged = this._styleChanged;
this.setStructure(this.structure);
this._click = [];
},
destroy: function(){
this.domNode.onReveal = null;
this.domNode.onSizeChange = null;
this.edit.destroy();
this.views.destroyViews();
this.inherited(arguments);
},
styleChanged: function(){
this.setStyledClass(this.domNode, '');
},
_styleChanged: function(){
this.styleChanged();
this.update();
},
textSizeChanged: function(){
setTimeout(dojo.hitch(this, "_textSizeChanged"), 1);
},
_textSizeChanged: function(){
if(this.domNode){
this.views.forEach(function(v){
v.content.update();
});
this.render();
}
},
sizeChange: function(){
dojox.grid.jobs.job(this.id + 'SizeChange', 50, dojo.hitch(this, "update"));
},
renderOnIdle: function() {
setTimeout(dojo.hitch(this, "render"), 1);
},
createManagers: function(){
// summary:
// create grid managers for various tasks including rows, focus, selection, editing
// row manager
this.rows = new dojox.grid.rows(this);
// focus manager
this.focus = new dojox.grid.focus(this);
// selection manager
this.selection = new dojox.grid.selection(this);
// edit manager
this.edit = new dojox.grid.edit(this);
},
createScroller: function(){
// summary: Creates a new virtual scroller
this.scroller = new dojox.grid.scroller.columns();
this.scroller._pageIdPrefix = this.id + '-';
this.scroller.renderRow = dojo.hitch(this, "renderRow");
this.scroller.removeRow = dojo.hitch(this, "rowRemoved");
},
createLayout: function(){
// summary: Creates a new Grid layout
this.layout = new dojox.grid.layout(this);
},
// views
createViews: function(){
this.views = new dojox.grid.views(this);
this.views.createView = dojo.hitch(this, "createView");
},
createView: function(inClass){
if(dojo.isAIR){
var obj = window;
var names = inClass.split('.');
for(var i=0;i 0){
}else if(this.domNode.clientHeight <= padBorder.h){
if(this.domNode.parentNode == document.body){
this.domNode.style.height = this.defaultHeight;
}else{
this.fitTo = "parent";
}
}
// if we are given dimensions, size the grid's domNode to those dimensions
if(this._sizeBox){
dojo.contentBox(this.domNode, this._sizeBox);
}else if(this.fitTo == "parent"){
var h = dojo._getContentBox(this.domNode.parentNode).h;
dojo.marginBox(this.domNode, { h: Math.max(0, h) });
}
var h = dojo._getContentBox(this.domNode).h;
if(h == 0 && !this.autoHeight){
// We need to hide the header, since the Grid is essentially hidden.
this.viewsHeaderNode.style.display = "none";
}else{
// Otherwise, show the header and give it an appropriate height.
this.viewsHeaderNode.style.display = "block";
}
// NOTE: it is essential that width be applied before height
// Header height can only be calculated properly after view widths have been set.
// This is because flex column width is naturally 0 in Firefox.
// Therefore prior to width sizing flex columns with spaces are maximally wrapped
// and calculated to be too tall.
this.adaptWidth();
this.adaptHeight();
// default row height (FIXME: use running average(?), remove magic #)
this.scroller.defaultRowHeight = this.rows.getDefaultHeightPx() + 1;
this.postresize();
},
adaptWidth: function() {
// private: sets width and position for views and update grid width if necessary
var
w = this.autoWidth ? 0 : this.domNode.clientWidth || (this.domNode.offsetWidth - this._getPadBorder().w);
var vw = this.views.arrange(1, w);
this.views.onEach("adaptWidth");
if (this.autoWidth)
this.domNode.style.width = vw + "px";
},
adaptHeight: function(){
// private: measures and normalizes header height, then sets view heights, and then updates scroller
var vns = this.viewsHeaderNode.style, t = vns.display == "none" ? 0 : this.views.measureHeader();
vns.height = t + 'px';
// header heights are reset during measuring so must be normalized after measuring.
this.views.normalizeHeaderNodeHeight();
// content extent
var h = (this.autoHeight ? -1 : Math.max(this.domNode.clientHeight - t, 0) || 0);
this.views.onEach('setSize', [0, h]);
this.views.onEach('adaptHeight');
this.scroller.windowHeight = h;
},
// render
render: function(){
// summary:
// Render the grid, headers, and views. Edit and scrolling states are reset. To retain edit and
// scrolling states, see Update.
if(!this.domNode){return;}
if(!this.hasLayout()) {
this.scroller.init(0, this.keepRows, this.rowsPerPage);
return;
}
//
this.update = this.defaultUpdate;
this.scroller.init(this.rowCount, this.keepRows, this.rowsPerPage);
this.prerender();
this.setScrollTop(0);
this.postrender();
},
prerender: function(){
// if autoHeight, make sure scroller knows not to virtualize; everything must be rendered.
this.keepRows = this.autoHeight ? 0 : this.constructor.prototype.keepRows;
this.scroller.setKeepInfo(this.keepRows);
this.views.render();
this._resize();";s:7:"summary";s:0:"";}s:28:"dojox.VirtualGrid.postrender";a:4:{s:9:"prototype";s:17:"dojox.VirtualGrid";s:4:"type";s:8:"Function";s:6:"source";s:121:" this.postresize();
this.focus.initFocusView();
// make rows unselectable
dojo.setSelectable(this.domNode, false);";s:7:"summary";s:0:"";}s:28:"dojox.VirtualGrid.postresize";a:4:{s:9:"prototype";s:17:"dojox.VirtualGrid";s:4:"type";s:8:"Function";s:6:"source";s:12739:"dojo.provide("dojox.grid.compat.VirtualGrid");
dojo.require("dojox.grid.compat._grid.lib");
dojo.require("dojox.grid.compat._grid.scroller");
dojo.require("dojox.grid.compat._grid.view");
dojo.require("dojox.grid.compat._grid.views");
dojo.require("dojox.grid.compat._grid.layout");
dojo.require("dojox.grid.compat._grid.rows");
dojo.require("dojox.grid.compat._grid.focus");
dojo.require("dojox.grid.compat._grid.selection");
dojo.require("dojox.grid.compat._grid.edit");
dojo.require("dojox.grid.compat._grid.rowbar");
dojo.require("dojox.grid.compat._grid.publicEvents");
dojo.declare('dojox.VirtualGrid',
[ dijit._Widget, dijit._Templated ],
{
// summary:
// A grid widget with virtual scrolling, cell editing, complex rows,
// sorting, fixed columns, sizeable columns, etc.
//
// description:
// VirtualGrid provides the full set of grid features without any
// direct connection to a data store.
//
// The grid exposes a get function for the grid, or optionally
// individual columns, to populate cell contents.
//
// The grid is rendered based on its structure, an object describing
// column and cell layout.
//
// example:
// A quick sample:
//
// define a get function
// | function get(inRowIndex){ // called in cell context
// | return [this.index, inRowIndex].join(', ');
// | }
//
// define the grid structure:
// | var structure = [ // array of view objects
// | { cells: [// array of rows, a row is an array of cells
// | [
// | { name: "Alpha", width: 6 },
// | { name: "Beta" },
// | { name: "Gamma", get: get }]
// | ]}
// | ];
//
// |
templatePath: dojo.moduleUrl("dojox.grid.compat","resources/VirtualGrid.html"),
// classTag: String
// CSS class applied to the grid's domNode
classTag: 'dojoxGrid',
get: function(inRowIndex){
// summary: Default data getter.
// description:
// Provides data to display in a grid cell. Called in grid cell context.
// So this.cell.index is the column index.
// inRowIndex: Integer
// Row for which to provide data
// returns:
// Data to display for a given grid cell.
},
// settings
// rowCount: Integer
// Number of rows to display.
rowCount: 5,
// keepRows: Integer
// Number of rows to keep in the rendering cache.
keepRows: 75,
// rowsPerPage: Integer
// Number of rows to render at a time.
rowsPerPage: 25,
// autoWidth: Boolean
// If autoWidth is true, grid width is automatically set to fit the data.
autoWidth: false,
// autoHeight: Boolean
// If autoHeight is true, grid height is automatically set to fit the data.
autoHeight: false,
// autoRender: Boolean
// If autoRender is true, grid will render itself after initialization.
autoRender: true,
// defaultHeight: String
// default height of the grid, measured in any valid css unit.
defaultHeight: '15em',
// structure: Object|String
// View layout defintion. Can be set to a layout object, or to the (string) name of a layout object.
structure: '',
// elasticView: Integer
// Override defaults and make the indexed grid view elastic, thus filling available horizontal space.
elasticView: -1,
// singleClickEdit: boolean
// Single-click starts editing. Default is double-click
singleClickEdit: false,
// Used to store the last two clicks, to ensure double-clicking occurs based on the intended row
_click: null,
// private
sortInfo: 0,
themeable: true,
// initialization
buildRendering: function(){
this.inherited(arguments);
// reset get from blank function (needed for markup parsing) to null, if not changed
if(this.get == dojox.VirtualGrid.prototype.get){
this.get = null;
}
if(!this.domNode.getAttribute('tabIndex')){
this.domNode.tabIndex = "0";
}
this.createScroller();
this.createLayout();
this.createViews();
this.createManagers();
dojox.grid.initTextSizePoll();
this.connect(dojox.grid, "textSizeChanged", "textSizeChanged");
dojox.grid.funnelEvents(this.domNode, this, 'doKeyEvent', dojox.grid.keyEvents);
this.connect(this, "onShow", "renderOnIdle");
},
postCreate: function(){
// replace stock styleChanged with one that triggers an update
this.styleChanged = this._styleChanged;
this.setStructure(this.structure);
this._click = [];
},
destroy: function(){
this.domNode.onReveal = null;
this.domNode.onSizeChange = null;
this.edit.destroy();
this.views.destroyViews();
this.inherited(arguments);
},
styleChanged: function(){
this.setStyledClass(this.domNode, '');
},
_styleChanged: function(){
this.styleChanged();
this.update();
},
textSizeChanged: function(){
setTimeout(dojo.hitch(this, "_textSizeChanged"), 1);
},
_textSizeChanged: function(){
if(this.domNode){
this.views.forEach(function(v){
v.content.update();
});
this.render();
}
},
sizeChange: function(){
dojox.grid.jobs.job(this.id + 'SizeChange', 50, dojo.hitch(this, "update"));
},
renderOnIdle: function() {
setTimeout(dojo.hitch(this, "render"), 1);
},
createManagers: function(){
// summary:
// create grid managers for various tasks including rows, focus, selection, editing
// row manager
this.rows = new dojox.grid.rows(this);
// focus manager
this.focus = new dojox.grid.focus(this);
// selection manager
this.selection = new dojox.grid.selection(this);
// edit manager
this.edit = new dojox.grid.edit(this);
},
createScroller: function(){
// summary: Creates a new virtual scroller
this.scroller = new dojox.grid.scroller.columns();
this.scroller._pageIdPrefix = this.id + '-';
this.scroller.renderRow = dojo.hitch(this, "renderRow");
this.scroller.removeRow = dojo.hitch(this, "rowRemoved");
},
createLayout: function(){
// summary: Creates a new Grid layout
this.layout = new dojox.grid.layout(this);
},
// views
createViews: function(){
this.views = new dojox.grid.views(this);
this.views.createView = dojo.hitch(this, "createView");
},
createView: function(inClass){
if(dojo.isAIR){
var obj = window;
var names = inClass.split('.');
for(var i=0;i 0){
}else if(this.domNode.clientHeight <= padBorder.h){
if(this.domNode.parentNode == document.body){
this.domNode.style.height = this.defaultHeight;
}else{
this.fitTo = "parent";
}
}
// if we are given dimensions, size the grid's domNode to those dimensions
if(this._sizeBox){
dojo.contentBox(this.domNode, this._sizeBox);
}else if(this.fitTo == "parent"){
var h = dojo._getContentBox(this.domNode.parentNode).h;
dojo.marginBox(this.domNode, { h: Math.max(0, h) });
}
var h = dojo._getContentBox(this.domNode).h;
if(h == 0 && !this.autoHeight){
// We need to hide the header, since the Grid is essentially hidden.
this.viewsHeaderNode.style.display = "none";
}else{
// Otherwise, show the header and give it an appropriate height.
this.viewsHeaderNode.style.display = "block";
}
// NOTE: it is essential that width be applied before height
// Header height can only be calculated properly after view widths have been set.
// This is because flex column width is naturally 0 in Firefox.
// Therefore prior to width sizing flex columns with spaces are maximally wrapped
// and calculated to be too tall.
this.adaptWidth();
this.adaptHeight();
// default row height (FIXME: use running average(?), remove magic #)
this.scroller.defaultRowHeight = this.rows.getDefaultHeightPx() + 1;
this.postresize();
},
adaptWidth: function() {
// private: sets width and position for views and update grid width if necessary
var
w = this.autoWidth ? 0 : this.domNode.clientWidth || (this.domNode.offsetWidth - this._getPadBorder().w);
var vw = this.views.arrange(1, w);
this.views.onEach("adaptWidth");
if (this.autoWidth)
this.domNode.style.width = vw + "px";
},
adaptHeight: function(){
// private: measures and normalizes header height, then sets view heights, and then updates scroller
var vns = this.viewsHeaderNode.style, t = vns.display == "none" ? 0 : this.views.measureHeader();
vns.height = t + 'px';
// header heights are reset during measuring so must be normalized after measuring.
this.views.normalizeHeaderNodeHeight();
// content extent
var h = (this.autoHeight ? -1 : Math.max(this.domNode.clientHeight - t, 0) || 0);
this.views.onEach('setSize', [0, h]);
this.views.onEach('adaptHeight');
this.scroller.windowHeight = h;
},
// render
render: function(){
// summary:
// Render the grid, headers, and views. Edit and scrolling states are reset. To retain edit and
// scrolling states, see Update.
if(!this.domNode){return;}
if(!this.hasLayout()) {
this.scroller.init(0, this.keepRows, this.rowsPerPage);
return;
}
//
this.update = this.defaultUpdate;
this.scroller.init(this.rowCount, this.keepRows, this.rowsPerPage);
this.prerender();
this.setScrollTop(0);
this.postrender();
},
prerender: function(){
// if autoHeight, make sure scroller knows not to virtualize; everything must be rendered.
this.keepRows = this.autoHeight ? 0 : this.constructor.prototype.keepRows;
this.scroller.setKeepInfo(this.keepRows);
this.views.render();
this._resize();
},
postrender: function(){
this.postresize();
this.focus.initFocusView();
// make rows unselectable
dojo.setSelectable(this.domNode, false);
},
postresize: function(){
// views are position absolute, so they do not inflate the parent
if(this.autoHeight){
this.viewsNode.style.height = this.views.measureContent() + 'px';
}";s:7:"summary";s:0:"";}s:27:"dojox.VirtualGrid.renderRow";a:5:{s:9:"prototype";s:17:"dojox.VirtualGrid";s:4:"type";s:8:"Function";s:10:"parameters";a:2:{s:10:"inRowIndex";a:1:{s:4:"type";s:0:"";}s:7:"inNodes";a:1:{s:4:"type";s:0:"";}}s:6:"source";s:44:" this.views.renderRow(inRowIndex, inNodes);";s:7:"summary";s:39:"private, used internally to render rows";}s:28:"dojox.VirtualGrid.rowRemoved";a:5:{s:9:"prototype";s:17:"dojox.VirtualGrid";s:4:"type";s:8:"Function";s:10:"parameters";a:1:{s:10:"inRowIndex";a:1:{s:4:"type";s:0:"";}}s:6:"source";s:36:" this.views.rowRemoved(inRowIndex);";s:7:"summary";s:39:"private, used internally to remove rows";}s:29:"dojox.VirtualGrid.invalidated";a:3:{s:9:"prototype";s:17:"dojox.VirtualGrid";s:8:"instance";s:17:"dojox.VirtualGrid";s:7:"summary";s:0:"";}s:26:"dojox.VirtualGrid.updating";a:3:{s:9:"prototype";s:17:"dojox.VirtualGrid";s:8:"instance";s:17:"dojox.VirtualGrid";s:7:"summary";s:0:"";}s:29:"dojox.VirtualGrid.beginUpdate";a:4:{s:9:"prototype";s:17:"dojox.VirtualGrid";s:4:"type";s:8:"Function";s:6:"source";s:174:" if(this.invalidated == null){
this.invalidated = {rows: [], count: 1, all: false, rowCount: undefined};
}else{
this.invalidated.count++;
}
this.updating = true;";s:7:"summary";s:65:"Use to make multiple changes to rows while queueing row updating.";}s:27:"dojox.VirtualGrid.endUpdate";a:4:{s:9:"prototype";s:17:"dojox.VirtualGrid";s:4:"type";s:8:"Function";s:6:"source";s:366:" var i = this.invalidated;
if(--i.count === 0){
this.updating = false;
if(i.rows.length > 0){
for(var r in i.rows){
this.updateRow(Number(r));
}
this.invalidated.rows = [];
}
if(i.rowCount != undefined){
this.updateRowCount(i.rowCount);
i.rowCount = undefined;
}
if(i.all){
this.update();
i.all = false;
}
}";s:7:"summary";s:65:"Use after calling beginUpdate to render any changes made to rows.";}s:31:"dojox.VirtualGrid.defaultUpdate";a:4:{s:9:"prototype";s:17:"dojox.VirtualGrid";s:4:"type";s:8:"Function";s:6:"source";s:14240:"dojo.provide("dojox.grid.compat.VirtualGrid");
dojo.require("dojox.grid.compat._grid.lib");
dojo.require("dojox.grid.compat._grid.scroller");
dojo.require("dojox.grid.compat._grid.view");
dojo.require("dojox.grid.compat._grid.views");
dojo.require("dojox.grid.compat._grid.layout");
dojo.require("dojox.grid.compat._grid.rows");
dojo.require("dojox.grid.compat._grid.focus");
dojo.require("dojox.grid.compat._grid.selection");
dojo.require("dojox.grid.compat._grid.edit");
dojo.require("dojox.grid.compat._grid.rowbar");
dojo.require("dojox.grid.compat._grid.publicEvents");
dojo.declare('dojox.VirtualGrid',
[ dijit._Widget, dijit._Templated ],
{
// summary:
// A grid widget with virtual scrolling, cell editing, complex rows,
// sorting, fixed columns, sizeable columns, etc.
//
// description:
// VirtualGrid provides the full set of grid features without any
// direct connection to a data store.
//
// The grid exposes a get function for the grid, or optionally
// individual columns, to populate cell contents.
//
// The grid is rendered based on its structure, an object describing
// column and cell layout.
//
// example:
// A quick sample:
//
// define a get function
// | function get(inRowIndex){ // called in cell context
// | return [this.index, inRowIndex].join(', ');
// | }
//
// define the grid structure:
// | var structure = [ // array of view objects
// | { cells: [// array of rows, a row is an array of cells
// | [
// | { name: "Alpha", width: 6 },
// | { name: "Beta" },
// | { name: "Gamma", get: get }]
// | ]}
// | ];
//
// |
templatePath: dojo.moduleUrl("dojox.grid.compat","resources/VirtualGrid.html"),
// classTag: String
// CSS class applied to the grid's domNode
classTag: 'dojoxGrid',
get: function(inRowIndex){
// summary: Default data getter.
// description:
// Provides data to display in a grid cell. Called in grid cell context.
// So this.cell.index is the column index.
// inRowIndex: Integer
// Row for which to provide data
// returns:
// Data to display for a given grid cell.
},
// settings
// rowCount: Integer
// Number of rows to display.
rowCount: 5,
// keepRows: Integer
// Number of rows to keep in the rendering cache.
keepRows: 75,
// rowsPerPage: Integer
// Number of rows to render at a time.
rowsPerPage: 25,
// autoWidth: Boolean
// If autoWidth is true, grid width is automatically set to fit the data.
autoWidth: false,
// autoHeight: Boolean
// If autoHeight is true, grid height is automatically set to fit the data.
autoHeight: false,
// autoRender: Boolean
// If autoRender is true, grid will render itself after initialization.
autoRender: true,
// defaultHeight: String
// default height of the grid, measured in any valid css unit.
defaultHeight: '15em',
// structure: Object|String
// View layout defintion. Can be set to a layout object, or to the (string) name of a layout object.
structure: '',
// elasticView: Integer
// Override defaults and make the indexed grid view elastic, thus filling available horizontal space.
elasticView: -1,
// singleClickEdit: boolean
// Single-click starts editing. Default is double-click
singleClickEdit: false,
// Used to store the last two clicks, to ensure double-clicking occurs based on the intended row
_click: null,
// private
sortInfo: 0,
themeable: true,
// initialization
buildRendering: function(){
this.inherited(arguments);
// reset get from blank function (needed for markup parsing) to null, if not changed
if(this.get == dojox.VirtualGrid.prototype.get){
this.get = null;
}
if(!this.domNode.getAttribute('tabIndex')){
this.domNode.tabIndex = "0";
}
this.createScroller();
this.createLayout();
this.createViews();
this.createManagers();
dojox.grid.initTextSizePoll();
this.connect(dojox.grid, "textSizeChanged", "textSizeChanged");
dojox.grid.funnelEvents(this.domNode, this, 'doKeyEvent', dojox.grid.keyEvents);
this.connect(this, "onShow", "renderOnIdle");
},
postCreate: function(){
// replace stock styleChanged with one that triggers an update
this.styleChanged = this._styleChanged;
this.setStructure(this.structure);
this._click = [];
},
destroy: function(){
this.domNode.onReveal = null;
this.domNode.onSizeChange = null;
this.edit.destroy();
this.views.destroyViews();
this.inherited(arguments);
},
styleChanged: function(){
this.setStyledClass(this.domNode, '');
},
_styleChanged: function(){
this.styleChanged();
this.update();
},
textSizeChanged: function(){
setTimeout(dojo.hitch(this, "_textSizeChanged"), 1);
},
_textSizeChanged: function(){
if(this.domNode){
this.views.forEach(function(v){
v.content.update();
});
this.render();
}
},
sizeChange: function(){
dojox.grid.jobs.job(this.id + 'SizeChange', 50, dojo.hitch(this, "update"));
},
renderOnIdle: function() {
setTimeout(dojo.hitch(this, "render"), 1);
},
createManagers: function(){
// summary:
// create grid managers for various tasks including rows, focus, selection, editing
// row manager
this.rows = new dojox.grid.rows(this);
// focus manager
this.focus = new dojox.grid.focus(this);
// selection manager
this.selection = new dojox.grid.selection(this);
// edit manager
this.edit = new dojox.grid.edit(this);
},
createScroller: function(){
// summary: Creates a new virtual scroller
this.scroller = new dojox.grid.scroller.columns();
this.scroller._pageIdPrefix = this.id + '-';
this.scroller.renderRow = dojo.hitch(this, "renderRow");
this.scroller.removeRow = dojo.hitch(this, "rowRemoved");
},
createLayout: function(){
// summary: Creates a new Grid layout
this.layout = new dojox.grid.layout(this);
},
// views
createViews: function(){
this.views = new dojox.grid.views(this);
this.views.createView = dojo.hitch(this, "createView");
},
createView: function(inClass){
if(dojo.isAIR){
var obj = window;
var names = inClass.split('.');
for(var i=0;i 0){
}else if(this.domNode.clientHeight <= padBorder.h){
if(this.domNode.parentNode == document.body){
this.domNode.style.height = this.defaultHeight;
}else{
this.fitTo = "parent";
}
}
// if we are given dimensions, size the grid's domNode to those dimensions
if(this._sizeBox){
dojo.contentBox(this.domNode, this._sizeBox);
}else if(this.fitTo == "parent"){
var h = dojo._getContentBox(this.domNode.parentNode).h;
dojo.marginBox(this.domNode, { h: Math.max(0, h) });
}
var h = dojo._getContentBox(this.domNode).h;
if(h == 0 && !this.autoHeight){
// We need to hide the header, since the Grid is essentially hidden.
this.viewsHeaderNode.style.display = "none";
}else{
// Otherwise, show the header and give it an appropriate height.
this.viewsHeaderNode.style.display = "block";
}
// NOTE: it is essential that width be applied before height
// Header height can only be calculated properly after view widths have been set.
// This is because flex column width is naturally 0 in Firefox.
// Therefore prior to width sizing flex columns with spaces are maximally wrapped
// and calculated to be too tall.
this.adaptWidth();
this.adaptHeight();
// default row height (FIXME: use running average(?), remove magic #)
this.scroller.defaultRowHeight = this.rows.getDefaultHeightPx() + 1;
this.postresize();
},
adaptWidth: function() {
// private: sets width and position for views and update grid width if necessary
var
w = this.autoWidth ? 0 : this.domNode.clientWidth || (this.domNode.offsetWidth - this._getPadBorder().w);
var vw = this.views.arrange(1, w);
this.views.onEach("adaptWidth");
if (this.autoWidth)
this.domNode.style.width = vw + "px";
},
adaptHeight: function(){
// private: measures and normalizes header height, then sets view heights, and then updates scroller
var vns = this.viewsHeaderNode.style, t = vns.display == "none" ? 0 : this.views.measureHeader();
vns.height = t + 'px';
// header heights are reset during measuring so must be normalized after measuring.
this.views.normalizeHeaderNodeHeight();
// content extent
var h = (this.autoHeight ? -1 : Math.max(this.domNode.clientHeight - t, 0) || 0);
this.views.onEach('setSize', [0, h]);
this.views.onEach('adaptHeight');
this.scroller.windowHeight = h;
},
// render
render: function(){
// summary:
// Render the grid, headers, and views. Edit and scrolling states are reset. To retain edit and
// scrolling states, see Update.
if(!this.domNode){return;}
if(!this.hasLayout()) {
this.scroller.init(0, this.keepRows, this.rowsPerPage);
return;
}
//
this.update = this.defaultUpdate;
this.scroller.init(this.rowCount, this.keepRows, this.rowsPerPage);
this.prerender();
this.setScrollTop(0);
this.postrender();
},
prerender: function(){
// if autoHeight, make sure scroller knows not to virtualize; everything must be rendered.
this.keepRows = this.autoHeight ? 0 : this.constructor.prototype.keepRows;
this.scroller.setKeepInfo(this.keepRows);
this.views.render();
this._resize();
},
postrender: function(){
this.postresize();
this.focus.initFocusView();
// make rows unselectable
dojo.setSelectable(this.domNode, false);
},
postresize: function(){
// views are position absolute, so they do not inflate the parent
if(this.autoHeight){
this.viewsNode.style.height = this.views.measureContent() + 'px';
}
},
renderRow: function(inRowIndex, inNodes){
// summary: private, used internally to render rows
this.views.renderRow(inRowIndex, inNodes);
},
rowRemoved: function(inRowIndex){
// summary: private, used internally to remove rows
this.views.rowRemoved(inRowIndex);
},
invalidated: null,
updating: false,
beginUpdate: function(){
// summary:
// Use to make multiple changes to rows while queueing row updating.
if(this.invalidated == null){
this.invalidated = {rows: [], count: 1, all: false, rowCount: undefined};
}else{
this.invalidated.count++;
}
this.updating = true;
},
endUpdate: function(){
// summary:
// Use after calling beginUpdate to render any changes made to rows.
var i = this.invalidated;
if(--i.count === 0){
this.updating = false;
if(i.rows.length > 0){
for(var r in i.rows){
this.updateRow(Number(r));
}
this.invalidated.rows = [];
}
if(i.rowCount != undefined){
this.updateRowCount(i.rowCount);
i.rowCount = undefined;
}
if(i.all){
this.update();
i.all = false;
}
}
},
// update
defaultUpdate: function(){
// note: initial update calls render and subsequently this function.
if(!this.domNode){return;}
if(this.updating){
this.invalidated.all = true;
return;
}
//this.edit.saveState(inRowIndex);
this.prerender();
this.scroller.invalidateNodes();
this.setScrollTop(this.scrollTop);
this.postrender();
//this.edit.restoreState(inRowIndex);";s:7:"summary";s:0:"";}s:24:"dojox.VirtualGrid.update";a:5:{s:9:"prototype";s:17:"dojox.VirtualGrid";s:8:"instance";s:17:"dojox.VirtualGrid";s:4:"type";s:8:"Function";s:6:"source";s:16:" this.render();";s:7:"summary";s:53:"Update the grid, retaining edit and scrolling states.";}s:27:"dojox.VirtualGrid.updateRow";a:5:{s:9:"prototype";s:17:"dojox.VirtualGrid";s:4:"type";s:8:"Function";s:10:"parameters";a:1:{s:10:"inRowIndex";a:2:{s:4:"type";s:7:"Integer";s:7:"summary";s:26:"Index of the row to render";}}s:6:"source";s:228:" inRowIndex = Number(inRowIndex);
if(this.updating){
this.invalidated.rows[inRowIndex]=true;
}else{
this.views.updateRow(inRowIndex, this.rows.getHeight(inRowIndex));
this.scroller.rowHeightChanged(inRowIndex);
}";s:7:"summary";s:20:"Render a single row.";}s:32:"dojox.VirtualGrid.updateRowCount";a:5:{s:9:"prototype";s:17:"dojox.VirtualGrid";s:4:"type";s:8:"Function";s:10:"parameters";a:1:{s:10:"inRowCount";a:2:{s:4:"type";s:3:"int";s:7:"summary";s:27:"Number of rows in the grid.";}}s:6:"source";s:249:" if(this.updating){
this.invalidated.rowCount = inRowCount;
}else{
this.rowCount = inRowCount;
if(this.layout.cells.length){
this.scroller.updateRowCount(inRowCount);
this.setScrollTop(this.scrollTop);
}
this._resize();
}";s:7:"summary";s:26:"Change the number of rows.";}s:33:"dojox.VirtualGrid.updateRowStyles";a:5:{s:9:"prototype";s:17:"dojox.VirtualGrid";s:4:"type";s:8:"Function";s:10:"parameters";a:1:{s:10:"inRowIndex";a:1:{s:4:"type";s:0:"";}}s:6:"source";s:41:" this.views.updateRowStyles(inRowIndex);";s:7:"summary";s:57:"Update the styles for a row after it's state has changed.";}s:34:"dojox.VirtualGrid.rowHeightChanged";a:5:{s:9:"prototype";s:17:"dojox.VirtualGrid";s:4:"type";s:8:"Function";s:10:"parameters";a:1:{s:10:"inRowIndex";a:2:{s:4:"type";s:7:"Integer";s:7:"summary";s:40:"index of the row that has changed height";}}s:6:"source";s:86:" this.views.renormalizeRow(inRowIndex);
this.scroller.rowHeightChanged(inRowIndex);";s:7:"summary";s:193:"Update grid when the height of a row has changed. Row height is handled automatically as rows
are rendered. Use this function only to update a row's height outside the normal rendering process.";}s:28:"dojox.VirtualGrid.fastScroll";a:3:{s:9:"prototype";s:17:"dojox.VirtualGrid";s:4:"type";s:7:"Boolean";s:7:"summary";s:144:"flag modifies vertical scrolling behavior. Defaults to true but set to false for slower
scroll performance but more immediate scrolling feedback";}s:29:"dojox.VirtualGrid.delayScroll";a:3:{s:9:"prototype";s:17:"dojox.VirtualGrid";s:8:"instance";s:17:"dojox.VirtualGrid";s:7:"summary";s:0:"";}s:39:"dojox.VirtualGrid.scrollRedrawThreshold";a:3:{s:9:"prototype";s:17:"dojox.VirtualGrid";s:4:"type";s:3:"int";s:7:"summary";s:71:"pixel distance a user must scroll vertically to trigger grid scrolling.";}s:26:"dojox.VirtualGrid.scrollTo";a:5:{s:9:"prototype";s:17:"dojox.VirtualGrid";s:4:"type";s:8:"Function";s:10:"parameters";a:1:{s:5:"inTop";a:2:{s:4:"type";s:7:"Integer";s:7:"summary";s:39:"vertical position of the grid in pixels";}}s:6:"source";s:429:" if(!this.fastScroll){
this.setScrollTop(inTop);
return;
}
var delta = Math.abs(this.lastScrollTop - inTop);
this.lastScrollTop = inTop;
if(delta > this.scrollRedrawThreshold || this.delayScroll){
this.delayScroll = true;
this.scrollTop = inTop;
this.views.setScrollTop(inTop);
dojox.grid.jobs.job('dojoxGrid-scroll', 200, dojo.hitch(this, "finishScrollJob"));
}else{
this.setScrollTop(inTop);
}";s:7:"summary";s:52:"Vertically scroll the grid to a given pixel position";}s:33:"dojox.VirtualGrid.finishScrollJob";a:4:{s:9:"prototype";s:17:"dojox.VirtualGrid";s:4:"type";s:8:"Function";s:6:"source";s:64:" this.delayScroll = false;
this.setScrollTop(this.scrollTop);";s:7:"summary";s:0:"";}s:30:"dojox.VirtualGrid.setScrollTop";a:5:{s:9:"prototype";s:17:"dojox.VirtualGrid";s:4:"type";s:8:"Function";s:10:"parameters";a:1:{s:5:"inTop";a:1:{s:4:"type";s:0:"";}}s:6:"source";s:90:" this.scrollTop = this.views.setScrollTop(inTop);
this.scroller.scroll(this.scrollTop);";s:7:"summary";s:0:"";}s:29:"dojox.VirtualGrid.scrollToRow";a:5:{s:9:"prototype";s:17:"dojox.VirtualGrid";s:4:"type";s:8:"Function";s:10:"parameters";a:1:{s:10:"inRowIndex";a:2:{s:4:"type";s:7:"Integer";s:7:"summary";s:14:"grid row index";}}s:6:"source";s:65:" this.setScrollTop(this.scroller.findScrollTop(inRowIndex) + 1);";s:7:"summary";s:34:"Scroll the grid to a specific row.";}s:30:"dojox.VirtualGrid.styleRowNode";a:5:{s:9:"prototype";s:17:"dojox.VirtualGrid";s:4:"type";s:8:"Function";s:10:"parameters";a:2:{s:10:"inRowIndex";a:1:{s:4:"type";s:0:"";}s:9:"inRowNode";a:1:{s:4:"type";s:0:"";}}s:6:"source";s:70:" if(inRowNode){
this.rows.styleRowNode(inRowIndex, inRowNode);
}";s:7:"summary";s:0:"";}s:25:"dojox.VirtualGrid.getCell";a:6:{s:9:"prototype";s:17:"dojox.VirtualGrid";s:4:"type";s:8:"Function";s:10:"parameters";a:1:{s:7:"inIndex";a:2:{s:4:"type";s:7:"Integer";s:7:"summary";s:37:"Grid column index of cell to retrieve";}}s:6:"source";s:36:" return this.layout.cells[inIndex];";s:7:"summary";s:50:"Retrieves the cell object for a given grid column.";s:14:"return_summary";s:11:"a grid cell";}s:30:"dojox.VirtualGrid.setCellWidth";a:5:{s:9:"prototype";s:17:"dojox.VirtualGrid";s:4:"type";s:8:"Function";s:10:"parameters";a:2:{s:7:"inIndex";a:1:{s:4:"type";s:0:"";}s:11:"inUnitWidth";a:1:{s:4:"type";s:0:"";}}s:6:"source";s:48:" this.getCell(inIndex).unitWidth = inUnitWidth;";s:7:"summary";s:0:"";}s:29:"dojox.VirtualGrid.getCellName";a:6:{s:9:"prototype";s:17:"dojox.VirtualGrid";s:4:"type";s:8:"Function";s:10:"parameters";a:1:{s:6:"inCell";a:1:{s:4:"type";s:0:"";}}s:6:"source";s:42:" return "Cell " + inCell.index; // String";s:7:"summary";s:38:"Returns the cell name of a passed cell";s:7:"returns";s:6:"String";}s:25:"dojox.VirtualGrid.canSort";a:6:{s:9:"prototype";s:17:"dojox.VirtualGrid";s:4:"type";s:8:"Function";s:10:"parameters";a:1:{s:10:"inSortInfo";a:2:{s:4:"type";s:7:"Integer";s:7:"summary";s:125:"Sort information, 1-based index of column on which to sort, positive for an ascending sort
and negative for a descending sort";}}s:6:"source";s:318:" // summary:
// Determines if the grid can be sorted
// inSortInfo: Integer
// Sort information, 1-based index of column on which to sort, positive for an ascending sort
// and negative for a descending sort
// returns: Boolean
// True if grid can be sorted on the given column in the given direction";s:7:"summary";s:36:"Determines if the grid can be sorted";s:14:"return_summary";s:77:"Boolean
True if grid can be sorted on the given column in the given direction";}s:22:"dojox.VirtualGrid.sort";a:4:{s:9:"prototype";s:17:"dojox.VirtualGrid";s:4:"type";s:8:"Function";s:6:"source";s:0:"";s:7:"summary";s:0:"";}s:28:"dojox.VirtualGrid.getSortAsc";a:6:{s:9:"prototype";s:17:"dojox.VirtualGrid";s:4:"type";s:8:"Function";s:10:"parameters";a:1:{s:10:"inSortInfo";a:1:{s:4:"type";s:0:"";}}s:6:"source";s:113:" inSortInfo = inSortInfo == undefined ? this.sortInfo : inSortInfo;
return Boolean(inSortInfo > 0); // Boolean";s:7:"summary";s:57:"Returns true if grid is sorted in an ascending direction.";s:7:"returns";s:7:"Boolean";}s:30:"dojox.VirtualGrid.getSortIndex";a:6:{s:9:"prototype";s:17:"dojox.VirtualGrid";s:4:"type";s:8:"Function";s:10:"parameters";a:1:{s:10:"inSortInfo";a:1:{s:4:"type";s:0:"";}}s:6:"source";s:114:" inSortInfo = inSortInfo == undefined ? this.sortInfo : inSortInfo;
return Math.abs(inSortInfo) - 1; // Integer";s:7:"summary";s:59:"Returns the index of the column on which the grid is sorted";s:7:"returns";s:7:"Integer";}s:30:"dojox.VirtualGrid.setSortIndex";a:5:{s:9:"prototype";s:17:"dojox.VirtualGrid";s:4:"type";s:8:"Function";s:10:"parameters";a:2:{s:7:"inIndex";a:2:{s:4:"type";s:7:"Integer";s:7:"summary";s:30:"Column index on which to sort.";}s:5:"inAsc";a:2:{s:4:"type";s:7:"Boolean";s:7:"summary";s:72:"If true, sort the grid in ascending order, otherwise in descending order";}}s:6:"source";s:172:" var si = inIndex +1;
if(inAsc != undefined){
si *= (inAsc ? 1 : -1);
} else if(this.getSortIndex() == inIndex){
si = -this.sortInfo;
}
this.setSortInfo(si);";s:7:"summary";s:50:"Sort the grid on a column in a specified direction";}s:29:"dojox.VirtualGrid.setSortInfo";a:5:{s:9:"prototype";s:17:"dojox.VirtualGrid";s:4:"type";s:8:"Function";s:10:"parameters";a:1:{s:10:"inSortInfo";a:1:{s:4:"type";s:0:"";}}s:6:"source";s:100:" if(this.canSort(inSortInfo)){
this.sortInfo = inSortInfo;
this.sort();
this.update();
}";s:7:"summary";s:0:"";}s:28:"dojox.VirtualGrid.doKeyEvent";a:5:{s:9:"prototype";s:17:"dojox.VirtualGrid";s:4:"type";s:8:"Function";s:10:"parameters";a:1:{s:1:"e";a:1:{s:4:"type";s:0:"";}}s:6:"source";s:51:" e.dispatch = 'do' + e.type;
this.onKeyEvent(e);";s:7:"summary";s:0:"";}s:27:"dojox.VirtualGrid._dispatch";a:6:{s:9:"prototype";s:17:"dojox.VirtualGrid";s:4:"type";s:8:"Function";s:10:"parameters";a:2:{s:1:"m";a:1:{s:4:"type";s:0:"";}s:1:"e";a:1:{s:4:"type";s:0:"";}}s:6:"source";s:42:" if(m in this){
return this[m](e);
}";s:7:"private";b:1;s:7:"summary";s:0:"";}s:34:"dojox.VirtualGrid.dispatchKeyEvent";a:5:{s:9:"prototype";s:17:"dojox.VirtualGrid";s:4:"type";s:8:"Function";s:10:"parameters";a:1:{s:1:"e";a:1:{s:4:"type";s:0:"";}}s:6:"source";s:32:" this._dispatch(e.dispatch, e);";s:7:"summary";s:0:"";}s:38:"dojox.VirtualGrid.dispatchContentEvent";a:5:{s:9:"prototype";s:17:"dojox.VirtualGrid";s:4:"type";s:8:"Function";s:10:"parameters";a:1:{s:1:"e";a:1:{s:4:"type";s:0:"";}}s:6:"source";s:102:" this.edit.dispatchEvent(e) || e.sourceView.dispatchContentEvent(e) || this._dispatch(e.dispatch, e);";s:7:"summary";s:0:"";}s:37:"dojox.VirtualGrid.dispatchHeaderEvent";a:5:{s:9:"prototype";s:17:"dojox.VirtualGrid";s:4:"type";s:8:"Function";s:10:"parameters";a:1:{s:1:"e";a:1:{s:4:"type";s:0:"";}}s:6:"source";s:80:" e.sourceView.dispatchHeaderEvent(e) || this._dispatch('doheader' + e.type, e);";s:7:"summary";s:0:"";}s:27:"dojox.VirtualGrid.dokeydown";a:5:{s:9:"prototype";s:17:"dojox.VirtualGrid";s:4:"type";s:8:"Function";s:10:"parameters";a:1:{s:1:"e";a:1:{s:4:"type";s:0:"";}}s:6:"source";s:20:" this.onKeyDown(e);";s:7:"summary";s:0:"";}s:25:"dojox.VirtualGrid.doclick";a:5:{s:9:"prototype";s:17:"dojox.VirtualGrid";s:4:"type";s:8:"Function";s:10:"parameters";a:1:{s:1:"e";a:1:{s:4:"type";s:0:"";}}s:6:"source";s:77:" if(e.cellNode){
this.onCellClick(e);
}else{
this.onRowClick(e);
}";s:7:"summary";s:0:"";}s:28:"dojox.VirtualGrid.dodblclick";a:5:{s:9:"prototype";s:17:"dojox.VirtualGrid";s:4:"type";s:8:"Function";s:10:"parameters";a:1:{s:1:"e";a:1:{s:4:"type";s:0:"";}}s:6:"source";s:83:" if(e.cellNode){
this.onCellDblClick(e);
}else{
this.onRowDblClick(e);
}";s:7:"summary";s:0:"";}s:31:"dojox.VirtualGrid.docontextmenu";a:5:{s:9:"prototype";s:17:"dojox.VirtualGrid";s:4:"type";s:8:"Function";s:10:"parameters";a:1:{s:1:"e";a:1:{s:4:"type";s:0:"";}}s:6:"source";s:89:" if(e.cellNode){
this.onCellContextMenu(e);
}else{
this.onRowContextMenu(e);
}";s:7:"summary";s:0:"";}s:31:"dojox.VirtualGrid.doheaderclick";a:5:{s:9:"prototype";s:17:"dojox.VirtualGrid";s:4:"type";s:8:"Function";s:10:"parameters";a:1:{s:1:"e";a:1:{s:4:"type";s:0:"";}}s:6:"source";s:86:" if(e.cellNode){
this.onHeaderCellClick(e);
}else{
this.onHeaderClick(e);
}";s:7:"summary";s:0:"";}s:34:"dojox.VirtualGrid.doheaderdblclick";a:5:{s:9:"prototype";s:17:"dojox.VirtualGrid";s:4:"type";s:8:"Function";s:10:"parameters";a:1:{s:1:"e";a:1:{s:4:"type";s:0:"";}}s:6:"source";s:92:" if(e.cellNode){
this.onHeaderCellDblClick(e);
}else{
this.onHeaderDblClick(e);
}";s:7:"summary";s:0:"";}s:37:"dojox.VirtualGrid.doheadercontextmenu";a:5:{s:9:"prototype";s:17:"dojox.VirtualGrid";s:4:"type";s:8:"Function";s:10:"parameters";a:1:{s:1:"e";a:1:{s:4:"type";s:0:"";}}s:6:"source";s:98:" if(e.cellNode){
this.onHeaderCellContextMenu(e);
}else{
this.onHeaderContextMenu(e);
}";s:7:"summary";s:0:"";}s:29:"dojox.VirtualGrid.doStartEdit";a:5:{s:9:"prototype";s:17:"dojox.VirtualGrid";s:4:"type";s:8:"Function";s:10:"parameters";a:2:{s:6:"inCell";a:1:{s:4:"type";s:0:"";}s:10:"inRowIndex";a:1:{s:4:"type";s:0:"";}}s:6:"source";s:39:" this.onStartEdit(inCell, inRowIndex);";s:7:"summary";s:0:"";}s:33:"dojox.VirtualGrid.doApplyCellEdit";a:5:{s:9:"prototype";s:17:"dojox.VirtualGrid";s:4:"type";s:8:"Function";s:10:"parameters";a:3:{s:7:"inValue";a:1:{s:4:"type";s:0:"";}s:10:"inRowIndex";a:1:{s:4:"type";s:0:"";}s:12:"inFieldIndex";a:1:{s:4:"type";s:0:"";}}s:6:"source";s:58:" this.onApplyCellEdit(inValue, inRowIndex, inFieldIndex);";s:7:"summary";s:0:"";}s:30:"dojox.VirtualGrid.doCancelEdit";a:5:{s:9:"prototype";s:17:"dojox.VirtualGrid";s:4:"type";s:8:"Function";s:10:"parameters";a:1:{s:10:"inRowIndex";a:1:{s:4:"type";s:0:"";}}s:6:"source";s:32:" this.onCancelEdit(inRowIndex);";s:7:"summary";s:0:"";}s:29:"dojox.VirtualGrid.doApplyEdit";a:5:{s:9:"prototype";s:17:"dojox.VirtualGrid";s:4:"type";s:8:"Function";s:10:"parameters";a:1:{s:10:"inRowIndex";a:1:{s:4:"type";s:0:"";}}s:6:"source";s:31:" this.onApplyEdit(inRowIndex);";s:7:"summary";s:0:"";}s:24:"dojox.VirtualGrid.addRow";a:4:{s:9:"prototype";s:17:"dojox.VirtualGrid";s:4:"type";s:8:"Function";s:6:"source";s:39:" this.updateRowCount(this.rowCount+1);";s:7:"summary";s:22:"Add a row to the grid.";}s:36:"dojox.VirtualGrid.removeSelectedRows";a:4:{s:9:"prototype";s:17:"dojox.VirtualGrid";s:4:"type";s:8:"Function";s:6:"source";s:114:" this.updateRowCount(Math.max(0, this.rowCount - this.selection.getSelected().length));
this.selection.clear();";s:7:"summary";s:39:"Remove the selected rows from the grid.";}s:34:"dojox.VirtualGrid.domNode.tabIndex";a:2:{s:8:"instance";s:17:"dojox.VirtualGrid";s:7:"summary";s:0:"";}s:34:"dojox.VirtualGrid.domNode.onReveal";a:2:{s:8:"instance";s:17:"dojox.VirtualGrid";s:7:"summary";s:0:"";}s:38:"dojox.VirtualGrid.domNode.onSizeChange";a:2:{s:8:"instance";s:17:"dojox.VirtualGrid";s:7:"summary";s:0:"";}s:22:"dojox.VirtualGrid.rows";a:2:{s:8:"instance";s:17:"dojox.VirtualGrid";s:7:"summary";s:0:"";}s:23:"dojox.VirtualGrid.focus";a:2:{s:8:"instance";s:17:"dojox.VirtualGrid";s:7:"summary";s:0:"";}s:27:"dojox.VirtualGrid.selection";a:2:{s:8:"instance";s:17:"dojox.VirtualGrid";s:7:"summary";s:0:"";}s:22:"dojox.VirtualGrid.edit";a:2:{s:8:"instance";s:17:"dojox.VirtualGrid";s:7:"summary";s:0:"";}s:26:"dojox.VirtualGrid.scroller";a:2:{s:8:"instance";s:17:"dojox.VirtualGrid";s:7:"summary";s:0:"";}s:40:"dojox.VirtualGrid.scroller._pageIdPrefix";a:3:{s:8:"instance";s:17:"dojox.VirtualGrid";s:7:"private";b:1;s:7:"summary";s:0:"";}s:36:"dojox.VirtualGrid.scroller.renderRow";a:2:{s:8:"instance";s:17:"dojox.VirtualGrid";s:7:"summary";s:0:"";}s:36:"dojox.VirtualGrid.scroller.removeRow";a:2:{s:8:"instance";s:17:"dojox.VirtualGrid";s:7:"summary";s:0:"";}s:24:"dojox.VirtualGrid.layout";a:2:{s:8:"instance";s:17:"dojox.VirtualGrid";s:7:"summary";s:0:"";}s:23:"dojox.VirtualGrid.views";a:2:{s:8:"instance";s:17:"dojox.VirtualGrid";s:7:"summary";s:0:"";}s:34:"dojox.VirtualGrid.views.createView";a:2:{s:8:"instance";s:17:"dojox.VirtualGrid";s:7:"summary";s:0:"";}s:26:"dojox.VirtualGrid._sizeBox";a:3:{s:8:"instance";s:17:"dojox.VirtualGrid";s:7:"private";b:1;s:7:"summary";s:0:"";}s:28:"dojox.VirtualGrid._padBorder";a:3:{s:8:"instance";s:17:"dojox.VirtualGrid";s:7:"private";b:1;s:7:"summary";s:0:"";}s:38:"dojox.VirtualGrid.domNode.style.height";a:2:{s:8:"instance";s:17:"dojox.VirtualGrid";s:7:"summary";s:0:"";}s:40:"dojox.VirtualGrid.viewsNode.style.height";a:2:{s:8:"instance";s:17:"dojox.VirtualGrid";s:7:"summary";s:0:"";}s:36:"dojox.VirtualGrid.domNode.parentNode";a:2:{s:8:"instance";s:17:"dojox.VirtualGrid";s:7:"summary";s:0:"";}s:23:"dojox.VirtualGrid.fitTo";a:2:{s:8:"instance";s:17:"dojox.VirtualGrid";s:7:"summary";s:0:"";}s:47:"dojox.VirtualGrid.viewsHeaderNode.style.display";a:2:{s:8:"instance";s:17:"dojox.VirtualGrid";s:7:"summary";s:0:"";}s:43:"dojox.VirtualGrid.scroller.defaultRowHeight";a:2:{s:8:"instance";s:17:"dojox.VirtualGrid";s:7:"summary";s:0:"";}s:37:"dojox.VirtualGrid.domNode.style.width";a:2:{s:8:"instance";s:17:"dojox.VirtualGrid";s:7:"summary";s:0:"";}s:39:"dojox.VirtualGrid.scroller.windowHeight";a:2:{s:8:"instance";s:17:"dojox.VirtualGrid";s:7:"summary";s:0:"";}s:34:"dojox.VirtualGrid.invalidated.rows";a:2:{s:8:"instance";s:17:"dojox.VirtualGrid";s:7:"summary";s:0:"";}s:33:"dojox.VirtualGrid.invalidated.all";a:2:{s:8:"instance";s:17:"dojox.VirtualGrid";s:7:"summary";s:0:"";}s:38:"dojox.VirtualGrid.invalidated.rowCount";a:2:{s:8:"instance";s:17:"dojox.VirtualGrid";s:7:"summary";s:0:"";}s:31:"dojox.VirtualGrid.lastScrollTop";a:2:{s:8:"instance";s:17:"dojox.VirtualGrid";s:7:"summary";s:0:"";}s:27:"dojox.VirtualGrid.scrollTop";a:2:{s:8:"instance";s:17:"dojox.VirtualGrid";s:7:"summary";s:0:"";}s:29:"dojox.grid.compat.VirtualGrid";a:2:{s:4:"type";s:6:"Object";s:7:"summary";s:0:"";}s:17:"dojox.grid.compat";a:2:{s:4:"type";s:6:"Object";s:7:"summary";s:0:"";}s:10:"dojox.grid";a:2:{s:4:"type";s:6:"Object";s:7:"summary";s:0:"";}s:5:"dojox";a:2:{s:4:"type";s:6:"Object";s:7:"summary";s:0:"";}}