TableDimensions

data class TableDimensions(val tableHorizontalPadding: Dp = Spacing.Spacing16, val tableVerticalPadding: Dp = Spacing.Spacing16, val defaultCellWidth: Int = 260, val defaultCellHeight: Dp = Spacing.Spacing40, val defaultRowHeaderWidth: Int = 275, val defaultHeaderHeight: Int = 36, val defaultHeaderTextSize: TextUnit = 12.sp, val defaultRowHeaderTextSize: TextUnit = 12.sp, val defaultCellTextSize: TextUnit = 12.sp, val totalWidth: Int = 0, val cellPaddingValues: PaddingValues = PaddingValues( horizontal = Spacing.Spacing8, vertical = Spacing.Spacing11, ), val headerCellPaddingValues: PaddingValues = PaddingValues( horizontal = Spacing.Spacing8, vertical = Spacing.Spacing11, ), val tableBottomPadding: Dp = Spacing.Spacing200, val extraWidths: Map<String, Int> = emptyMap(), val rowHeaderWidths: Map<String, Int> = emptyMap(), val columnWidth: Map<String, Map<Int, Int>> = emptyMap(), val minRowHeaderWidth: Int = 130, val minColumnWidth: Int = 130, val maxRowHeaderWidth: Int = Int.MAX_VALUE, val maxColumnWidth: Int = Int.MAX_VALUE, val tableEndExtraScroll: Dp = Spacing.Spacing6)

Data class representing the dimensions of the table component.

Constructors

Link copied to clipboard
constructor(tableHorizontalPadding: Dp = Spacing.Spacing16, tableVerticalPadding: Dp = Spacing.Spacing16, defaultCellWidth: Int = 260, defaultCellHeight: Dp = Spacing.Spacing40, defaultRowHeaderWidth: Int = 275, defaultHeaderHeight: Int = 36, defaultHeaderTextSize: TextUnit = 12.sp, defaultRowHeaderTextSize: TextUnit = 12.sp, defaultCellTextSize: TextUnit = 12.sp, totalWidth: Int = 0, cellPaddingValues: PaddingValues = PaddingValues( horizontal = Spacing.Spacing8, vertical = Spacing.Spacing11, ), headerCellPaddingValues: PaddingValues = PaddingValues( horizontal = Spacing.Spacing8, vertical = Spacing.Spacing11, ), tableBottomPadding: Dp = Spacing.Spacing200, extraWidths: Map<String, Int> = emptyMap(), rowHeaderWidths: Map<String, Int> = emptyMap(), columnWidth: Map<String, Map<Int, Int>> = emptyMap(), minRowHeaderWidth: Int = 130, minColumnWidth: Int = 130, maxRowHeaderWidth: Int = Int.MAX_VALUE, maxColumnWidth: Int = Int.MAX_VALUE, tableEndExtraScroll: Dp = Spacing.Spacing6)

Properties

Link copied to clipboard

The padding of the table cells.

Link copied to clipboard

The widths of the columns.

Link copied to clipboard

The default height of the table cells.

Link copied to clipboard

The default size of the cell text.

Link copied to clipboard

The default width of the table cells.

Link copied to clipboard

The default height of the header.

Link copied to clipboard

The default size of the header text.

Link copied to clipboard

The default size of the row header text.

Link copied to clipboard

The default width of the row header.

Link copied to clipboard

The extra widths of the table.

Link copied to clipboard

The padding values of the header cells.

Link copied to clipboard

The maximum width of the column.

Link copied to clipboard

The maximum width of the row header.

Link copied to clipboard
val minColumnWidth: Int = 130

The minimum width of the column.

Link copied to clipboard

The minimum width of the row header.

Link copied to clipboard

The widths of the row headers.

Link copied to clipboard

The bottom padding of the table.

Link copied to clipboard

The extra scroll of the table end.

Link copied to clipboard

The horizontal padding of the table.

Link copied to clipboard

The vertical padding of the table.

Link copied to clipboard
Link copied to clipboard
val totalWidth: Int = 0

The total width of the table.

Functions

Link copied to clipboard
fun getColumnWidth(groupedTables: Boolean, tableId: String, column: Int): Int

Get the width of the column.

Link copied to clipboard
fun getExtraWidths(tableId: String): Int

Get the extra widths of the table.

Link copied to clipboard
fun getRowHeaderWidth(groupedTables: Boolean, tableId: String): Int

Get the width of the row header.

Link copied to clipboard

Check if the table has overridden widths.

Link copied to clipboard
fun resetWidth(groupedTables: Boolean, tableId: String): TableDimensions

Reset the widths of the table.

Link copied to clipboard
fun rowHeaderWidth(groupedTables: Boolean, tableId: String): Int

Update the width of the row header.

Link copied to clipboard
fun updateAllWidthBy(groupedTables: Boolean, tableId: String, widthOffset: Float): TableDimensions
Link copied to clipboard
fun updateColumnWidth(groupedTables: Boolean, tableId: String, column: Int, widthOffset: Float): TableDimensions
Link copied to clipboard
fun updateHeaderWidth(groupedTables: Boolean, tableId: String, widthOffset: Float): TableDimensions