Interface TableModelIf

The TableModelIf is on one hand a container for the header, body, and footer models (see : #getAreaModel, and #AreaModelIf), and on the other hand the master of the column information (#getColumnCount(), #getColumnWidth(columnIndex: number)).

If getFixedLeftColumnCount() returns a value greater than 0, a fixed west area will be rendered in the header, body, and footer. A value greater than 0 for getFixedLeftColumnCount() will result in the presence of an east area.

 +----------------+-------------------+--------------+
 |  header/west   |  header/center    | header/east  |
 +----------------+-------------------+--------------+
 |  body/west     |  body/center      | body/east    |
 +----------------+-------------------+--------------+
 |  footer/west   |  footer/center    | footer/east  |
 +----------------+-------------------+--------------+

Hierarchy

  • TableModelIf

Implemented by

Methods

  • Moves a column from the source column index to the target column index.

    Parameters

    • sourceColumnIndex: number

      The index of the column to be moved.

    • targetColumnIndex: number

      The index where the column will be moved to.

    Returns void

    • This method does not return anything.
  • Sorts an array of SortItem objects based on a predetermined sorting algorithm.

    Parameters

    • sortItems: SortItem[]

      An array of SortItem objects to be sorted.

    Returns boolean

    • Returns true if the sorting was successful, false otherwise.
  • This is triggered when an external filter has changed.

    Type Parameters

    • T

      The type of elements being filtered.

    Parameters

    • predictFn: FilterFunction<T>

      A function that takes an element of type T and returns a boolean indicating whether the element satisfies the filter conditions.

    Returns void

  • Retrieves the body row at the specified index.

    Parameters

    • rowIndex: number

      The index of the desired body row.

    Returns any

    • The body row object at the specified index.
  • Retrieves the property of a specific column.

    Parameters

    • columnIndex: number

      The index of the column.

    Returns string

    The property of the column.

  • Retrieves the width (in pixels) of a specific column.

    Parameters

    • columnIndex: number

      The index of the column to get the width of.

    Returns number

    The width of the specified column.

  • Retrieves the width of a given column in the table.

    Parameters

    • columnIndex: number

      The index of the column for which to get the width.

    Returns number

    The width of the column in pixels.

  • Retrieves the height of a specific row in the provided row area.

    Parameters

    • rowAreaIdent: AreaIdent

      The identifier of the row area.

    • rowIndex: number

      The index of the row for which to retrieve the height.

    Returns number

    The height of the specified row in pixels.

  • Returns the x position corresponding to the given column index.

    Parameters

    • columnIndex: number

      The index of the column.

    Returns number

    • The x position corresponding to the given column index.
  • Checks if a column at the specified index is sortable.

    Parameters

    • colIdx: number

      The index of the column to check.

    Returns boolean

    • true if the column is sortable, false otherwise.
  • Recalculates the padding of the element based on its content. This method updates the padding of the element to ensure that its content is properly aligned and displayed.

    Returns void

  • Recalculates the size of the element based on the provided client width.

    Parameters

    • clientWidth: number

      The current client width of the element.

    Returns void

  • Sets the width of a column in the table.

    Parameters

    • columnIndex: number

      The index of the column to set the width for.

    • width: number

      The width to set for the column, in pixels.

    Returns void

Generated using TypeDoc