Class CssGridLayoutManagerBase

All Implemented Interfaces:
Serializable, Cloneable, Copyable, DictionaryBean, UifDictionaryBean, LayoutManager, LifecycleElement
Direct Known Subclasses:
CssGridLabelColumnLayoutManager, CssGridLayoutManager

public abstract class CssGridLayoutManagerBase extends LayoutManagerBase
Css Grid Layout managers are a layout managers which creates div "rows" and "cells" to replicate a table look by using div elements for its items.
Author:
Kuali Rice Team (rice.collab@kuali.org)
See Also:
  • Field Details

    • NUMBER_OF_COLUMNS

      protected static final int NUMBER_OF_COLUMNS
      See Also:
    • BOOTSTRAP_SPAN_PREFIX

      protected static final String BOOTSTRAP_SPAN_PREFIX
      See Also:
    • cellItems

      protected List<Component> cellItems
    • cellCssClassAttributes

      protected List<String> cellCssClassAttributes
    • xsTotalSize

      protected int xsTotalSize
    • smTotalSize

      protected int smTotalSize
    • mdTotalSize

      protected int mdTotalSize
    • lgTotalSize

      protected int lgTotalSize
  • Constructor Details

    • CssGridLayoutManagerBase

      public CssGridLayoutManagerBase()
  • Method Details

    • calculateCssClassAndSize

      protected void calculateCssClassAndSize(Component item, List<String> cellCssClasses, CssGridSizes defaultSizes, int basicSize)
      Determines the css class(es) and based on what settings the item, defaultSizes and basicSize have

      Priority of what sizes to apply are as follows: 1. cssGridSizes on the item itself 2. Sizes in the defaultSizes object 3. basicSize passed in the if the above two contain no settings, defaults to md (medium) col size

      Parameters:
      item - the item to process classes for
      cellCssClasses - the list of classes to add the new class string to
      defaultSizes - the default fallback sizes to use if items have none
      basicSize - the fallback md size to use if both item and default size have none
    • addLeftClearCssClass

      protected void addLeftClearCssClass(List<String> cellCssClasses)
      Adds a class (or classeees) which will clear the left float for wrapped content at each screen size, which will prevent natural float from taking available space instead of wrapping to a new "row".
      Parameters:
      cellCssClasses - the set of css classes to add the left clear class to
    • getCellStyleClassesAsString

      protected String getCellStyleClassesAsString(List<String> cellCssClasses)
      Builds the HTML class attribute string by combining the cellStyleClasses list with a space delimiter
      Parameters:
      cellCssClasses - list of cell CSS classes
      Returns:
      class attribute string
    • getCellItems

      @ViewLifecycleRestriction public List<Component> getCellItems()
      Get the items which will make up each "cell" divs of this css grid layout, these divs will have appropriate css class applied to them based on the values stored in cellCssClassAttributes
      Returns:
      the items of this cssGrid
    • getCellCssClassAttributes

      public List<String> getCellCssClassAttributes()
      List of css class HTML attribute values ordered by the order in which the cell appears
      Returns:
      the list of css class HTML attributes for cells