Class YAHOO.ext.grid.AbstractColumnModel
This abstract class defines the ColumnModel interface and provides default implementations of the events required by the Grid.
Public Properties
This class has no public properties.
Public Methods
| |
AbstractColumnModel() |
AbstractColumnModel |
|
| |
addListener(String eventName, Function handler, [Object scope], [boolean override]) : void |
Observable |
| Appends an event handler to this element |
| |
delayedListener(String eventName, Function handler, [Object scope], [Number delay]) : Function |
Observable |
| Appends an event handler to this element that is delayed the specified number of milliseconds. |
| |
fireEvent(String eventName, Object... args) : void |
Observable |
| Fires the specified event with the passed parameters (minus the event name). |
| |
getColumnCount() : Number |
AbstractColumnModel |
| Interface method - Returns the number of columns. |
| |
getColumnHeader(Number col) : String |
AbstractColumnModel |
| Interface method - Returns the header for the specified column. |
| |
getColumnWidth(Number col) : Number |
AbstractColumnModel |
| Interface method - Returns the width for the specified column. |
| |
getRenderer(Number col) : Function |
AbstractColumnModel |
| Interface method - Returns the rendering (formatting) function defined for the column. |
| |
getSortType(Number col) : Function |
AbstractColumnModel |
| Interface method - Returns the sorting comparison function defined for the column (defaults to sortTypes.none). |
| |
getTotalWidth() : Number |
AbstractColumnModel |
| Interface method - Returns the total width of all columns. |
| |
isHidden(Number col) : Boolean |
AbstractColumnModel |
| Interface method - Returns true if the specified column is hidden. |
| |
isSortable(Number col) : Boolean |
AbstractColumnModel |
| Interface method - Returns true if the specified column is sortable. |
| |
purgeListeners() : void |
Observable |
| Removes all listeners for this object |
| |
removeListener(String eventName, Function handler, [Object scope]) : void |
Observable |
| Removes a listener |
Public Events
| |
headerchange : (ColumnModel this, Number columnIndex, Number newText) |
AbstractColumnModel |
| Fires when the text of a header changes |
| |
hiddenchange : (ColumnModel this, Number columnIndex, Number hidden) |
AbstractColumnModel |
| Fires when a column is hidden or "unhidden" |
| |
widthchange : (ColumnModel this, Number columnIndex, Number newWidth) |
AbstractColumnModel |
| Fires when the width of a column changes |
Constructor Details
AbstractColumnModel
public function AbstractColumnModel()
Method Details
addListener
public function addListener(String eventName, Function handler, [Object scope], [boolean override])
Appends an event handler to this element
Parameters:
eventName : StringThe type of event to listen for
handler : FunctionThe method the event invokes
scope : Object(optional) The scope (this object) for the handler
override : boolean(optional) If true, scope becomes the scope
Returns:
delayedListener
public function delayedListener(String eventName, Function handler, [Object scope], [Number delay])
Appends an event handler to this element that is delayed the specified number of milliseconds.
Parameters:
eventName : StringThe type of event to listen for
handler : FunctionThe method the event invokes
scope : Object(optional) The scope (this object) for the handler
delay : Number(optional) The number of milliseconds to delay
Returns:
fireEvent
public function fireEvent(String eventName, Object... args)
Fires the specified event with the passed parameters (minus the event name).
getColumnCount
public function getColumnCount()
Interface method - Returns the number of columns.
This method is defined by AbstractColumnModel.
getColumnHeader
public function getColumnHeader(Number col)
Interface method - Returns the header for the specified column.
Parameters:
col : NumberThe column index
Returns:
This method is defined by AbstractColumnModel.
getColumnWidth
public function getColumnWidth(Number col)
Interface method - Returns the width for the specified column.
Parameters:
col : NumberThe column index
Returns:
This method is defined by AbstractColumnModel.
getRenderer
public function getRenderer(Number col)
Interface method - Returns the rendering (formatting) function defined for the column.
Parameters:
col : NumberThe column index
Returns:
This method is defined by AbstractColumnModel.
getSortType
public function getSortType(Number col)
Interface method - Returns the sorting comparison function defined for the column (defaults to sortTypes.none).
Parameters:
col : NumberThe column index
Returns:
This method is defined by AbstractColumnModel.
getTotalWidth
public function getTotalWidth()
Interface method - Returns the total width of all columns.
This method is defined by AbstractColumnModel.
isHidden
public function isHidden(Number col)
Interface method - Returns true if the specified column is hidden.
Parameters:
col : NumberThe column index
Returns:
This method is defined by AbstractColumnModel.
isSortable
public function isSortable(Number col)
Interface method - Returns true if the specified column is sortable.
Parameters:
col : NumberThe column index
Returns:
This method is defined by AbstractColumnModel.
purgeListeners
public function purgeListeners()
Removes all listeners for this object
removeListener
public function removeListener(String eventName, Function handler, [Object scope])
Event Details
headerchange
public event headerchange
Fires when the text of a header changes
Subscribers will be called with the following parameters:
this : ColumnModelcolumnIndex : NumberThe column index
newText : NumberThe new header text
This event is defined by AbstractColumnModel.
hiddenchange
public event hiddenchange
Fires when a column is hidden or "unhidden"
Subscribers will be called with the following parameters:
This event is defined by AbstractColumnModel.
widthchange
public event widthchange
Fires when the width of a column changes
Subscribers will be called with the following parameters:
this : ColumnModelcolumnIndex : NumberThe column index
newWidth : NumberThe new width
This event is defined by AbstractColumnModel.