Class TableConfiguration

java.lang.Object
io.jenkins.plugins.datatables.TableConfiguration

public class TableConfiguration extends Object
Provides a configuration for the whole DataTable. This is merged with a default configuration in table.js.
Author:
Andreas Pabst
  • Constructor Details

    • TableConfiguration

      public TableConfiguration()
  • Method Details

    • responsive

      public TableConfiguration 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

      public TableConfiguration 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

      public TableConfiguration buttons()
      Enable the default buttons.
      Returns:
      this TableConfiguration for chaining methods
      See Also:
    • buttons

      public TableConfiguration buttons(String... types)
      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 - The selection 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

      public TableConfiguration 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

      public TableConfiguration 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.
    • optimalPageLength

      public TableConfiguration optimalPageLength()
      Enable the page length option "Optimal". This option is the first entry of the page length menu and is selected by default. Its value is computed in the browser: the table shows as many rows as fit into the browser window without scrolling the page. The other entries of the page length menu are 25, 50, and 100 rows. If the state of the table is saved (see stateSave()), then the selection of the option "Optimal" is saved as well, so that the number of rows will be computed again for the next visit.
      Returns:
      this TableConfiguration for chaining methods
    • isUseOptimalPageLength

      public boolean isUseOptimalPageLength()
      Returns whether the page length option "Optimal" is configured to be used.
      Returns:
      true, if the page length is computed from the size of the browser window, false otherwise
    • getConfiguration

      public String getConfiguration()
      Get the configuration as JSON.
      Returns:
      a JSON Object with the configuration