Private _bufferPrivate _bufferGCPrivate _canvasPrivate _canvasGCPrivate _cellPrivate _columnPrivate _columnPrivate _copyPrivate _dataPrivate _dpiPrivate _editingPrivate _editorPrivate _hPrivate _hPrivate _headerPrivate _keyPrivate _mousePrivate _mousedownPrivate _overlayPrivate _overlayGCPrivate _rowPrivate _rowPrivate _scrollPrivate _scrollXPrivate _scrollYPrivate _selectionPrivate _stretchPrivate _stretchPrivate _stylePrivate _vPrivate _vPrivate _viewportPrivate _viewportPrivate _viewportReadonly nodeGet the DOM node owned by the widget.
Protected canvasGCThe rendering context for painting the data grid.
Get the cell renderer map for the data grid.
Set the cell renderer map for the data grid.
Protected columnThe column header sections of the data grid.
Protected columnThe column sections of the data grid.
Get the copy configuration for the data grid.
Set the copy configuration for the data grid.
Get the current viewport.
The current viewport as row/column coordinates. Returns undefined if the grid is not visible.
The dataset for the widget's DOM node.
Get the default sizes for the various sections of the data grid.
Set the default sizes for the various sections of the data grid.
Whether the grid cells are editable.
editingEnabled flag must be on and grid must have required
selection model, editor controller and data model properties.
Whether the cell editing is enabled for the data grid.
The cell editor controller object for the data grid.
The virtual height of the column headers.
Get the header visibility for the data grid.
Set the header visibility for the data grid.
The virtual width of the row headers.
Get the method for hiding the widget.
Set the method for hiding the widget.
Get the id of the widget's DOM node.
Set the id of the widget's DOM node.
Test whether the widget's node is attached to the DOM.
Test whether the widget has been disposed.
Test whether the widget is explicitly hidden.
You should prefer !{@link isVisible} over {@link isHidden} if you want to know if the
widget is hidden as this does not test if the widget is hidden because one of its ancestors is hidden.
Test whether the widget is visible.
A widget is visible when it is attached to the DOM, is not explicitly hidden, and has no explicitly hidden ancestors.
Since 2.7.0, this does not rely on the Widget.Flag.IsVisible flag. It recursively checks the visibility of all parent widgets.
Get the key handler for the data grid.
Set the key handler for the data grid.
Get the layout for the widget.
Set the layout for the widget.
The layout is single-use only. It cannot be changed after the first assignment.
The layout is disposed automatically when the widget is disposed.
The maximum scroll X position for the grid.
The maximum scroll Y position for the grid.
Get the minimum sizes for the various sections of the data grid.
Set the minimum sizes for the various sections of the data grid.
Get the mouse handler for the data grid.
Set the mouse handler for the data grid.
The height of the visible portion of the grid body.
The width of the visible portion of the grid body.
Get the parent of the widget.
Set the parent of the widget.
Children are typically added to a widget by using a layout, which means user code will not normally set the parent widget directly.
The widget will be automatically removed from its old parent.
This is a no-op if there is no effective parent change.
Protected rowThe row header sections of the data grid.
Protected rowThe row sections of the data grid.
The current scroll X position of the viewport.
The current scroll Y position of the viewport.
Get the selection model for the data grid.
Set the selection model for the data grid.
Get whether the last column is stretched.
Set whether the last column is stretched.
Get whether the last row is stretched.
Set whether the last row is stretched.
The title object for the widget.
The title object is used by some container widgets when displaying the widget alongside some title, such as a tab panel or side bar.
Since not all widgets will use the title, it is created on demand.
The owner property of the title is set to this widget.
The actual height of the viewport.
The actual width of the viewport.
Private _blitBlit content into the on-screen grid canvas.
The rect should be expressed in viewport coordinates.
This automatically accounts for the dpi ratio.
Private _drawPrivate _drawPrivate _drawPrivate _drawPrivate _drawPrivate _drawPrivate _drawPrivate _drawPrivate _drawPrivate _drawPrivate _drawPrivate _drawPrivate _drawPrivate _drawPrivate _drawPrivate _evtHandle the 'contextmenu' event for the data grid.
Private _evtHandle the 'keydown' event for the data grid.
Private _evtHandle the 'dblclick' event for the data grid.
Private _evtHandle the 'mousedown' event for the data grid.
Private _evtHandle the 'mouseleave' event for the data grid.
Private _evtHandle the 'mousemove' event for the data grid.
Private _evtHandle the 'mouseup' event for the data grid.
Private _evtHandle the 'wheel' event for the data grid.
Private _fitResizes body column headers so their text fits without clipping or wrapping.
Optional numCols: numberPrivate _fitResizes row header columns so their text fits without clipping or wrapping.
Optional numCols: numberPrivate _getPrivate _getReturns column size
Private _getPrivate _getPrivate _getReturns row size
Private _getPrivate _onHandle cells changing in the data model.
Private _onHandle columns being inserted into the data model.
Private _onHandle columns moving in the data model.
Private _onHandle columns being removed from the data model.
Private _onA signal handler for the data model changed signal.
Private _onHandle a full data model reset.
Private _onHandle the pageRequested signal from a scroll bar.
Private _onPrivate _onHandle rows being inserted in the data model.
Private _onHandle rows moving in the data model.
Private _onHandle rows being removed from the data model.
Private _onA signal handler for the selection model changed signal.
Private _onHandle the stepRequested signal from a scroll bar.
Private _onHandle the thumbMoved signal from a scroll bar.
Private _onPrivate _onA message hook invoked on a viewport 'overlay-paint-request' message.
Private _onPrivate _onA message hook invoked on a viewport 'resize' message.
Private _onPrivate _onA message hook invoked on a viewport 'scroll-request' message.
Private _paintPaint group cells.
Private _paintPrivate _processProcess a message sent to the viewport
Private _refreshDPIPrivate _releasePrivate _resizePrivate _resizePrivate _resizePrivate _resizePrivate _resizePrivate _scrollPrivate _syncSync the scroll bars and scroll state with the viewport.
If the visibility of either scroll bar changes, a synchronous fit-request will be dispatched to the data grid to immediately resize the viewport.
Private _syncSync the viewport to the given scroll position.
This schedules a full repaint and syncs the scroll state.
Post an 'activate-request' message to the widget.
This is a simple convenience method for posting the message.
Add a class name to the widget's DOM node.
The class name to add to the node.
If the class name is already added to the node, this is a no-op.
The class name must not contain whitespace.
Private cellCreate an iterator over the widget's children.
A new iterator over the children of the widget.
The widget must have a populated layout in order to have children.
If a layout is not installed, the returned iterator will be empty.
Clear the given widget flag.
This will not typically be called directly by user code.
Since 2.7.0, Widget.Flag.IsVisible is deprecated. It will be removed in a future version.
Send a 'close-request' message to the widget.
This is a simple convenience method for sending the message.
Get the column at a virtual offset in the data grid.
The region which holds the column of interest.
The virtual offset of the column of interest.
The index of the column, or -1 if the offset is out of range.
This method accounts for a stretched last column.
Get the column count for a particular region in the data grid.
The column region of interest.
The column count for the specified region.
Get the offset of a column in the data grid.
The region which holds the column of interest.
The index of the column of interest.
The offset of the column, or -1 if the index is out of range.
A stretched last column has no effect on the return value.
Get the size of a column in the data grid.
The region which holds the column of interest.
The index of the column of interest.
The size of the column, or -1 if the index is out of range.
This method accounts for a stretched last column.
Test whether a widget is a descendant of this widget.
The descendant widget of interest.
true if the widget is a descendant, false otherwise.
Copy the current selection to the system clipboard.
The grid must have a data model and a selection model.
The behavior can be configured via DataGrid.copyConfig.
Protected drawPost a 'fit-request' message to the widget.
This is a simple convenience method for posting the message.
Auto sizes column-header widths based on their text content.
which area to resize: 'body', 'row-header' or 'all'.
padding added to resized columns (pixels).
Optional numCols: numberspecify cap on the number of column resizes (optional).
Hit test the viewport for the given client position.
The client X position of the mouse.
The client Y position of the mouse.
The hit test result, or null if the client
position is out of bounds.
This method accounts for a stretched last row and/or column.
Map a client position to local viewport coordinates.
The client X position of the mouse.
The client Y position of the mouse.
The local viewport coordinates for the position.
Map a client position to virtual grid coordinates.
The client X position of the mouse.
The client Y position of the mouse.
The virtual grid coordinates for the position.
Intercept a message sent to a message handler.
The target handler of the message.
The message to be sent to the handler.
true if the message should continue to be processed
as normal, or false if processing should cease immediately.
Move cursor down/up/left/right while making sure it remains within the bounds of selected rectangles
The direction of the movement.
Protected notifyProtected onA message handler invoked on an 'activate-request' message.
Protected onProtected onA message handler invoked on an 'after-detach' message.
Protected onProtected onProtected onA message handler invoked on a 'before-attach' message.
Protected onProtected onProtected onA message handler invoked on a 'before-show' message.
Protected onA message handler invoked on a 'child-added' message.
The default implementation of this handler is a no-op.
Protected onA message handler invoked on a 'child-removed' message.
The default implementation of this handler is a no-op.
Protected onProtected onProtected onA message handler invoked on a 'resize' message.
Protected onProtected paintPaint the grid content for the given dirty rect.
The rect should be expressed in valid viewport coordinates.
This is the primary paint entry point. The individual _draw*
methods should not be invoked directly. This method dispatches
to the drawing methods in the correct order.
Process a message sent to the widget.
The message sent to the widget.
Remove a class name from the widget's DOM node.
The class name to remove from the node.
If the class name is not yet added to the node, this is a no-op.
The class name must not contain whitespace.
Protected repaintProtected repaintProtected repaintSchedule a repaint of specific grid content.
Reset modified columns to their default size.
The column region of interest.
Reset modified rows to their default size.
The row region of interest.
Resize a column in the data grid.
The region which holds the column of interest.
The index of the column of interest.
The desired size of the column.
Resize a row in the data grid.
The region which holds the row of interest.
The index of the row of interest.
The desired size of the row.
Get the row at a virtual offset in the data grid.
The region which holds the row of interest.
The virtual offset of the row of interest.
The index of the row, or -1 if the offset is out of range.
This method accounts for a stretched last row.
Get the row count for a particular region in the data grid.
The row region of interest.
The row count for the specified region.
Get the offset of a row in the data grid.
The region which holds the row of interest.
The index of the row of interest.
The offset of the row, or -1 if the index is out of range.
A stretched last row has no effect on the return value.
Get the size of a row in the data grid.
The region which holds the row of interest.
The index of the row of interest.
The size of the row, or -1 if the index is out of range.
This method accounts for a stretched last row.
Scroll the grid to the current cursor position.
This is a no-op if the cursor is already visible or if there is no selection model installed on the grid.
Set the given widget flag.
This will not typically be called directly by user code.
Since 2.7.0, Widget.Flag.IsVisible is deprecated. It will be removed in a future version.
Show or hide the widget according to a boolean value.
true to hide the widget, or false to show it.
This is a convenience method for hide() and show().
Test whether the given widget flag is set.
This will not typically be called directly by user code.
Since 2.7.0, Widget.Flag.IsVisible is deprecated. It will be removed in a future version.
Toggle a class name on the widget's DOM node.
The class name to toggle on the node.
Optional force: booleanWhether to force add the class (true) or force
remove the class (false). If not provided, the presence of
the class will be toggled from its current state.
true if the class is now present, false otherwise.
The class name must not contain whitespace.
Post an 'update-request' message to the widget.
This is a simple convenience method for posting the message.
Private Static _getPrivate Static _getPrivate Static _get
A widget which implements a high-performance tabular data grid.
Notes
A data grid is implemented as a composition of child widgets. These child widgets are considered an implementation detail. Manipulating the child widgets of a data grid directly is undefined behavior.
This class is not designed to be subclassed.
See also the related example and its source.