TableSelection

sealed class TableSelection

Sealed class representing different types of table selections.

Inheritors

Types

Link copied to clipboard
data class AllCellSelection(val tableId: String) : TableSelection

Represents a selection of all cells in the table.

Link copied to clipboard
data class CellSelection(val tableId: String, val columnIndex: Int, val rowIndex: Int, val globalIndex: Int) : TableSelection

Represents a selection of a cell in the table.

Link copied to clipboard
data class ColumnSelection(val tableId: String, val columnIndex: Int, val columnHeaderRow: Int, val childrenOfSelectedHeader: Map<Int, TableSelection.HeaderCellRange>) : TableSelection

Represents a selection of a column in the table.

Link copied to clipboard
data class HeaderCellRange(val size: Int, val firstIndex: Int, val lastIndex: Int)

Represents a range of header cells.

Link copied to clipboard
data class RowSelection(val tableId: String, val rowIndex: List<Int>, val rowColumnIndex: Int) : TableSelection

Represents a selection of a row in the table.

Link copied to clipboard
data class Unselected(val previousSelectedTableId: String? = null) : TableSelection

Represents an unselected state with an optional previous selected table ID.

Properties

Link copied to clipboard
open val tableId: String

The ID of the table.

Functions

Link copied to clipboard

Check if reset button can be displayed.

Link copied to clipboard
fun getSelectedCellRowIndex(selectedTableId: String): Int

Gets the row index of the selected cell if the table ID matches.

Link copied to clipboard
fun isCellParentSelected(selectedTableId: String, columnIndex: Int, rowIndex: Int): Boolean

Checks if a cell's parent is selected.

Link copied to clipboard
fun isCellSelected(selectedTableId: String, columnIndex: Int, rowIndex: Int): Boolean

Checks if a cell is selected.

Link copied to clipboard
fun isCornerSelected(selectedTableId: String): Boolean

Checks if the corner of the table is selected.

Link copied to clipboard
fun isHeaderSelected(selectedTableId: String, columnIndex: Int, columnHeaderRowIndex: Int): Boolean

Checks if a header cell is selected.

Link copied to clipboard
fun isOtherRowSelected(selectedTableId: String, rowHeaderIndexes: List<Int>, rowHeaderColumnIndex: Int): Boolean

Checks if another row is selected.

Link copied to clipboard
fun isParentHeaderSelected(selectedTableId: String, columnIndex: Int, columnHeaderRowIndex: Int): Boolean

Checks if a parent header is selected.

Link copied to clipboard
fun isRowSelected(selectedTableId: String, rowHeaderIndex: Int): Boolean

Checks if a row is selected.

fun isRowSelected(selectedTableId: String, rowHeaderIndexes: List<Int>): Boolean