Package io.jenkins.plugins.datatables
Class TableColumn
java.lang.Object
io.jenkins.plugins.datatables.TableColumn
Provides a model for table columns that are rendered with JQuery DataTables. The model consists of the following
parts:
- header label
- header CSS class
- column definition
- responsive priority
- tooltip
- Author:
- Ullrich Hafner
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic class
Builder forTableColumn
instances.static enum
Supported CSS classes that will enable special handling or rendering for table columns.static enum
Supported DataTables column types. -
Constructor Summary
ConstructorsConstructorDescriptionTableColumn
(String headerLabel, String dataPropertyName) Deprecated.TableColumn
(String headerLabel, String dataPropertyName, String columnDataType) Deprecated. -
Method Summary
Modifier and TypeMethodDescriptionint
getWidth()
Deprecated.it makes more sense to let DataTables decide which columns to showstatic String
renderDetailsColumn
(String detailsText) Renders an expandable details-column with the specified text.static String
renderDetailsColumn
(String detailsText, io.jenkins.plugins.util.JenkinsFacade jenkinsFacade) Renders an expandable details-column with the specified text.setHeaderClass
(TableColumn.ColumnCss headerClass) Deprecated.setWidth
(int width) Deprecated.it makes more sense to let DataTables decide which columns to show
-
Constructor Details
-
TableColumn
Deprecated.Creates a simple column: it maps the specified property of the row entity to the column value.- Parameters:
headerLabel
- the label of the column headerdataPropertyName
- the property to extract from the entity, it will be shown as column value
-
TableColumn
Deprecated.Creates a complex column: it maps the specified property of the row entity to the display and sort attributes of the column. The propertydataPropertyName
must be of typeDetailedCell
.- Parameters:
headerLabel
- the label of the column headerdataPropertyName
- the property to extract from the entity, it will be shown as column valuecolumnDataType
- JQuery DataTables data type of the column
-
-
Method Details
-
renderDetailsColumn
Renders an expandable details-column with the specified text.- Parameters:
detailsText
- the text to show if the column has been expanded.- Returns:
- the HTML div to create the details column
-
renderDetailsColumn
public static String renderDetailsColumn(String detailsText, io.jenkins.plugins.util.JenkinsFacade jenkinsFacade) Renders an expandable details-column with the specified text.- Parameters:
detailsText
- the text to show if the column has been expanded.jenkinsFacade
- facade for Jenkins API calls to get symbols- Returns:
- the HTML div to create the details column
-
setHeaderClass
Deprecated.Sets the CSS class for the column<th>
tag. Multiple classes need to be separated using a space.- Parameters:
headerClass
- the CSS class(es) for the<th>
tag- Returns:
- this column
-
setWidth
Deprecated.it makes more sense to let DataTables decide which columns to showNot supported anymore.- Parameters:
width
- the width- Returns:
- this column
- See Also:
-
getHeaderLabel
-
getHeaderClass
-
getWidth
Deprecated.it makes more sense to let DataTables decide which columns to showReturns the width of the column.- Returns:
- the width
-
getDefinition
-
TableColumn.ColumnBuilder