This abstract class defines the ColumnModel interface and provides default implementations of the events required by the Grid.
This class has no public properties.
|
AbstractColumnModel() |
AbstractColumnModel |
|
|
addListener(String eventName , Function handler , [Object scope ], [boolean override ]) : void |
Observable |
Appends an event handler to this component |
|
bufferedListener(String eventName , Function handler , [Object scope ], [Number millis ]) : Function |
Observable |
Appends an event handler to this component that is buffered. If the event is triggered more than once
in the specifie... |
|
delayedListener(String eventName , Function handler , [Object scope ], [Number delay ]) : Function |
Observable |
Appends an event handler to this component that is delayed the specified number of milliseconds. This
is useful for e... |
|
fireEvent(String eventName , Object... args ) : Boolean |
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. |
|
on(String eventName , Function handler , [Object scope ], [boolean override ]) : void |
Observable |
Appends an event handler to this element (shorthand for addListener) |
|
purgeListeners() : void |
Observable |
Removes all listeners for this object |
|
removeListener(String eventName , Function handler , [Object scope ]) : void |
Observable |
Removes a listener |
addListener
public function addListener(String eventName
, Function handler
, [Object scope
], [boolean override
])
Appends an event handler to this component
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:
bufferedListener
public function bufferedListener(String eventName
, Function handler
, [Object scope
], [Number millis
])
Appends an event handler to this component that is buffered. If the event is triggered more than once
in the specified time-frame, only the last one actually fires.
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
millis
: Number(optional) The number of milliseconds to buffer (defaults to 250)
Returns:
delayedListener
public function delayedListener(String eventName
, Function handler
, [Object scope
], [Number delay
])
Appends an event handler to this component that is delayed the specified number of milliseconds. This
is useful for events that modify the DOM and need to wait for the browser to catch up.
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 (defaults to 1 millisecond)
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.
on
public function on(String eventName
, Function handler
, [Object scope
], [boolean override
])
Appends an event handler to this element (shorthand for addListener)
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:
purgeListeners
public function purgeListeners()
Removes all listeners for this object
removeListener
public function removeListener(String eventName
, Function handler
, [Object scope
])