Class YAHOO.ext.grid.AbstractDataModel

Object
   |
   +--YAHOO.ext.grid.AbstractDataModel
Direct Known Subclasses:
YAHOO.ext.grid.DefaultDataModel

class YAHOO.ext.grid.AbstractDataModel


This abstract class provides default implementations of the events required by the Grid. It takes care of the creating the CustomEvents and provides some convenient methods for firing the events.


Defined in AbstractDataModel.js


Field Summary
 Object addListener
  
 Object events
  
 Object fireEvent
  
 YAHOO.util.CustomEvent onCellUpdated
  Fires when a cell is updated - fireDirect sig: (this, rowIndex, columnIndex)
 YAHOO.util.CustomEvent onRowsDeleted
  Fires when rows are deleted - fireDirect sig: (this, firstRowIndex, lastRowIndex)
 YAHOO.util.CustomEvent onRowsInserted
  Fires when a rows are inserted - fireDirect sig: (this, firstRowIndex, lastRowIndex)
 YAHOO.util.CustomEvent onRowsSorted
  Fires when a sort has reordered the rows - fireDirect sig: (this, sortColumnIndex, sortDirection = 'ASC' or 'DESC')
 YAHOO.util.CustomEvent onRowsUpdated
  Fires when a rows are updated - fireDirect sig: (this, firstRowIndex, lastRowIndex)
 YAHOO.util.CustomEvent onTableDataChanged
  Fires when all data needs to be revalidated - fireDirect sig: (thisd)
 Object removeListener
  
 
Constructor Summary
YAHOO.ext.grid.AbstractDataModel ()
  
 
Method Summary * Parameter types in italic indicate optional parameters
 void fireCellUpdated(row, col)
   Notifies listeners that the value of the cell at [row, col] has been updated
 void fireRowsDeleted(firstRow, lastRow)
   Notifies listeners that rows in the range [firstRow, lastRow], inclusive, have been deleted
 void fireRowsInserted(firstRow, lastRow)
   Notifies listeners that rows in the range [firstRow, lastRow], inclusive, have been inserted
 void fireRowsSorted(sortColumnIndex, sortDir, noRefresh)
   Notifies listeners that rows have been sorted and any indexes may be invalid
 void fireRowsUpdated(firstRow, lastRow)
   Notifies listeners that rows in the range [firstRow, lastRow], inclusive, have been updated
 void fireTableDataChanged()
   Notifies listeners that all data for the grid may have changed - use as a last resort.
 void getRowCount()
   Empty interface method - Classes which extend AbstractDataModel should implement this method.
 void getRowId(rowIndex)
   Empty interface method - Classes which extend AbstractDataModel should implement this method.
 Object getSortState()
   Interface method to supply the view with info regarding the Grid's current sort state - if overridden, this should return an object like this {YAHOO.ext.grid.AbstractDataModel.prototype.column = this;.sortColumn, YAHOO.ext.grid.AbstractDataModel.prototype.direction = this;.sortDir}.
 Object getTotalRowCount()
   Empty interface method - Classes which extend AbstractDataModel should implement this method to support virtual row counts.
 void getValueAt(rowIndex, colIndex)
   Empty interface method - Classes which extend AbstractDataModel should implement this method.
 Object isPaged()
  
 void setValueAt(value, rowIndex, colIndex)
   Empty interface method - Classes which extend AbstractDataModel should implement this method.
 void sort(columnModel, columnIndex, direction, suppressEvent)
   Empty interface method - Classes which extend AbstractDataModel should implement this method.

Field Detail

addListener

Object addListener

events

Object events

fireEvent

Object fireEvent

onCellUpdated

YAHOO.util.CustomEvent onCellUpdated

onRowsDeleted

YAHOO.util.CustomEvent onRowsDeleted

onRowsInserted

YAHOO.util.CustomEvent onRowsInserted

onRowsSorted

YAHOO.util.CustomEvent onRowsSorted

onRowsUpdated

YAHOO.util.CustomEvent onRowsUpdated

onTableDataChanged

YAHOO.util.CustomEvent onTableDataChanged

removeListener

Object removeListener

Constructor Detail

YAHOO.ext.grid.AbstractDataModel

YAHOO.ext.grid.AbstractDataModel()

Method Detail

fireCellUpdated

void fireCellUpdated(row, col)

fireRowsDeleted

void fireRowsDeleted(firstRow, lastRow)

fireRowsInserted

void fireRowsInserted(firstRow, lastRow)

fireRowsSorted

void fireRowsSorted(sortColumnIndex, sortDir, noRefresh)

fireRowsUpdated

void fireRowsUpdated(firstRow, lastRow)

fireTableDataChanged

void fireTableDataChanged()

getRowCount

void getRowCount()

getRowId

void getRowId(rowIndex)

getSortState

Object getSortState()

getTotalRowCount

Object getTotalRowCount()

getValueAt

void getValueAt(rowIndex, colIndex)

isPaged

Object isPaged()

setValueAt

void setValueAt(value, rowIndex, colIndex)

sort

void sort(columnModel, columnIndex, direction, suppressEvent)


Documentation generated by JSDoc on Sat Oct 14 06:07:10 2006