Interface TableData

All Known Subinterfaces:
SubscriptionTableData, TreeViewportData, ViewportData
All Known Implementing Classes:
AbstractTableSubscription.SubscriptionEventData, AbstractTableSubscription.UpdateEventData, AbstractTableSubscription.ViewportEventData, JsTreeTable.TreeSubscription.TreeViewportDataImpl

@JsType(namespace="dh") public interface TableData
Common interface for various ways of accessing table data and formatting for viewport or non-viewport subscriptions on tables, data in trees, and snapshots.

Generally speaking, it is more efficient to access data in column-major order, rather than iterating through each Row and accessing all columns that it holds. The getRows() accessor can be useful to read row data, but may incur other costs - it is likely faster to access data by columns using getData(RowPositionUnion, Column).

  • Field Details

  • Method Details

    • getColumns

      @JsProperty elemental2.core.JsArray<Column> getColumns()
    • getRows

      @JsProperty elemental2.core.JsArray<@TsTypeRef(Row.class) ? extends TableData.Row> getRows()
      A lazily computed array of all rows available on the client.
    • get

      @JsMethod default TableData.Row get(TableData.RowPositionUnion index)
      Reads a row object from the table, from which any subscribed column can be read.
      Parameters:
      index - the position or key to access
      Returns:
      the row at the given location
    • get

      @JsIgnore TableData.Row get(long index)
    • get

      @JsIgnore TableData.Row get(int index)
    • getData

      @JsMethod default jsinterop.base.Any getData(TableData.RowPositionUnion index, Column column)
      Reads a specific cell from the table, by row key and column.
      Parameters:
      index - the row in the table to get data from
      column - the column to read
      Returns:
      the value in the table
    • getData

      @JsIgnore jsinterop.base.Any getData(int index, Column column)
    • getData

      @JsIgnore jsinterop.base.Any getData(long index, Column column)
    • getFormat

      @JsMethod default Format getFormat(TableData.RowPositionUnion index, Column column)
      The server-specified Format to use for the cell at the given position.
      Parameters:
      index - the row to read
      column - the column to read
      Returns:
      a Format instance with any server-specified details
    • getFormat

      @JsIgnore Format getFormat(int index, Column column)
    • getFormat

      @JsIgnore Format getFormat(long index, Column column)