Interface GridLayoutManager

All Superinterfaces:
Cloneable, Copyable, DictionaryBean, LayoutManager, LifecycleElement, Serializable, UifDictionaryBean
All Known Implementing Classes:
GridLayoutManagerBase

public interface GridLayoutManager extends LayoutManager
Layout manager interface for grid layouts.
Author:
Kuali Rice Team (rice.collab@kuali.org)
  • Method Details

    • getNumberOfColumns

      int getNumberOfColumns()
      Indicates the number of columns that should make up one row of data

      If the item count is greater than the number of columns, a new row will be created to render the remaining items (and so on until all items are placed).

      Note this does not include any generated columns by the layout manager, so the final column count could be greater (if label fields are separate).

      Returns:
      int
    • setNumberOfColumns

      void setNumberOfColumns(int numberOfColumns)
      Setter for the number of columns (each row)
      Parameters:
      numberOfColumns -
    • isSuppressLineWrapping

      boolean isSuppressLineWrapping()
      Indicates whether the number of columns for the table data should match the number of fields given in the container's items list (so that each field takes up one column without wrapping), this overrides the configured numberOfColumns

      If set to true during the initialize phase the number of columns will be set to the size of the container's field list, if false the configured number of columns is used

      Returns:
      true if the column count should match the container's field count, false to use the configured number of columns
    • setSuppressLineWrapping

      void setSuppressLineWrapping(boolean suppressLineWrapping)
      Setter for the suppressLineWrapping indicator
      Parameters:
      suppressLineWrapping -
    • isApplyAlternatingRowStyles

      boolean isApplyAlternatingRowStyles()
      Indicates whether alternating row styles should be applied

      Indicator to layout manager templates to apply alternating row styles. See the configured template for the actual style classes used

      Returns:
      true if alternating styles should be applied, false if all rows should have the same style
    • setApplyAlternatingRowStyles

      void setApplyAlternatingRowStyles(boolean applyAlternatingRowStyles)
      Setter for the alternating row styles indicator
      Parameters:
      applyAlternatingRowStyles -
    • isApplyDefaultCellWidths

      boolean isApplyDefaultCellWidths()
      Indicates whether the manager should default the cell widths

      If true, the manager will set the cell width by equally dividing by the number of columns

      Returns:
      true if default cell widths should be applied, false if no defaults should be applied
    • setApplyDefaultCellWidths

      void setApplyDefaultCellWidths(boolean applyDefaultCellWidths)
      Setter for the default cell width indicator
      Parameters:
      applyDefaultCellWidths -
    • isRenderRowFirstCellHeader

      boolean isRenderRowFirstCellHeader()
      Indicates whether the first cell of each row should be rendered as a header cell (th)

      When this flag is turned on, the first cell for each row will be rendered as a header cell. If isRenderAlternatingHeaderColumns() is false, the remaining cells for the row will be rendered as data cells, else they will alternate between cell headers

      Returns:
      true if first cell of each row should be rendered as a header cell
    • setRenderRowFirstCellHeader

      void setRenderRowFirstCellHeader(boolean renderRowFirstCellHeader)
      Setter for render first row column as header indicator
      Parameters:
      renderRowFirstCellHeader -
    • isRenderFirstRowHeader

      boolean isRenderFirstRowHeader()
      Indicates whether the first row of items rendered should all be rendered as table header (th) cells

      Generally when using a grid layout all the cells will be tds or alternating th/td (with the label in the th cell). However in some cases it might be desired to display the labels in one row as table header cells (th) followed by a row with the corresponding fields in td cells. When this is enabled this type of layout is possible

      Returns:
      true if first row should be rendered as header cells
    • setRenderFirstRowHeader

      void setRenderFirstRowHeader(boolean renderFirstRowHeader)
      Setter for the first row as header indicator
      Parameters:
      renderFirstRowHeader -
    • isRenderAlternatingHeaderColumns

      boolean isRenderAlternatingHeaderColumns()
      Indicates whether header columns (th for tables) should be rendered for every other item (alternating)

      If true the first cell of each row will be rendered as an header, with every other cell in the row as a header

      Returns:
      true if alternating headers should be rendered, false if not
    • setRenderAlternatingHeaderColumns

      void setRenderAlternatingHeaderColumns(boolean renderAlternatingHeaderColumns)
      Setter for the render alternating header columns indicator
      Parameters:
      renderAlternatingHeaderColumns -
    • getRowCssClasses

      List<String> getRowCssClasses()
      List of styles for each row.

      Each entry in the list gives the style for the row with the same index. This style will be added to the <tr> tag when the table rows are rendered in the grid.tag. This is used to store the styles for newly added lines and other special cases like the add item row.

      Returns:
      list of styles for the rows
    • setRowCssClasses

      void setRowCssClasses(List<String> rowCssClasses)
      See Also:
    • getRowDataAttributes

      List<String> getRowDataAttributes()
      List of data attributes for each row.

      Each entry in the list gives the data attributes for the row with the same index. These data attributes will be added to the <tr> tag when the table rows are rendered in the grid.tag. This is used to store the data attributes for newly added lines and other special cases like the add item row.

      Returns:
      list of styles for the rows
    • setRowDataAttributes

      void setRowDataAttributes(List<String> rowDataAttributes)
      See Also: