Interface
caplin.grid

GridViewListener

Interface implemented by classes wishing to listen to state events on the grid view. Classes that are interested in listening to these events can subscribe to them via caplin.grid.GridView#addGridViewListener, and can then later be removed via caplin.grid.GridView#removeGridViewListener. Classes that wish to provide an implementation of a GridViewListener must implement this interface.

Constructor Summary

Attributes Name and Description
caplin.grid.GridViewListener()

Method Summary

Attributes Name and Description
void onActivate()

Called when the view becomes the actively selected component.

void onAllRowsReceived()

This call-back is invoked when all outstanding row data has been received.

void onClose()

Called when the view is closed.

void onContainerHtmlRendered()

Called when the grid view has rendered some container html — everything but the row data.

void onDeactivate()

Called when the view ceases to be the actively selected component.

void onHide()

Called when the view is hidden.

void onMaximize()

Called when the view is maximised.

void onMinimize()

Called when the view is minimised.

void onOpen(int nWidth, int nHeight)

Called when the view is opened.

void onResize(int nWidth, int nHeight)

Called when the grid is resized.

void onRestore()

Called when the view is restored.

void onRowStructureChanged(Array pIndicies)

This call-back is invoked when the subject-identifiers for one or more rows change.

void onScroll(int nScrollAmount, int nPreviousStartIndex)

Optional.

void onScrollComplete( nScrollAmount, nNewStartIndex)

Called when the view is scrolled vertically.

void onScrollHorizontal(int nScroll)

Called when the view is scrolled horizontally.

void onScrollVertical(int nScrollAmount, int nNewStartIndex)

Called when the view is scrolled vertically.

void onShow()

Called when the view is shown.

void onViewRedrawn(Array pIndicies)

This call-back is invoked when a change occurs that requires the view HTML to be redrawn.

void onVisibleRowCountChanged(int nOldRowCount, int nNewRowCount)

Called when the grid is resized, so that there more or less rows than before.

Constructor Detail

caplin.grid.GridViewListener()

Method Detail

void onActivate()

Called when the view becomes the actively selected component.

void onAllRowsReceived()

This call-back is invoked when all outstanding row data has been received.

The firing of this call-back corresponds to the firing of the caplin.grid.GridRowModelListener#onAllDataReceived method on the underlying caplin.grid.GridRowModel, but additionally occurs after all row rendering for these updates has taken place.

void onClose()

Called when the view is closed. Arguments are possible.

void onContainerHtmlRendered()

Called when the grid view has rendered some container html — everything but the row data.

This call occurs as soon the view is made aware of the number of rows available within its underlying caplin.grid.GridRowModel (via caplin.grid.GridRowModelListener#onSizeChanged).

void onDeactivate()

Called when the view ceases to be the actively selected component.

void onHide()

Called when the view is hidden. Arguments are possible.

void onMaximize()

Called when the view is maximised. Arguments are possible.

void onMinimize()

Called when the view is minimised. Arguments are possible.

void onOpen(int nWidth, int nHeight)

Called when the view is opened. Arguments are possible.

Parameters
int nWidth the width of the grid.
int nHeight the height of the grid.

void onResize(int nWidth, int nHeight)

Called when the grid is resized.

Parameters
int nWidth The width of the resized grid.
int nHeight The height of the resized grid.

void onRestore()

Called when the view is restored. Arguments are possible.

void onRowStructureChanged(Array pIndicies)

This call-back is invoked when the subject-identifiers for one or more rows change.

Parameters
Array pIndicies The list of row indices for which the subject has changed since the last re-draw.
Deprecated

This method has been renamed to #onViewRedrawn.

void onScroll(int nScrollAmount, int nPreviousStartIndex)

Optional. Called when the view is scrolled.

Parameters
int nScrollAmount the total height in pixels from the start index.
int nPreviousStartIndex the index of the first visible row from the last load.

void onScrollComplete( nScrollAmount, nNewStartIndex)

Called when the view is scrolled vertically. implement onScrollVertical instead

Parameters
nScrollAmount
nNewStartIndex

void onScrollHorizontal(int nScroll)

Called when the view is scrolled horizontally.

Parameters
int nScroll new horizontal offset

void onScrollVertical(int nScrollAmount, int nNewStartIndex)

Called when the view is scrolled vertically.

Parameters
int nScrollAmount the number of rows the view has been moved by (a positive number if the grid has scrolled down, and a negative number if the grid has been scrolled up)
int nNewStartIndex the new index of the first visible row

void onShow()

Called when the view is shown. Arguments are possible.

void onViewRedrawn(Array pIndicies)

This call-back is invoked when a change occurs that requires the view HTML to be redrawn. For example, when a grid is resized or when a set of child rows in an expandable grid are opened or closed.

Decorators whose changes may be destroyed by a large scale redraw of the view can use this call-back method to re-apply any changes they've made.

Parameters
Array pIndicies The list of row indices for which the subject has changed.

void onVisibleRowCountChanged(int nOldRowCount, int nNewRowCount)

Called when the grid is resized, so that there more or less rows than before.

Parameters
int nOldRowCount the number of rows before the resize
int nNewRowCount the number of rows after the resize