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
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptioncreateCssLayout
(Boolean responsive, String styleName) Creates aCssLayout
with specified parameters.createGridArea
(int col, int row, GridLayout parent) Creates aGridArea
for a cell located in the specified column and row of specifiedGridLayout
.protected GridCellLayout
createGridCellLayout
(int col, int row, GridLayout parent) createGridLayout
(int cols, int rows) Creates aGridLayout
with specified number of rows and columns.createResponsiveArea
(DashboardLayout component) Creates aResponsiveArea
with specified componentcreateResponsiveLayout
(int xs, int sm, int md, int lg) Creates aResponsiveLayout
with specified parameterscreateWidgetLayout
(Widget widget, boolean fromTemplate) Creates aWidgetLayout
with specified widget.getCaption
(DashboardLayout layout)
-
Field Details
-
metadata
-
metadataTools
-
messages
-
-
Constructor Details
-
DashboardLayoutManager
public DashboardLayoutManager()
-
-
Method Details
-
createGridLayout
Creates aGridLayout
with specified number of rows and columns. ChildrenGridArea
are created as well.- Parameters:
cols
- number of columnsrows
- number of rows- Returns:
- created grid layout
-
createGridArea
Creates aGridArea
for a cell located in the specified column and row of specifiedGridLayout
. Nested componentGridCellLayout
is created as well.- Parameters:
col
- columnrow
- rowparent
- parent- Returns:
- created grid area
-
createGridCellLayout
-
createCssLayout
Creates aCssLayout
with specified parameters.- Parameters:
responsive
- specified whether layout should be responsive or notstyleName
- style name- Returns:
- created CSS layout
-
createWidgetLayout
Creates aWidgetLayout
with specified widget.- Parameters:
widget
- widgetfromTemplate
- specifies whether new layout is created fromWidgetTemplateLayout
or not- Returns:
- created widget layout
-
createResponsiveLayout
Creates aResponsiveLayout
with 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 aResponsiveArea
with 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
-