Class GridKt
-
- All Implemented Interfaces:
public final class GridKt
-
-
Field Summary
Fields Modifier and Type Field Description private final static Boolean_dataProviderSupportsSizeOpprivate final static DataProvider<?, ?>dataProviderprivate final static String_internalId
-
Method Summary
Modifier and Type Method Description final Booleanget_dataProviderSupportsSizeOp()final DataProvider<?, ?>getDataProvider()final Stringget_internalId()final static <T extends Any, F extends Any> T_get(DataProvider<T, F> $self, Integer rowIndex, List<QuerySortOrder> sortOrders, Comparator<T> inMemorySorting, F filter)Returns the item on given row. final static <T extends Any> T_get(Grid<T> $self, Integer rowIndex)Returns the item on given row. final static <T extends Any, F extends Any> List<T>_findAll(DataProvider<T, F> $self, List<QuerySortOrder> sortOrders, Comparator<T> inMemorySorting, F filter)Returns all items in given data provider, sorted according to given sortOrders (empty by default) and filtered according to given filter (null by default). final static <T extends Any> List<T>_findAll(Grid<T> $self)Returns all items in given data provider. final static <T extends Any> T_getOrNull(Grid<T> $self, Integer rowIndex)Returns the item on given row, or null if the rowIndex is larger than the number of items the data provider can provide. final static <T extends Any> List<T>_fetch(Grid<T> $self, Integer offset, Integer limit)Returns items in given range from Grid's data provider. final static <T extends Any> List<T>fetch(DataCommunicator<T> $self, Integer offset, Integer limit)Returns items in given range from this data communicator. final static <T extends Any> List<T>fetchAll(DataCommunicator<T> $self)Returns all items from this data communicator. final static <T extends Any, F extends Any> Integer_size(DataProvider<T, F> $self, F filter)Returns the number of items in this data provider. final static <T extends Any, F extends Any> Integer_size(HierarchicalDataProvider<T, F> $self, T root, F filter)Returns the number of items in this data provider, including child items. final static <T extends Any, F extends Any> Integer_size(HierarchicalDataProvider<T, F> $self, T root)Returns the number of items in this data provider, including child items. final static <T extends Any, F extends Any> Integer_size(HierarchicalDataProvider<T, F> $self)Returns the number of items in this data provider, including child items. final static Integer_size(Grid<?> $self)Returns the number of items in this Grid. final static Integer_size(TreeGrid<?> $self)Returns the number of items the TreeGrid is actually showing. final static <T extends Any> Grid.Column<T>_getColumnByKey(Grid<T> $self, String columnKey)Gets a Grid.Column of this grid by its columnKey. final static <T extends Any> Component_getCellComponent(Grid<T> $self, Integer rowIndex, String columnKey)Retrieves a component produced by ComponentRenderer in given Grid cell. final static <T extends Any> String_getFormatted(Grid<T> $self, Integer rowIndex, String columnKey)Returns the formatted value of given column as a String. final static <T extends Any> String_getFormatted(Grid.Column<T> $self, T rowObject)Returns the formatted value as a String. final static <T extends Any> List<String>_getFormattedRow(Grid<T> $self, T rowObject)Returns the formatted row as a list of Strings, one for every visible column. final static <T extends Any> List<String>_getFormattedRow(Grid<T> $self, Integer rowIndex)Returns the formatted row as a list of Strings, one for every visible column. final static <T extends Any> List<String>_getFormattedRowOrNull(Grid<T> $self, Integer rowIndex)Returns the formatted row as a list of Strings, one for every visible column. final static <T extends Any> ObjectgetPresentationValue(Grid.Column<T> $self, T rowObject)Returns the output of renderer set for this column for given rowObject formatted as close as possible to the client-side output, using Grid.Column.renderer. final static <T extends Any> String_dump(Grid<T> $self, IntRange rows)Dumps given range of rows of the Grid, formatting the values using the _getFormatted function. final static <T extends Any> String_dump(Grid<T> $self)Dumps given range of rows of the Grid, formatting the values using the _getFormatted function. final static UnitexpectRows(Grid<?> $self, Integer count)Asserts that this grid's provider returns given count of items. final static UnitexpectRow(Grid<?> $self, Integer rowIndex, String row)Asserts that this grid's rowIndex row is formatted as expected. final static HeaderRow.HeaderCellgetCell(HeaderRow $self, KProperty1<?, ?> property)Retrieves the cell for given property; it matches Grid.Column.getKey to KProperty1.name. final static HeaderRow.HeaderCellgetCell(HeaderRow $self, String key)Retrieves the cell for given Grid.Column.getKey. final static FooterRow.FooterCellgetCell(FooterRow $self, KProperty1<?, ?> property)Retrieves the cell for given property; it matches Grid.Column.getKey to KProperty1.name. final static FooterRow.FooterCellgetCell(FooterRow $self, String key)Retrieves the cell for given Grid.Column.getKey. final static <T extends Any> Unitsort(Grid<T> $self, QuerySortOrder sortOrder)Sorts given grid. final static <T extends Any> Unit_clickItem(Grid<T> $self, Integer rowIndex, Integer button, Boolean ctrlKey, Boolean shiftKey, Boolean altKey, Boolean metaKey)Fires the ItemClickEvent event for given rowIndex which invokes all item click listeners registered via Grid.addItemClickListener. final static <T extends Any> Unit_clickItem(Grid<T> $self, Integer rowIndex, Integer button, Boolean ctrlKey, Boolean shiftKey, Boolean altKey)Fires the ItemClickEvent event for given rowIndex which invokes all item click listeners registered via Grid.addItemClickListener. final static <T extends Any> Unit_clickItem(Grid<T> $self, Integer rowIndex, Integer button, Boolean ctrlKey, Boolean shiftKey)Fires the ItemClickEvent event for given rowIndex which invokes all item click listeners registered via Grid.addItemClickListener. final static <T extends Any> Unit_clickItem(Grid<T> $self, Integer rowIndex, Integer button, Boolean ctrlKey)Fires the ItemClickEvent event for given rowIndex which invokes all item click listeners registered via Grid.addItemClickListener. final static <T extends Any> Unit_clickItem(Grid<T> $self, Integer rowIndex, Integer button)Fires the ItemClickEvent event for given rowIndex which invokes all item click listeners registered via Grid.addItemClickListener. final static <T extends Any> Unit_clickItem(Grid<T> $self, Integer rowIndex)Fires the ItemClickEvent event for given rowIndex which invokes all item click listeners registered via Grid.addItemClickListener. final static <T extends Any> Unit_clickItem(Grid<T> $self, Integer rowIndex, Grid.Column<?> column, Integer button, Boolean ctrlKey, Boolean shiftKey, Boolean altKey, Boolean metaKey)Fires the ItemClickEvent event for given rowIndex and a column which invokes all item click listeners registered via Grid.addItemClickListener. final static <T extends Any> Unit_clickItem(Grid<T> $self, Integer rowIndex, Grid.Column<?> column, Integer button, Boolean ctrlKey, Boolean shiftKey, Boolean altKey)Fires the ItemClickEvent event for given rowIndex and a column which invokes all item click listeners registered via Grid.addItemClickListener. final static <T extends Any> Unit_clickItem(Grid<T> $self, Integer rowIndex, Grid.Column<?> column, Integer button, Boolean ctrlKey, Boolean shiftKey)Fires the ItemClickEvent event for given rowIndex and a column which invokes all item click listeners registered via Grid.addItemClickListener. final static <T extends Any> Unit_clickItem(Grid<T> $self, Integer rowIndex, Grid.Column<?> column, Integer button, Boolean ctrlKey)Fires the ItemClickEvent event for given rowIndex and a column which invokes all item click listeners registered via Grid.addItemClickListener. final static <T extends Any> Unit_clickItem(Grid<T> $self, Integer rowIndex, Grid.Column<?> column, Integer button)Fires the ItemClickEvent event for given rowIndex and a column which invokes all item click listeners registered via Grid.addItemClickListener. final static <T extends Any> Unit_clickItem(Grid<T> $self, Integer rowIndex, Grid.Column<?> column)Fires the ItemClickEvent event for given rowIndex and a column which invokes all item click listeners registered via Grid.addItemClickListener. final static <T extends Any> Unit_clickItem(Grid<T> $self, Integer rowIndex, String columnKey, Integer button, Boolean ctrlKey, Boolean shiftKey, Boolean altKey, Boolean metaKey)Fires the ItemClickEvent event for given rowIndex and a columnKey which invokes all item click listeners registered via Grid.addItemClickListener. final static <T extends Any> Unit_clickItem(Grid<T> $self, Integer rowIndex, String columnKey, Integer button, Boolean ctrlKey, Boolean shiftKey, Boolean altKey)Fires the ItemClickEvent event for given rowIndex and a columnKey which invokes all item click listeners registered via Grid.addItemClickListener. final static <T extends Any> Unit_clickItem(Grid<T> $self, Integer rowIndex, String columnKey, Integer button, Boolean ctrlKey, Boolean shiftKey)Fires the ItemClickEvent event for given rowIndex and a columnKey which invokes all item click listeners registered via Grid.addItemClickListener. final static <T extends Any> Unit_clickItem(Grid<T> $self, Integer rowIndex, String columnKey, Integer button, Boolean ctrlKey)Fires the ItemClickEvent event for given rowIndex and a columnKey which invokes all item click listeners registered via Grid.addItemClickListener. final static <T extends Any> Unit_clickItem(Grid<T> $self, Integer rowIndex, String columnKey, Integer button)Fires the ItemClickEvent event for given rowIndex and a columnKey which invokes all item click listeners registered via Grid.addItemClickListener. final static <T extends Any> Unit_clickItem(Grid<T> $self, Integer rowIndex, String columnKey)Fires the ItemClickEvent event for given rowIndex and a columnKey which invokes all item click listeners registered via Grid.addItemClickListener. final static <T extends Any> Unit_doubleClickItem(Grid<T> $self, Integer rowIndex, Integer button, Boolean ctrlKey, Boolean shiftKey, Boolean altKey, Boolean metaKey)Fires the ItemDoubleClickEvent event for given rowIndex which invokes all item click listeners registered via Grid.addItemDoubleClickListener. final static <T extends Any> Unit_doubleClickItem(Grid<T> $self, Integer rowIndex, Integer button, Boolean ctrlKey, Boolean shiftKey, Boolean altKey)Fires the ItemDoubleClickEvent event for given rowIndex which invokes all item click listeners registered via Grid.addItemDoubleClickListener. final static <T extends Any> Unit_doubleClickItem(Grid<T> $self, Integer rowIndex, Integer button, Boolean ctrlKey, Boolean shiftKey)Fires the ItemDoubleClickEvent event for given rowIndex which invokes all item click listeners registered via Grid.addItemDoubleClickListener. final static <T extends Any> Unit_doubleClickItem(Grid<T> $self, Integer rowIndex, Integer button, Boolean ctrlKey)Fires the ItemDoubleClickEvent event for given rowIndex which invokes all item click listeners registered via Grid.addItemDoubleClickListener. final static <T extends Any> Unit_doubleClickItem(Grid<T> $self, Integer rowIndex, Integer button)Fires the ItemDoubleClickEvent event for given rowIndex which invokes all item click listeners registered via Grid.addItemDoubleClickListener. final static <T extends Any> Unit_doubleClickItem(Grid<T> $self, Integer rowIndex)Fires the ItemDoubleClickEvent event for given rowIndex which invokes all item click listeners registered via Grid.addItemDoubleClickListener. final static <T extends Any> Sequence<T>_rowSequence(TreeGrid<T> $self, SerializablePredicate<T> filter)Returns a sequence which walks over all rows the TreeGrid is actually showing. final static <T extends Any, F extends Any> Sequence<T>_rowSequence(HierarchicalDataProvider<T, F> $self, T root, Function1<T, Boolean> isExpanded, F filter)Returns a sequence which walks over all rows the TreeGrid is actually showing. final static <T extends Any, F extends Any> Sequence<T>_rowSequence(HierarchicalDataProvider<T, F> $self, T root, Function1<T, Boolean> isExpanded)Returns a sequence which walks over all rows the TreeGrid is actually showing. final static <T extends Any, F extends Any> Sequence<T>_rowSequence(HierarchicalDataProvider<T, F> $self, T root)Returns a sequence which walks over all rows the TreeGrid is actually showing. final static <T extends Any, F extends Any> Sequence<T>_rowSequence(HierarchicalDataProvider<T, F> $self)Returns a sequence which walks over all rows the TreeGrid is actually showing. final static <T extends Any> PrettyPrintTree_dataSourceToPrettyTree(TreeGrid<T> $self)final static <T extends Any> List<T>_getRootItems(TreeGrid<T> $self)final static <T extends Any> Unit_expandAll(TreeGrid<T> $self, Integer depth)Expands all nodes. final static <T extends Any> Unit_expandAll(TreeGrid<T> $self)Expands all nodes. final static <T extends Any> Unit_editItem(Editor<T> $self, T item)Call this instead of Editor.editItem - this function makes sure that the editor opening is mocked properly, calls the editor bindings, and fires the editor-open-event. final static <T extends Any> Unit_select(Grid<T> $self, T item)In single select clears the selection and select only given item, for multiselect add to selection. final static <T extends Any> Unit_selectAll(Grid<T> $self)Selects all items in the Grid; runs the same code as when the "select all" checkbox is checked. -
-
Method Detail
-
get_dataProviderSupportsSizeOp
final Boolean get_dataProviderSupportsSizeOp()
-
getDataProvider
final DataProvider<?, ?> getDataProvider()
-
get_internalId
final String get_internalId()
-
_get
final static <T extends Any, F extends Any> T _get(DataProvider<T, F> $self, Integer rowIndex, List<QuerySortOrder> sortOrders, Comparator<T> inMemorySorting, F filter)
Returns the item on given row. Fails if the row index is invalid. The data provider is sorted according to given sortOrders (empty by default) and filtered according to given filter (null by default) first.
- Parameters:
rowIndex- the row, 0..- Returns:
the item at given row.
-
_get
final static <T extends Any> T _get(Grid<T> $self, Integer rowIndex)
Returns the item on given row. Fails if the row index is invalid. Uses current Grid sorting.
For TreeGrid this returns the x-th displayed row; skips children of collapsed nodes. Uses _rowSequence.
WARNING: Very slow operation for TreeGrid.
- Parameters:
rowIndex- the row, 0..- Returns:
the item at given row, not null.
-
_findAll
final static <T extends Any, F extends Any> List<T> _findAll(DataProvider<T, F> $self, List<QuerySortOrder> sortOrders, Comparator<T> inMemorySorting, F filter)
Returns all items in given data provider, sorted according to given sortOrders (empty by default) and filtered according to given filter (null by default).
- Returns:
the list of items.
-
_findAll
final static <T extends Any> List<T> _findAll(Grid<T> $self)
Returns all items in given data provider. Uses current Grid sorting.
For TreeGrid this returns all displayed rows; skips children of collapsed nodes.
The Grid never sets any filters into the data provider, however any ConfigurableFilterDataProvider will automatically apply its filters.
- Returns:
the list of items.
-
_getOrNull
final static <T extends Any> T _getOrNull(Grid<T> $self, Integer rowIndex)
Returns the item on given row, or null if the rowIndex is larger than the number of items the data provider can provide. Uses current Grid sorting.
For TreeGrid this returns the x-th displayed row; skips children of collapsed nodes. Uses _rowSequence.
WARNING: Very slow operation for TreeGrid.
- Parameters:
rowIndex- the row, 0 or larger.- Returns:
the item at given row or null if the data provider provides less rows.
-
_fetch
final static <T extends Any> List<T> _fetch(Grid<T> $self, Integer offset, Integer limit)
Returns items in given range from Grid's data provider. Uses current Grid sorting.
For TreeGrid this walks the _rowSequence.
The Grid never sets any filters into the data provider, however any ConfigurableFilterDataProvider will automatically apply its filters.
WARNING: Very slow operation for TreeGrid.
-
fetch
final static <T extends Any> List<T> fetch(DataCommunicator<T> $self, Integer offset, Integer limit)
Returns items in given range from this data communicator. Uses current Grid sorting. Any ConfigurableFilterDataProvider will automatically apply its filters.
This is an internal stuff, most probably you wish to call _fetch.
-
fetchAll
final static <T extends Any> List<T> fetchAll(DataCommunicator<T> $self)
Returns all items from this data communicator. Uses current Grid sorting. Any ConfigurableFilterDataProvider will automatically apply its filters.
This is an internal stuff, most probably you wish to call _fetch.
-
_size
final static <T extends Any, F extends Any> Integer _size(DataProvider<T, F> $self, F filter)
Returns the number of items in this data provider.
In case of HierarchicalDataProvider this returns the number of ALL items including all leafs.
-
_size
final static <T extends Any, F extends Any> Integer _size(HierarchicalDataProvider<T, F> $self, T root, F filter)
Returns the number of items in this data provider, including child items. The function traverses recursively until all children are found; then a total size is returned. The function uses HierarchicalDataProvider.size mostly, but also uses HierarchicalDataProvider.fetchChildren to discover children. Only children matching filter are considered for recursive computation of the size.
Note that this can differ to
Grid._size()sinceGrid._size()ignores children of collapsed tree nodes.- Parameters:
root- start with this item; defaults to null to iterate all itemsfilter- filter to pass to HierarchicalQuery
-
_size
final static <T extends Any, F extends Any> Integer _size(HierarchicalDataProvider<T, F> $self, T root)
Returns the number of items in this data provider, including child items. The function traverses recursively until all children are found; then a total size is returned. The function uses HierarchicalDataProvider.size mostly, but also uses HierarchicalDataProvider.fetchChildren to discover children. Only children matching filter are considered for recursive computation of the size.
Note that this can differ to
Grid._size()sinceGrid._size()ignores children of collapsed tree nodes.- Parameters:
root- start with this item; defaults to null to iterate all items
-
_size
final static <T extends Any, F extends Any> Integer _size(HierarchicalDataProvider<T, F> $self)
Returns the number of items in this data provider, including child items. The function traverses recursively until all children are found; then a total size is returned. The function uses HierarchicalDataProvider.size mostly, but also uses HierarchicalDataProvider.fetchChildren to discover children. Only children matching filter are considered for recursive computation of the size.
Note that this can differ to
Grid._size()sinceGrid._size()ignores children of collapsed tree nodes.
-
_size
final static Integer _size(Grid<?> $self)
Returns the number of items in this Grid.
For TreeGrid this computes the number of items the TreeGrid is actually showing on-screen, ignoring children of collapsed nodes.
A very slow operation for TreeGrid since it walks through all items returned by _rowSequence.
If _dataProviderSupportsSizeOp is false, this function will fetch all the data and count the result returned, which is also very slow.
-
_size
final static Integer _size(TreeGrid<?> $self)
Returns the number of items the TreeGrid is actually showing. For example it doesn't count in children of collapsed nodes.
A very slow operation since it walks through all items returned by _rowSequence.
-
_getColumnByKey
final static <T extends Any> Grid.Column<T> _getColumnByKey(Grid<T> $self, String columnKey)
Gets a Grid.Column of this grid by its columnKey.
-
_getCellComponent
final static <T extends Any> Component _getCellComponent(Grid<T> $self, Integer rowIndex, String columnKey)
Retrieves a component produced by ComponentRenderer in given Grid cell. Fails if the renderer is not a ComponentRenderer.
- Parameters:
rowIndex- the row index, 0 or higher.columnKey- the column key Grid.Column.getKey
-
_getFormatted
final static <T extends Any> String _getFormatted(Grid<T> $self, Integer rowIndex, String columnKey)
Returns the formatted value of given column as a String. Uses getPresentationValue and converts the result to string (even if the result is a Component).
- Parameters:
rowIndex- the row index, 0 or higher.columnKey- the column ID.
-
_getFormatted
final static <T extends Any> String _getFormatted(Grid.Column<T> $self, T rowObject)
Returns the formatted value as a String. Uses getPresentationValue and converts the result to string (even if the result is a Component).
- Parameters:
rowObject- the bean
-
_getFormattedRow
final static <T extends Any> List<String> _getFormattedRow(Grid<T> $self, T rowObject)
Returns the formatted row as a list of Strings, one for every visible column. Uses _getFormatted.
- Parameters:
rowObject- the bean
-
_getFormattedRow
final static <T extends Any> List<String> _getFormattedRow(Grid<T> $self, Integer rowIndex)
Returns the formatted row as a list of Strings, one for every visible column. Uses _getFormatted. Fails if the rowIndex is not within the limits.
- Parameters:
rowIndex- the index of the row, 0..size-1.
-
_getFormattedRowOrNull
final static <T extends Any> List<String> _getFormattedRowOrNull(Grid<T> $self, Integer rowIndex)
Returns the formatted row as a list of Strings, one for every visible column. Uses _getFormatted. Returns null if the rowIndex is not within the limits.
- Parameters:
rowIndex- the index of the row, 0-based.
-
getPresentationValue
final static <T extends Any> Object getPresentationValue(Grid.Column<T> $self, T rowObject)
Returns the output of renderer set for this column for given rowObject formatted as close as possible to the client-side output, using Grid.Column.renderer.
-
_dump
final static <T extends Any> String _dump(Grid<T> $self, IntRange rows)
Dumps given range of rows of the Grid, formatting the values using the _getFormatted function. Does not consider header groups. The output example:
--[Name]--[Age]--[Occupation]-- 0: John, 25, Service Worker 1: Fred, 40, Supervisor --and 198 more
-
_dump
final static <T extends Any> String _dump(Grid<T> $self)
Dumps given range of rows of the Grid, formatting the values using the _getFormatted function. Does not consider header groups. The output example:
--[Name]--[Age]--[Occupation]-- 0: John, 25, Service Worker 1: Fred, 40, Supervisor --and 198 more
-
expectRows
final static Unit expectRows(Grid<?> $self, Integer count)
Asserts that this grid's provider returns given count of items. If not, an AssertionError is thrown with the Grid _dump.
-
expectRow
final static Unit expectRow(Grid<?> $self, Integer rowIndex, String row)
Asserts that this grid's rowIndex row is formatted as expected.
- Parameters:
row- the expected row formatting.
-
getCell
final static HeaderRow.HeaderCell getCell(HeaderRow $self, KProperty1<?, ?> property)
Retrieves the cell for given property; it matches Grid.Column.getKey to KProperty1.name.
- Returns:
the corresponding cell
-
getCell
final static HeaderRow.HeaderCell getCell(HeaderRow $self, String key)
Retrieves the cell for given Grid.Column.getKey.
- Returns:
the corresponding cell
-
getCell
final static FooterRow.FooterCell getCell(FooterRow $self, KProperty1<?, ?> property)
Retrieves the cell for given property; it matches Grid.Column.getKey to KProperty1.name.
- Returns:
the corresponding cell
-
getCell
final static FooterRow.FooterCell getCell(FooterRow $self, String key)
Retrieves the cell for given Grid.Column.getKey.
- Returns:
the corresponding cell
-
sort
final static <T extends Any> Unit sort(Grid<T> $self, QuerySortOrder sortOrder)
Sorts given grid. Affects _findAll, _get and other data-fetching functions.
-
_clickItem
final static <T extends Any> Unit _clickItem(Grid<T> $self, Integer rowIndex, Integer button, Boolean ctrlKey, Boolean shiftKey, Boolean altKey, Boolean metaKey)
Fires the ItemClickEvent event for given rowIndex which invokes all item click listeners registered via Grid.addItemClickListener.
- Parameters:
button- the id of the pressed mouse button (0 is the default button, see ClickEvent.ctrlKey-trueif the control key was down when the event was fired,falseotherwiseshiftKey-trueif the shift key was down when the event was fired,falseotherwisealtKey-trueif the alt key was down when the event was fired,falseotherwisemetaKey-trueif the meta key was down when the event was fired,falseotherwise
-
_clickItem
final static <T extends Any> Unit _clickItem(Grid<T> $self, Integer rowIndex, Integer button, Boolean ctrlKey, Boolean shiftKey, Boolean altKey)
Fires the ItemClickEvent event for given rowIndex which invokes all item click listeners registered via Grid.addItemClickListener.
- Parameters:
button- the id of the pressed mouse button (0 is the default button, see ClickEvent.ctrlKey-trueif the control key was down when the event was fired,falseotherwiseshiftKey-trueif the shift key was down when the event was fired,falseotherwisealtKey-trueif the alt key was down when the event was fired,falseotherwise
-
_clickItem
final static <T extends Any> Unit _clickItem(Grid<T> $self, Integer rowIndex, Integer button, Boolean ctrlKey, Boolean shiftKey)
Fires the ItemClickEvent event for given rowIndex which invokes all item click listeners registered via Grid.addItemClickListener.
- Parameters:
button- the id of the pressed mouse button (0 is the default button, see ClickEvent.ctrlKey-trueif the control key was down when the event was fired,falseotherwiseshiftKey-trueif the shift key was down when the event was fired,falseotherwise
-
_clickItem
final static <T extends Any> Unit _clickItem(Grid<T> $self, Integer rowIndex, Integer button, Boolean ctrlKey)
Fires the ItemClickEvent event for given rowIndex which invokes all item click listeners registered via Grid.addItemClickListener.
- Parameters:
button- the id of the pressed mouse button (0 is the default button, see ClickEvent.ctrlKey-trueif the control key was down when the event was fired,falseotherwise
-
_clickItem
final static <T extends Any> Unit _clickItem(Grid<T> $self, Integer rowIndex, Integer button)
Fires the ItemClickEvent event for given rowIndex which invokes all item click listeners registered via Grid.addItemClickListener.
- Parameters:
button- the id of the pressed mouse button (0 is the default button, see ClickEvent.
-
_clickItem
final static <T extends Any> Unit _clickItem(Grid<T> $self, Integer rowIndex)
Fires the ItemClickEvent event for given rowIndex which invokes all item click listeners registered via Grid.addItemClickListener.
-
_clickItem
final static <T extends Any> Unit _clickItem(Grid<T> $self, Integer rowIndex, Grid.Column<?> column, Integer button, Boolean ctrlKey, Boolean shiftKey, Boolean altKey, Boolean metaKey)
Fires the ItemClickEvent event for given rowIndex and a column which invokes all item click listeners registered via Grid.addItemClickListener.
- Parameters:
column- optional column to be clickedbutton- the id of the pressed mouse buttonctrlKey-trueif the control key was down when the event was fired,falseotherwiseshiftKey-trueif the shift key was down when the event was fired,falseotherwisealtKey-trueif the alt key was down when the event was fired,falseotherwisemetaKey-trueif the meta key was down when the event was fired,falseotherwise
-
_clickItem
final static <T extends Any> Unit _clickItem(Grid<T> $self, Integer rowIndex, Grid.Column<?> column, Integer button, Boolean ctrlKey, Boolean shiftKey, Boolean altKey)
Fires the ItemClickEvent event for given rowIndex and a column which invokes all item click listeners registered via Grid.addItemClickListener.
- Parameters:
column- optional column to be clickedbutton- the id of the pressed mouse buttonctrlKey-trueif the control key was down when the event was fired,falseotherwiseshiftKey-trueif the shift key was down when the event was fired,falseotherwisealtKey-trueif the alt key was down when the event was fired,falseotherwise
-
_clickItem
final static <T extends Any> Unit _clickItem(Grid<T> $self, Integer rowIndex, Grid.Column<?> column, Integer button, Boolean ctrlKey, Boolean shiftKey)
Fires the ItemClickEvent event for given rowIndex and a column which invokes all item click listeners registered via Grid.addItemClickListener.
- Parameters:
column- optional column to be clickedbutton- the id of the pressed mouse buttonctrlKey-trueif the control key was down when the event was fired,falseotherwiseshiftKey-trueif the shift key was down when the event was fired,falseotherwise
-
_clickItem
final static <T extends Any> Unit _clickItem(Grid<T> $self, Integer rowIndex, Grid.Column<?> column, Integer button, Boolean ctrlKey)
Fires the ItemClickEvent event for given rowIndex and a column which invokes all item click listeners registered via Grid.addItemClickListener.
- Parameters:
column- optional column to be clickedbutton- the id of the pressed mouse buttonctrlKey-trueif the control key was down when the event was fired,falseotherwise
-
_clickItem
final static <T extends Any> Unit _clickItem(Grid<T> $self, Integer rowIndex, Grid.Column<?> column, Integer button)
Fires the ItemClickEvent event for given rowIndex and a column which invokes all item click listeners registered via Grid.addItemClickListener.
- Parameters:
column- optional column to be clickedbutton- the id of the pressed mouse button
-
_clickItem
final static <T extends Any> Unit _clickItem(Grid<T> $self, Integer rowIndex, Grid.Column<?> column)
Fires the ItemClickEvent event for given rowIndex and a column which invokes all item click listeners registered via Grid.addItemClickListener.
- Parameters:
column- optional column to be clicked
-
_clickItem
final static <T extends Any> Unit _clickItem(Grid<T> $self, Integer rowIndex, String columnKey, Integer button, Boolean ctrlKey, Boolean shiftKey, Boolean altKey, Boolean metaKey)
Fires the ItemClickEvent event for given rowIndex and a columnKey which invokes all item click listeners registered via Grid.addItemClickListener.
- Parameters:
columnKey- the key of the column to be clickedbutton- the id of the pressed mouse buttonctrlKey-trueif the control key was down when the event was fired,falseotherwiseshiftKey-trueif the shift key was down when the event was fired,falseotherwisealtKey-trueif the alt key was down when the event was fired,falseotherwisemetaKey-trueif the meta key was down when the event was fired,falseotherwise
-
_clickItem
final static <T extends Any> Unit _clickItem(Grid<T> $self, Integer rowIndex, String columnKey, Integer button, Boolean ctrlKey, Boolean shiftKey, Boolean altKey)
Fires the ItemClickEvent event for given rowIndex and a columnKey which invokes all item click listeners registered via Grid.addItemClickListener.
- Parameters:
columnKey- the key of the column to be clickedbutton- the id of the pressed mouse buttonctrlKey-trueif the control key was down when the event was fired,falseotherwiseshiftKey-trueif the shift key was down when the event was fired,falseotherwisealtKey-trueif the alt key was down when the event was fired,falseotherwise
-
_clickItem
final static <T extends Any> Unit _clickItem(Grid<T> $self, Integer rowIndex, String columnKey, Integer button, Boolean ctrlKey, Boolean shiftKey)
Fires the ItemClickEvent event for given rowIndex and a columnKey which invokes all item click listeners registered via Grid.addItemClickListener.
- Parameters:
columnKey- the key of the column to be clickedbutton- the id of the pressed mouse buttonctrlKey-trueif the control key was down when the event was fired,falseotherwiseshiftKey-trueif the shift key was down when the event was fired,falseotherwise
-
_clickItem
final static <T extends Any> Unit _clickItem(Grid<T> $self, Integer rowIndex, String columnKey, Integer button, Boolean ctrlKey)
Fires the ItemClickEvent event for given rowIndex and a columnKey which invokes all item click listeners registered via Grid.addItemClickListener.
- Parameters:
columnKey- the key of the column to be clickedbutton- the id of the pressed mouse buttonctrlKey-trueif the control key was down when the event was fired,falseotherwise
-
_clickItem
final static <T extends Any> Unit _clickItem(Grid<T> $self, Integer rowIndex, String columnKey, Integer button)
Fires the ItemClickEvent event for given rowIndex and a columnKey which invokes all item click listeners registered via Grid.addItemClickListener.
- Parameters:
columnKey- the key of the column to be clickedbutton- the id of the pressed mouse button
-
_clickItem
final static <T extends Any> Unit _clickItem(Grid<T> $self, Integer rowIndex, String columnKey)
Fires the ItemClickEvent event for given rowIndex and a columnKey which invokes all item click listeners registered via Grid.addItemClickListener.
- Parameters:
columnKey- the key of the column to be clicked
-
_doubleClickItem
final static <T extends Any> Unit _doubleClickItem(Grid<T> $self, Integer rowIndex, Integer button, Boolean ctrlKey, Boolean shiftKey, Boolean altKey, Boolean metaKey)
Fires the ItemDoubleClickEvent event for given rowIndex which invokes all item click listeners registered via Grid.addItemDoubleClickListener.
- Parameters:
button- the id of the pressed mouse buttonctrlKey-trueif the control key was down when the event was fired,falseotherwiseshiftKey-trueif the shift key was down when the event was fired,falseotherwisealtKey-trueif the alt key was down when the event was fired,falseotherwisemetaKey-trueif the meta key was down when the event was fired,falseotherwise
-
_doubleClickItem
final static <T extends Any> Unit _doubleClickItem(Grid<T> $self, Integer rowIndex, Integer button, Boolean ctrlKey, Boolean shiftKey, Boolean altKey)
Fires the ItemDoubleClickEvent event for given rowIndex which invokes all item click listeners registered via Grid.addItemDoubleClickListener.
- Parameters:
button- the id of the pressed mouse buttonctrlKey-trueif the control key was down when the event was fired,falseotherwiseshiftKey-trueif the shift key was down when the event was fired,falseotherwisealtKey-trueif the alt key was down when the event was fired,falseotherwise
-
_doubleClickItem
final static <T extends Any> Unit _doubleClickItem(Grid<T> $self, Integer rowIndex, Integer button, Boolean ctrlKey, Boolean shiftKey)
Fires the ItemDoubleClickEvent event for given rowIndex which invokes all item click listeners registered via Grid.addItemDoubleClickListener.
- Parameters:
button- the id of the pressed mouse buttonctrlKey-trueif the control key was down when the event was fired,falseotherwiseshiftKey-trueif the shift key was down when the event was fired,falseotherwise
-
_doubleClickItem
final static <T extends Any> Unit _doubleClickItem(Grid<T> $self, Integer rowIndex, Integer button, Boolean ctrlKey)
Fires the ItemDoubleClickEvent event for given rowIndex which invokes all item click listeners registered via Grid.addItemDoubleClickListener.
- Parameters:
button- the id of the pressed mouse buttonctrlKey-trueif the control key was down when the event was fired,falseotherwise
-
_doubleClickItem
final static <T extends Any> Unit _doubleClickItem(Grid<T> $self, Integer rowIndex, Integer button)
Fires the ItemDoubleClickEvent event for given rowIndex which invokes all item click listeners registered via Grid.addItemDoubleClickListener.
- Parameters:
button- the id of the pressed mouse button
-
_doubleClickItem
final static <T extends Any> Unit _doubleClickItem(Grid<T> $self, Integer rowIndex)
Fires the ItemDoubleClickEvent event for given rowIndex which invokes all item click listeners registered via Grid.addItemDoubleClickListener.
-
_rowSequence
final static <T extends Any> Sequence<T> _rowSequence(TreeGrid<T> $self, SerializablePredicate<T> filter)
Returns a sequence which walks over all rows the TreeGrid is actually showing. The sequence will skip children of collapsed nodes.
Iterating the entire sequence is a very slow operation since it will repeatedly poll HierarchicalDataProvider for list of children.
Honors current grid ordering.
-
_rowSequence
final static <T extends Any, F extends Any> Sequence<T> _rowSequence(HierarchicalDataProvider<T, F> $self, T root, Function1<T, Boolean> isExpanded, F filter)
Returns a sequence which walks over all rows the TreeGrid is actually showing. The sequence will skip children of collapsed nodes.
Iterating the entire sequence is a very slow operation since it will repeatedly poll HierarchicalDataProvider for list of children.
Honors current grid ordering.
- Parameters:
root- start with this item; defaults to null to iterate all itemsisExpanded- if returns null for an item, children of that item are skippedfilter- filter to pass to HierarchicalQuery
-
_rowSequence
final static <T extends Any, F extends Any> Sequence<T> _rowSequence(HierarchicalDataProvider<T, F> $self, T root, Function1<T, Boolean> isExpanded)
Returns a sequence which walks over all rows the TreeGrid is actually showing. The sequence will skip children of collapsed nodes.
Iterating the entire sequence is a very slow operation since it will repeatedly poll HierarchicalDataProvider for list of children.
Honors current grid ordering.
- Parameters:
root- start with this item; defaults to null to iterate all itemsisExpanded- if returns null for an item, children of that item are skipped
-
_rowSequence
final static <T extends Any, F extends Any> Sequence<T> _rowSequence(HierarchicalDataProvider<T, F> $self, T root)
Returns a sequence which walks over all rows the TreeGrid is actually showing. The sequence will skip children of collapsed nodes.
Iterating the entire sequence is a very slow operation since it will repeatedly poll HierarchicalDataProvider for list of children.
Honors current grid ordering.
- Parameters:
root- start with this item; defaults to null to iterate all items
-
_rowSequence
final static <T extends Any, F extends Any> Sequence<T> _rowSequence(HierarchicalDataProvider<T, F> $self)
Returns a sequence which walks over all rows the TreeGrid is actually showing. The sequence will skip children of collapsed nodes.
Iterating the entire sequence is a very slow operation since it will repeatedly poll HierarchicalDataProvider for list of children.
Honors current grid ordering.
-
_dataSourceToPrettyTree
final static <T extends Any> PrettyPrintTree _dataSourceToPrettyTree(TreeGrid<T> $self)
-
_getRootItems
final static <T extends Any> List<T> _getRootItems(TreeGrid<T> $self)
-
_expandAll
final static <T extends Any> Unit _expandAll(TreeGrid<T> $self, Integer depth)
Expands all nodes. May invoke massive data loading.
-
_expandAll
final static <T extends Any> Unit _expandAll(TreeGrid<T> $self)
Expands all nodes. May invoke massive data loading.
-
_editItem
final static <T extends Any> Unit _editItem(Editor<T> $self, T item)
Call this instead of Editor.editItem - this function makes sure that the editor opening is mocked properly, calls the editor bindings, and fires the editor-open-event.
-
_select
final static <T extends Any> Unit _select(Grid<T> $self, T item)
In single select clears the selection and select only given item, for multiselect add to selection.
-
_selectAll
final static <T extends Any> Unit _selectAll(Grid<T> $self)
Selects all items in the Grid; runs the same code as when the "select all" checkbox is checked. Fails if the grid is not multi-select or the "select all" checkbox is hidden.
-
-
-
-