Package io.jenkins.plugins.datatables
Class TableColumn.ColumnBuilder
java.lang.Object
io.jenkins.plugins.datatables.TableColumn.ColumnBuilder
- Enclosing class:
TableColumn
Builder for
TableColumn
instances.-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbuild()
Creates a newTableColumn
based on the specified builder configuration.withDataPropertyKey
(String dataPropertyKey) Sets the key of the JSON property in the corresponding row entities that should be shown in this column.Enables the rendering of cells that use theDetailedCell
format.withHeaderClass
(TableColumn.ColumnCss headerClass) Sets the CSS class for the column<th>
tag.withHeaderLabel
(String headerLabel) Sets the label of the header for this column.withResponsivePriority
(int priority) Sets the priority of this column.withType
(TableColumn.ColumnType columnType) Sets the data type of the column.
-
Constructor Details
-
ColumnBuilder
public ColumnBuilder()
-
-
Method Details
-
withType
Sets the data type of the column.- Parameters:
columnType
- type of the column- Returns:
- this
- See Also:
-
withDataPropertyKey
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
Sets the priority of this column. This priority will be evaluated when the table is created with theresponsive
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 ofDEFAULT_PRIORITY
will be used.- Parameters:
priority
- the priority of this column- Returns:
- this column
- See Also:
-
withHeaderLabel
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
Sets the CSS class for the column<th>
tag.- Parameters:
headerClass
- the CSS class(es) for the<th>
tag- Returns:
- this column
-
withDetailedCell
Enables the rendering of cells that use theDetailedCell
format. Such cells can use different properties to sort and display the cell values.- Returns:
- this column
-
build
Creates a newTableColumn
based on the specified builder configuration.- Returns:
- the created
TableColumn
- Throws:
IllegalArgumentException
- if the configuration is invalid
-