Package io.jmix.dashboards.utils
Class DashboardLayoutManager
java.lang.Object
io.jmix.dashboards.utils.DashboardLayoutManager
Helper class to create/get info about
DashboardLayout objects.-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptioncreateCssLayout(Boolean responsive, String styleName) Creates aCssLayoutwith specified parameters.createGridArea(int col, int row, GridLayout parent) Creates aGridAreafor a cell located in the specified column and row of specifiedGridLayout.protected GridCellLayoutcreateGridCellLayout(int col, int row, GridLayout parent) createGridLayout(int cols, int rows) Creates aGridLayoutwith specified number of rows and columns.createResponsiveArea(DashboardLayout component) Creates aResponsiveAreawith specified componentcreateResponsiveLayout(int xs, int sm, int md, int lg) Creates aResponsiveLayoutwith specified parameterscreateWidgetLayout(Widget widget, boolean fromTemplate) Creates aWidgetLayoutwith specified widget.getCaption(DashboardLayout layout)
-
Field Details
-
metadata
-
metadataTools
-
messages
-
-
Constructor Details
-
DashboardLayoutManager
public DashboardLayoutManager()
-
-
Method Details
-
createGridLayout
Creates aGridLayoutwith specified number of rows and columns. ChildrenGridAreaare created as well.- Parameters:
cols- number of columnsrows- number of rows- Returns:
- created grid layout
-
createGridArea
Creates aGridAreafor a cell located in the specified column and row of specifiedGridLayout. Nested componentGridCellLayoutis created as well.- Parameters:
col- columnrow- rowparent- parent- Returns:
- created grid area
-
createGridCellLayout
-
createCssLayout
Creates aCssLayoutwith specified parameters.- Parameters:
responsive- specified whether layout should be responsive or notstyleName- style name- Returns:
- created CSS layout
-
createWidgetLayout
Creates aWidgetLayoutwith specified widget.- Parameters:
widget- widgetfromTemplate- specifies whether new layout is created fromWidgetTemplateLayoutor not- Returns:
- created widget layout
-
createResponsiveLayout
Creates aResponsiveLayoutwith specified parameters- Parameters:
xs- number of columns for extra small devicessm- number of columns for small devicesmd- number of columns for medium deviceslg- number of columns for large devices- Returns:
- created responsive layout
-
createResponsiveArea
Creates aResponsiveAreawith specified component- Parameters:
component- layout located in new responsive area- Returns:
- created responsive area
-
getCaption
- Parameters:
layout- dashboard layout- Returns:
- localized caption for specified layout
-