Package io.jmix.ui.component
Interface ResponsiveGridLayout
- All Superinterfaces:
Component
,Component.BelongToFrame
,HasComponents
,HasHtmlSanitizer
,LayoutClickNotifier
- All Known Implementing Classes:
ResponsiveGridLayoutImpl
@StudioComponent(caption="ResponsiveGridLayout",
category="Containers",
xmlElement="responsiveGridLayout",
icon="io/jmix/ui/icon/container/responsiveGridLayout.svg",
canvasBehaviour=CONTAINER,
containerType=RESPONSIVE_GRID,
unsupportedProperties={"responsive","width"},
documentationURL="https://docs.jmix.io/jmix/%VERSION%/ui/vcl/containers/responsive-grid-layout.html")
public interface ResponsiveGridLayout
extends Component, Component.BelongToFrame, HasComponents, LayoutClickNotifier, HasHtmlSanitizer
A layout where the components are laid out on a grid, based on the Bootstrap's 12 columns grid system.
Each component must be located in the corresponding ResponsiveGridLayout.Column
.
-
Nested Class Summary
Modifier and TypeInterfaceDescriptionstatic enum
Represents the default behavior for how flex items are laid out along the cross axis on the current row.static enum
Represents the default behavior for how individual flex item is laid out along the cross axis.static enum
Breakpoint representing minimum viewport widths used in media query ranges.static interface
Interface defining a grid column.static class
Class containing information about logical columns number that a column occupies.static enum
Container type representing possible basic container styles.static interface
Interface to provide default functionality for grid elements.static enum
Represents the default behavior for how flex items are laid out along the main axis on the current row.static class
Class containing information about the number of columns by which to move a column to the right.static class
Class containing information for controlling the visual order of a column.static interface
Interface defining a grid row.static class
Class containing information about the number of columns in the row.Nested classes/interfaces inherited from interface io.jmix.ui.component.Component
Component.Alignment, Component.BelongToFrame, Component.Disposable, Component.Editable, Component.Focusable, Component.HasCaption, Component.HasDescription, Component.HasIcon, Component.HasXmlDescriptor, Component.Wrapper
Nested classes/interfaces inherited from interface io.jmix.ui.component.LayoutClickNotifier
LayoutClickNotifier.LayoutClickEvent
-
Field Summary
Fields inherited from interface io.jmix.ui.component.Component
AUTO_SIZE, AUTO_SIZE_PX, FULL_SIZE
-
Method Summary
Modifier and TypeMethodDescriptionaddRow()
Creates a newResponsiveGridLayout.Row
and adds it to this responsive grid layout.addRow
(int index) Creates a newResponsiveGridLayout.Row
and adds it to the given position in responsive grid layout.getRows()
void
Removes all rows from this responsive grid layout.void
Removes the given row from this responsive grid layout.void
setContainerType
(ResponsiveGridLayout.ContainerType containerType) Sets the container type.Methods inherited from interface io.jmix.ui.component.Component
addStyleName, getAlignment, getHeight, getHeightSizeUnit, getId, getParent, getStyleName, getWidth, getWidthSizeUnit, isEnabled, isEnabledRecursive, isResponsive, isVisible, isVisibleRecursive, removeStyleName, setAlignment, setEnabled, setHeight, setHeightAuto, setHeightFull, setId, setParent, setResponsive, setSizeAuto, setSizeFull, setStyleName, setVisible, setWidth, setWidthAuto, setWidthFull, unwrap, unwrapComposition, unwrapCompositionOrNull, unwrapOrNull, withUnwrapped, withUnwrappedComposition
Methods inherited from interface io.jmix.ui.component.Component.BelongToFrame
getFrame, setFrame
Methods inherited from interface io.jmix.ui.component.HasComponents
focusFirstComponent, getComponent, getComponentNN, getComponents, getOwnComponent, getOwnComponents, getOwnComponentsStream
Methods inherited from interface io.jmix.ui.component.HasHtmlSanitizer
isHtmlSanitizerEnabled, setHtmlSanitizerEnabled
Methods inherited from interface io.jmix.ui.component.LayoutClickNotifier
addLayoutClickListener
-
Field Details
-
NAME
- See Also:
-
-
Method Details
-
addRow
ResponsiveGridLayout.Row addRow()Creates a newResponsiveGridLayout.Row
and adds it to this responsive grid layout.- Returns:
- the created row
- Throws:
IllegalStateException
- if this responsive grid layout has been shown on a screen
-
addRow
Creates a newResponsiveGridLayout.Row
and adds it to the given position in responsive grid layout.- Parameters:
index
- the position of the new row. The rows that are currently in and after the position are shifted forwards- Returns:
- the created row
- Throws:
IllegalStateException
- if this responsive grid layout has been shown on a screen
-
removeRow
Removes the given row from this responsive grid layout.- Parameters:
row
- the row to be removed- Throws:
IllegalStateException
- if this responsive grid layout has been shown on a screen
-
removeAllRows
void removeAllRows()Removes all rows from this responsive grid layout.- Throws:
IllegalStateException
- if this responsive grid layout has been shown on a screen
-
getRows
List<ResponsiveGridLayout.Row> getRows()- Returns:
- a list of contained rows
-
getContainerType
ResponsiveGridLayout.ContainerType getContainerType()- Returns:
- the container type, not
null
-
setContainerType
@StudioProperty(type=ENUMERATION, defaultValue="FLUID", options={"FLUID","FIXED"}) void setContainerType(ResponsiveGridLayout.ContainerType containerType) Sets the container type.The built-in container types are:
ResponsiveGridLayout.ContainerType.FLUID
- a full width container, spanning the entire width of the viewport. Used by default.ResponsiveGridLayout.ContainerType.FIXED
- a fixed-width container, meaning itsmax-width
changes at each breakpoint.
- Parameters:
containerType
- the container type to switch to, notnull
- Throws:
IllegalStateException
- if this responsive grid layout has been shown on a screen
-