Class TableColumn.ColumnBuilder

java.lang.Object
io.jenkins.plugins.datatables.TableColumn.ColumnBuilder
Enclosing class:
TableColumn

public static class TableColumn.ColumnBuilder extends Object
Builder for TableColumn instances.
  • Constructor Details

    • ColumnBuilder

      public ColumnBuilder()
  • Method Details

    • withType

      public TableColumn.ColumnBuilder withType(TableColumn.ColumnType columnType)
      Sets the data type of the column.
      Parameters:
      columnType - type of the column
      Returns:
      this
      See Also:
    • withDataPropertyKey

      public TableColumn.ColumnBuilder withDataPropertyKey(String dataPropertyKey)
      Sets the key of the JSON property in the corresponding row entities that should be shown in this column.
      Parameters:
      dataPropertyKey - name of the property in the corresponding row entity that should be shown in this column
      Returns:
      this
    • withResponsivePriority

      public TableColumn.ColumnBuilder withResponsivePriority(int priority)
      Sets the priority of this column. This priority will be evaluated when the table is created with the responsive option enabled. In this case the columns will automatically hide columns in a table so that the table fits horizontally into the space given to it. If not set, the DataTables default of DEFAULT_PRIORITY will be used.
      Parameters:
      priority - the priority of this column
      Returns:
      this column
      See Also:
    • withHeaderLabel

      public TableColumn.ColumnBuilder withHeaderLabel(String headerLabel)
      Sets the label of the header for this column. This header will be used as text in the <th> tag of the corresponding table.
      Parameters:
      headerLabel - label of the column
      Returns:
      this
    • withHeaderClass

      public TableColumn.ColumnBuilder withHeaderClass(TableColumn.ColumnCss headerClass)
      Sets the CSS class for the column <th> tag.
      Parameters:
      headerClass - the CSS class(es) for the <th> tag
      Returns:
      this column
    • withDetailedCell

      public TableColumn.ColumnBuilder withDetailedCell()
      Enables the rendering of cells that use the DetailedCell format. Such cells can use different properties to sort and display the cell values.
      Returns:
      this column
    • build

      public TableColumn build()
      Creates a new TableColumn based on the specified builder configuration.
      Returns:
      the created TableColumn
      Throws:
      IllegalArgumentException - if the configuration is invalid