Class DashboardLayoutManager

java.lang.Object
io.jmix.dashboards.utils.DashboardLayoutManager

@Component("dshbrd_DashboardLayoutManager") public class DashboardLayoutManager extends Object
Helper class to create/get info about DashboardLayout objects.
  • Field Details

    • metadata

      @Autowired protected Metadata metadata
    • metadataTools

      @Autowired protected MetadataTools metadataTools
    • messages

      @Autowired protected Messages messages
  • Constructor Details

    • DashboardLayoutManager

      public DashboardLayoutManager()
  • Method Details

    • createGridLayout

      public GridLayout createGridLayout(int cols, int rows)
      Creates a GridLayout with specified number of rows and columns. Children GridArea are created as well.
      Parameters:
      cols - number of columns
      rows - number of rows
      Returns:
      created grid layout
    • createGridArea

      public GridArea createGridArea(int col, int row, GridLayout parent)
      Creates a GridArea for a cell located in the specified column and row of specified GridLayout. Nested component GridCellLayout is created as well.
      Parameters:
      col - column
      row - row
      parent - parent
      Returns:
      created grid area
    • createGridCellLayout

      protected GridCellLayout createGridCellLayout(int col, int row, GridLayout parent)
    • createCssLayout

      public CssLayout createCssLayout(Boolean responsive, String styleName)
      Creates a CssLayout with specified parameters.
      Parameters:
      responsive - specified whether layout should be responsive or not
      styleName - style name
      Returns:
      created CSS layout
    • createWidgetLayout

      public WidgetLayout createWidgetLayout(Widget widget, boolean fromTemplate)
      Creates a WidgetLayout with specified widget.
      Parameters:
      widget - widget
      fromTemplate - specifies whether new layout is created from WidgetTemplateLayout or not
      Returns:
      created widget layout
    • createResponsiveLayout

      public ResponsiveLayout createResponsiveLayout(int xs, int sm, int md, int lg)
      Creates a ResponsiveLayout with specified parameters
      Parameters:
      xs - number of columns for extra small devices
      sm - number of columns for small devices
      md - number of columns for medium devices
      lg - number of columns for large devices
      Returns:
      created responsive layout
    • createResponsiveArea

      public ResponsiveArea createResponsiveArea(DashboardLayout component)
      Creates a ResponsiveArea with specified component
      Parameters:
      component - layout located in new responsive area
      Returns:
      created responsive area
    • getCaption

      public String getCaption(DashboardLayout layout)
      Parameters:
      layout - dashboard layout
      Returns:
      localized caption for specified layout