Print Friendly

Class YAHOO.ext.grid.AbstractDataModel

Package:YAHOO.ext.grid
Class:AbstractDataModel
Extends:Object
Subclasses:DefaultDataModel
Defined In:AbstractDataModel.js
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.


Public Properties

Property Defined By
  addListener : Object AbstractDataModel
Inherited from Observable
  delayedListener : Object AbstractDataModel
Inherited from Observable
  fireEvent : Object AbstractDataModel
Inherited from Observable
  on : Object AbstractDataModel
Inherited from Observable
  onCellUpdated : YAHOO.util.CustomEvent AbstractDataModel
Deprecated. Fires when a cell is updated - fireDirect sig: (this, rowIndex, columnIndex)
  onRowsDeleted : YAHOO.util.CustomEvent AbstractDataModel
Deprecated. Fires when rows are deleted - fireDirect sig: (this, firstRowIndex, lastRowIndex)
  onRowsInserted : YAHOO.util.CustomEvent AbstractDataModel
Deprecated. Fires when a rows are inserted - fireDirect sig: (this, firstRowIndex, lastRowIndex)
  onRowsSorted : YAHOO.util.CustomEvent AbstractDataModel
Deprecated. Fires when a sort has reordered the rows - fireDirect sig: (this, sortColumnIndex, sortDirection = 'ASC'...
  onRowsUpdated : YAHOO.util.CustomEvent AbstractDataModel
Deprecated. Fires when a rows are updated - fireDirect sig: (this, firstRowIndex, lastRowIndex)
  onTableDataChanged : YAHOO.util.CustomEvent AbstractDataModel
Deprecated. Fires when all data needs to be revalidated - fireDirect sig: (thisd)
  removeListener : Object AbstractDataModel
Inherited from Observable

Public Methods

Method Defined By
  AbstractDataModel() AbstractDataModel
  fireCellUpdated() : void AbstractDataModel
Notifies listeners that the value of the cell at [row, col] has been updated
  fireRowsDeleted() : void AbstractDataModel
Notifies listeners that rows in the range [firstRow, lastRow], inclusive, have been deleted
  fireRowsInserted() : void AbstractDataModel
Notifies listeners that rows in the range [firstRow, lastRow], inclusive, have been inserted
  fireRowsSorted() : void AbstractDataModel
Notifies listeners that rows have been sorted and any indexes may be invalid
  fireRowsUpdated() : void AbstractDataModel
Notifies listeners that rows in the range [firstRow, lastRow], inclusive, have been updated
  fireTableDataChanged() : void AbstractDataModel
Notifies listeners that all data for the grid may have changed - use as a last resort. This also wipes out all selec...
  getRowCount() : void AbstractDataModel
Empty interface method - Classes which extend AbstractDataModel should implement this method. See YAHOO.ext.DefaultDa...
  getRowId() : void AbstractDataModel
Empty interface method - Classes which extend AbstractDataModel should implement this method. See YAHOO.ext.DefaultDa...
  getSortState() : Object AbstractDataModel
Interface method to supply the view with info regarding the Grid's current sort state - if overridden, this should re...
  getTotalRowCount() : void AbstractDataModel
Empty interface method - Classes which extend AbstractDataModel should implement this method to support virtual row c...
  getValueAt() : void AbstractDataModel
Empty interface method - Classes which extend AbstractDataModel should implement this method. See YAHOO.ext.DefaultDa...
  setValueAt() : void AbstractDataModel
Empty interface method - Classes which extend AbstractDataModel should implement this method. See YAHOO.ext.DefaultDa...
  sort() : void AbstractDataModel
Empty interface method - Classes which extend AbstractDataModel should implement this method. See YAHOO.ext.DefaultDa...

Public Events

This class has no public events.

Property Details

addListener

public Object addListener
Inherited from Observable
This property is defined by AbstractDataModel.

delayedListener

public Object delayedListener
Inherited from Observable
This property is defined by AbstractDataModel.

fireEvent

public Object fireEvent
Inherited from Observable
This property is defined by AbstractDataModel.

on

public Object on
Inherited from Observable
This property is defined by AbstractDataModel.

onCellUpdated

public YAHOO.util.CustomEvent onCellUpdated
Deprecated. Fires when a cell is updated - fireDirect sig: (this, rowIndex, columnIndex)
This property is defined by AbstractDataModel.

onRowsDeleted

public YAHOO.util.CustomEvent onRowsDeleted
Deprecated. Fires when rows are deleted - fireDirect sig: (this, firstRowIndex, lastRowIndex)
This property is defined by AbstractDataModel.

onRowsInserted

public YAHOO.util.CustomEvent onRowsInserted
Deprecated. Fires when a rows are inserted - fireDirect sig: (this, firstRowIndex, lastRowIndex)
This property is defined by AbstractDataModel.

onRowsSorted

public YAHOO.util.CustomEvent onRowsSorted
Deprecated. Fires when a sort has reordered the rows - fireDirect sig: (this, sortColumnIndex, sortDirection = 'ASC' or 'DESC')
This property is defined by AbstractDataModel.

onRowsUpdated

public YAHOO.util.CustomEvent onRowsUpdated
Deprecated. Fires when a rows are updated - fireDirect sig: (this, firstRowIndex, lastRowIndex)
This property is defined by AbstractDataModel.

onTableDataChanged

public YAHOO.util.CustomEvent onTableDataChanged
Deprecated. Fires when all data needs to be revalidated - fireDirect sig: (thisd)
This property is defined by AbstractDataModel.

removeListener

public Object removeListener
Inherited from Observable
This property is defined by AbstractDataModel.

Constructor Details

AbstractDataModel

public function AbstractDataModel()
Parameters:
  • None.

Method Details

fireCellUpdated

public function fireCellUpdated()
Notifies listeners that the value of the cell at [row, col] has been updated
Parameters:
  • None.
Returns:
  • void
This method is defined by AbstractDataModel.

fireRowsDeleted

public function fireRowsDeleted()
Notifies listeners that rows in the range [firstRow, lastRow], inclusive, have been deleted
Parameters:
  • None.
Returns:
  • void
This method is defined by AbstractDataModel.

fireRowsInserted

public function fireRowsInserted()
Notifies listeners that rows in the range [firstRow, lastRow], inclusive, have been inserted
Parameters:
  • None.
Returns:
  • void
This method is defined by AbstractDataModel.

fireRowsSorted

public function fireRowsSorted()
Notifies listeners that rows have been sorted and any indexes may be invalid
Parameters:
  • None.
Returns:
  • void
This method is defined by AbstractDataModel.

fireRowsUpdated

public function fireRowsUpdated()
Notifies listeners that rows in the range [firstRow, lastRow], inclusive, have been updated
Parameters:
  • None.
Returns:
  • void
This method is defined by AbstractDataModel.

fireTableDataChanged

public function fireTableDataChanged()
Notifies listeners that all data for the grid may have changed - use as a last resort. This also wipes out all selections a user might have made.
Parameters:
  • None.
Returns:
  • void
This method is defined by AbstractDataModel.

getRowCount

public function getRowCount()
Empty interface method - Classes which extend AbstractDataModel should implement this method. See YAHOO.ext.DefaultDataModel for an example implementation.
Parameters:
  • None.
Returns:
  • void
This method is defined by AbstractDataModel.

getRowId

public function getRowId()
Empty interface method - Classes which extend AbstractDataModel should implement this method. See YAHOO.ext.DefaultDataModel for an example implementation.
Parameters:
  • None.
Returns:
  • void
This method is defined by AbstractDataModel.

getSortState

public function 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 {column: this.sortColumn, direction: this.sortDir}.
Parameters:
  • None.
Returns:
  • Object
This method is defined by AbstractDataModel.

getTotalRowCount

public function getTotalRowCount()
Empty interface method - Classes which extend AbstractDataModel should implement this method to support virtual row counts.
Parameters:
  • None.
Returns:
  • void
This method is defined by AbstractDataModel.

getValueAt

public function getValueAt()
Empty interface method - Classes which extend AbstractDataModel should implement this method. See YAHOO.ext.DefaultDataModel for an example implementation.
Parameters:
  • None.
Returns:
  • void
This method is defined by AbstractDataModel.

setValueAt

public function setValueAt()
Empty interface method - Classes which extend AbstractDataModel should implement this method. See YAHOO.ext.DefaultDataModel for an example implementation.
Parameters:
  • None.
Returns:
  • void
This method is defined by AbstractDataModel.

sort

public function sort()
Empty interface method - Classes which extend AbstractDataModel should implement this method. See YAHOO.ext.DefaultDataModel for an example implementation.
Parameters:
  • None.
Returns:
  • void
This method is defined by AbstractDataModel.

Copyright © 2006 Jack Slocum. All rights reserved.