Package io.jenkins.plugins.datatables
Class TableConfiguration
java.lang.Object
io.jenkins.plugins.datatables.TableConfiguration
Provides a configuration for the whole DataTable. This is merged with a default configuration in table.js.
- Author:
- Andreas Pabst
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic enum
The possible values of the select.style option, which is used for enabling the selection for datatables and setting its style (the default isTableConfiguration.SelectStyle.OS
. -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbuttons()
Enable the default buttons.Enable specific buttons.Enable reordering of table columns.Get the configuration as JSON.boolean
Returns whether buttons were configured to be used.boolean
Returns whether column reordering was configured to be used.boolean
Returns whether paging is configured to be used.boolean
Returns whether the responsive extension was configured to be used.boolean
Returns whether select is configured to be used.boolean
Returns whether stateSave is configured to be used.noPaging()
Disable paging.Make the table responsive, i.e.select
(TableConfiguration.SelectStyle selectStyle) Enable selection.Enable saving of the table state.
-
Constructor Details
-
TableConfiguration
public TableConfiguration()
-
-
Method Details
-
responsive
Make the table responsive, i.e. the columns wrap over to a child column.- Returns:
- this
TableConfiguration
for chaining methods - See Also:
-
isUseResponsive
public boolean isUseResponsive()Returns whether the responsive extension was configured to be used.- Returns:
- true, if the responsive extension should be used, false otherwise
-
colReorder
Enable reordering of table columns.- Returns:
- this
TableConfiguration
for chaining methods - See Also:
-
isUseColReorder
public boolean isUseColReorder()Returns whether column reordering was configured to be used.- Returns:
- true, if column reordering should be used, false otherwise
-
buttons
Enable the default buttons.- Returns:
- this
TableConfiguration
for chaining methods - See Also:
-
buttons
Enable specific buttons.- Parameters:
types
- List of buttons to use- Returns:
- this
TableConfiguration
for chaining methods - See Also:
-
isUseButtons
public boolean isUseButtons()Returns whether buttons were configured to be used.- Returns:
- true, if buttons should be used, false otherwise
-
select
Enable selection.- Parameters:
selectStyle
- Theselection style
- Returns:
- this
TableConfiguration
for chaining methods - See Also:
-
isUseSelect
public boolean isUseSelect()Returns whether select is configured to be used.- Returns:
- true, if select should be used, false otherwise
-
stateSave
Enable saving of the table state.- Returns:
- this
TableConfiguration
for chaining methods - See Also:
-
isUseStateSave
public boolean isUseStateSave()Returns whether stateSave is configured to be used.- Returns:
- true, if stateSave should be used, false otherwise
-
noPaging
Disable paging.- Returns:
- this
TableConfiguration
for chaining methods - See Also:
-
isUsePaging
public boolean isUsePaging()Returns whether paging is configured to be used.- Returns:
- true, if paging should be used, false otherwise.
-
getConfiguration
Get the configuration as JSON.- Returns:
- a JSON Object with the configuration
-