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
module:caplin/grid/GridView#addGridViewListener
,
and can then later be removed via module:caplin/grid/GridView#removeGridViewListener
. Classes that
wish to provide an implementation of a GridViewListener
must implement this interface.- Implementations:
- module:caplin/grid/dataprovider/ChainedGridDataProvider
- module:caplin/grid/decorator/ColumnHeaderMenuDecorator
- module:caplin/grid/decorator/ColumnMenuDecorator
- module:caplin/grid/decorator/ColumnReorderingDecorator
- module:caplin/grid/decorator/ColumnResizingDecorator
- module:caplin/grid/decorator/ColumnSortDecorator
- module:caplin/grid/decorator/ContainerExportDecorator
- module:caplin/grid/decorator/DragDecorator
- module:caplin/grid/decorator/DropDecorator
- module:caplin/grid/decorator/GroupHeaderDecorator
- module:caplin/grid/decorator/HoverDecorator
- module:caplin/grid/decorator/LoadingDataDecorator
- module:caplin/grid/decorator/NoDataFoundBubbleMessageDecorator
- module:caplin/grid/decorator/ResetColumnsDecorator
- module:caplin/grid/decorator/RowLoadingDecorator
- module:caplin/grid/decorator/ScrollTipDecorator
- module:caplin/grid/decorator/SelectionDecorator
- module:caplin/grid/decorator/StatusDecorator
- module:caplin/grid/decorator/SubjectDecorator
Methods
-
onActivate()
-
Called when the view becomes the actively selected component.
- Implementations:
- module:caplin/grid/decorator/ContainerExportDecorator#onActivate
- module:caplin/grid/decorator/SelectionDecorator#onActivate
-
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
module:caplin/grid/GridRowModelListener#onAllDataReceived
method on the underlyingmodule:caplin/grid/GridRowModel
, but additionally occurs after all row rendering for these updates has taken place.- Implementations:
-
onClose()
-
Called when the view is closed. Arguments are possible.
- Implementations:
- module:caplin/grid/dataprovider/ChainedGridDataProvider#onClose
- module:caplin/grid/decorator/ColumnHeaderMenuDecorator#onClose
- module:caplin/grid/decorator/ColumnReorderingDecorator#onClose
- module:caplin/grid/decorator/ColumnResizingDecorator#onClose
- module:caplin/grid/decorator/ColumnSortDecorator#onClose
- module:caplin/grid/decorator/ContainerExportDecorator#onClose
- module:caplin/grid/decorator/DragDecorator#onClose
- module:caplin/grid/decorator/DropDecorator#onClose
- module:caplin/grid/decorator/HoverDecorator#onClose
- module:caplin/grid/decorator/LoadingDataDecorator#onClose
- module:caplin/grid/decorator/NoDataFoundBubbleMessageDecorator#onClose
- module:caplin/grid/decorator/ResetColumnsDecorator#onClose
- module:caplin/grid/decorator/RowLoadingDecorator#onClose
- module:caplin/grid/decorator/ScrollTipDecorator#onClose
- module:caplin/grid/decorator/SelectionDecorator#onClose
- module:caplin/grid/decorator/StatusDecorator#onClose
- module:caplin/grid/decorator/SubjectDecorator#onClose
-
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
module:caplin/grid/GridRowModel
(viamodule:caplin/grid/GridRowModelListener#onSizeChanged
).- Implementations:
- module:caplin/grid/decorator/ColumnHeaderMenuDecorator#onContainerHtmlRendered
- module:caplin/grid/decorator/ColumnReorderingDecorator#onContainerHtmlRendered
- module:caplin/grid/decorator/ColumnResizingDecorator#onContainerHtmlRendered
- module:caplin/grid/decorator/ColumnSortDecorator#onContainerHtmlRendered
- module:caplin/grid/decorator/DropDecorator#onContainerHtmlRendered
- module:caplin/grid/decorator/HoverDecorator#onContainerHtmlRendered
- module:caplin/grid/decorator/LoadingDataDecorator#onContainerHtmlRendered
- module:caplin/grid/decorator/ResetColumnsDecorator#onContainerHtmlRendered
- module:caplin/grid/decorator/ScrollTipDecorator#onContainerHtmlRendered
- module:caplin/grid/decorator/SelectionDecorator#onContainerHtmlRendered
-
onDeactivate()
-
Called when the view ceases to be the actively selected component.
- Implementations:
- module:caplin/grid/decorator/ContainerExportDecorator#onDeactivate
- module:caplin/grid/decorator/SelectionDecorator#onDeactivate
-
onHide()
-
Called when the view is hidden. Arguments are possible.
- Implementations:
- module:caplin/grid/decorator/ContainerExportDecorator#onHide
-
onMaximize()
-
Called when the view is maximised. Arguments are possible.
-
onMinimize()
-
Called when the view is minimised. Arguments are possible.
-
onOpen(nWidth, nHeight)
-
Called when the view is opened. Arguments are possible.
Parameters:
Name Type Description nWidth
int the width of the grid. nHeight
int the height of the grid. - Implementations:
- module:caplin/grid/dataprovider/ChainedGridDataProvider#onOpen
- module:caplin/grid/decorator/ColumnReorderingDecorator#onOpen
- module:caplin/grid/decorator/ContainerExportDecorator#onOpen
- module:caplin/grid/decorator/NoDataFoundBubbleMessageDecorator#onOpen
- module:caplin/grid/decorator/RowLoadingDecorator#onOpen
-
onResize(nWidth, nHeight)
-
Called when the grid is resized.
Parameters:
Name Type Description nWidth
int The width of the resized grid. nHeight
int The height of the resized grid. - Implementations:
- module:caplin/grid/decorator/ColumnHeaderMenuDecorator#onResize
- module:caplin/grid/decorator/ColumnReorderingDecorator#onResize
-
onRestore()
-
Called when the view is restored. Arguments are possible.
-
onScroll(nScrollAmount, nPreviousStartIndex)
-
Optional. Called when the view is scrolled.
Parameters:
Name Type Description nScrollAmount
int the total height in pixels from the start index. nPreviousStartIndex
int the index of the first visible row from the last load. - Implementations:
- module:caplin/grid/decorator/RowLoadingDecorator#onScroll
- module:caplin/grid/decorator/ScrollTipDecorator#onScroll
-
onScrollComplete()
-
Called when the view is scrolled vertically. implement
module:caplin/grid/GridView#onScrollVertical
instead- Deprecated:
- Yes
-
onScrollHorizontal(nScroll)
-
Called when the view is scrolled horizontally.
Parameters:
Name Type Description nScroll
int new horizontal offset -
onScrollVertical(nScrollAmount, nNewStartIndex)
-
Called when the view is scrolled vertically.
Parameters:
Name Type Description nScrollAmount
int 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) nNewStartIndex
int the new index of the first visible row - Implementations:
-
onShow()
-
Called when the view is shown. Arguments are possible.
- Implementations:
- module:caplin/grid/decorator/ContainerExportDecorator#onShow
-
onViewRedrawn(pIndices)
-
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:
Name Type Description pIndices
Array The list of row indices for which the subject has changed. - Implementations:
- module:caplin/grid/decorator/DragDecorator#onViewRedrawn
- module:caplin/grid/decorator/SelectionDecorator#onViewRedrawn
-
onVisibleRowCountChanged(nOldRowCount, nNewRowCount)
-
Called when the grid is resized, so that there more or less rows than before.
Parameters:
Name Type Description nOldRowCount
int the number of rows before the resize nNewRowCount
int the number of rows after the resize