Package io.jmix.ui.component
Interface GridLayout
- All Superinterfaces:
Component,Component.BelongToFrame,Component.HasCaption,Component.HasDescription,Component.HasIcon,ComponentContainer,HasComponents,HasContextHelp,HasHtmlCaption,HasHtmlDescription,HasHtmlSanitizer,HasMargin,HasRequiredIndicator,HasSpacing,LayoutClickNotifier,ShortcutNotifier
- All Known Implementing Classes:
GridLayoutImpl
@StudioComponent(caption="GridLayout",
category="Containers",
xmlElement="gridLayout",
icon="io/jmix/ui/icon/container/gridLayout.svg",
canvasBehaviour=CONTAINER,
containerType=GRID,
documentationURL="https://docs.jmix.io/jmix/%VERSION%/ui/vcl/containers/grid-layout.html")
public interface GridLayout
extends ComponentContainer, HasSpacing, HasMargin, Component.BelongToFrame, Component.HasIcon, Component.HasCaption, HasContextHelp, LayoutClickNotifier, ShortcutNotifier, HasHtmlCaption, HasHtmlDescription, HasRequiredIndicator, HasHtmlSanitizer
A layout where the components are laid out on a grid using cell coordinates.
-
Nested Class Summary
Nested ClassesModifier and TypeInterfaceDescriptionstatic classDefines a rectangular area of cells in a GridLayout.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.WrapperNested classes/interfaces inherited from interface io.jmix.ui.component.HasContextHelp
HasContextHelp.ContextHelpIconClickEventNested classes/interfaces inherited from interface io.jmix.ui.component.LayoutClickNotifier
LayoutClickNotifier.LayoutClickEvent -
Field Summary
FieldsFields inherited from interface io.jmix.ui.component.Component
AUTO_SIZE, AUTO_SIZE_PX, FULL_SIZE -
Method Summary
Modifier and TypeMethodDescriptionvoidvoidfloatgetColumnExpandRatio(int col) intgetComponent(int columnIndex, int rowIndex) Gets the Component at given row and column.getComponentArea(Component component) Returns information about the area where given component is laid in the GridLayout.default ComponentgetComponentNN(int columnIndex, int rowIndex) Gets the Component at given row and column.floatgetRowExpandRatio(int row) intgetRows()voidsetColumnExpandRatio(int col, float ratio) voidsetColumns(int columns) voidsetRowExpandRatio(int row, float ratio) voidsetRows(int rows) 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, withUnwrappedCompositionMethods inherited from interface io.jmix.ui.component.Component.BelongToFrame
getFrame, setFrameMethods inherited from interface io.jmix.ui.component.Component.HasCaption
getCaption, setCaptionMethods inherited from interface io.jmix.ui.component.Component.HasDescription
getDescription, setDescriptionMethods inherited from interface io.jmix.ui.component.Component.HasIcon
getIcon, setIcon, setIconFromSetMethods inherited from interface io.jmix.ui.component.ComponentContainer
add, add, remove, remove, removeAllMethods inherited from interface io.jmix.ui.component.HasComponents
focusFirstComponent, getComponent, getComponentNN, getComponents, getOwnComponent, getOwnComponents, getOwnComponentsStreamMethods inherited from interface io.jmix.ui.component.HasContextHelp
getContextHelpIconClickHandler, getContextHelpText, isContextHelpTextHtmlEnabled, setContextHelpIconClickHandler, setContextHelpText, setContextHelpTextHtmlEnabledMethods inherited from interface io.jmix.ui.component.HasHtmlCaption
isCaptionAsHtml, setCaptionAsHtmlMethods inherited from interface io.jmix.ui.component.HasHtmlDescription
isDescriptionAsHtml, setDescriptionAsHtmlMethods inherited from interface io.jmix.ui.component.HasHtmlSanitizer
isHtmlSanitizerEnabled, setHtmlSanitizerEnabledMethods inherited from interface io.jmix.ui.component.HasMargin
getMargin, setMargin, setMargin, setMarginMethods inherited from interface io.jmix.ui.component.HasRequiredIndicator
isRequiredIndicatorVisible, setRequiredIndicatorVisibleMethods inherited from interface io.jmix.ui.component.HasSpacing
getSpacing, setSpacingMethods inherited from interface io.jmix.ui.component.LayoutClickNotifier
addLayoutClickListenerMethods inherited from interface io.jmix.ui.component.ShortcutNotifier
addShortcutAction, removeShortcutAction
-
Field Details
-
NAME
- See Also:
-
-
Method Details
-
getColumnExpandRatio
float getColumnExpandRatio(int col) -
setColumnExpandRatio
void setColumnExpandRatio(int col, float ratio) -
getRowExpandRatio
float getRowExpandRatio(int row) -
setRowExpandRatio
void setRowExpandRatio(int row, float ratio) -
add
-
add
-
getRows
int getRows() -
setRows
void setRows(int rows) -
getColumns
int getColumns() -
setColumns
void setColumns(int columns) -
getComponent
Gets the Component at given row and column.- Parameters:
columnIndex- the column index, starting from 0 for the leftmost column.rowIndex- the row index, starting from 0 for the topmost row.- Returns:
- Component in given cell or null if empty
-
getComponentNN
Gets the Component at given row and column.- Parameters:
columnIndex- the column index, starting from 0 for the leftmost column.rowIndex- the row index, starting from 0 for the topmost row.- Returns:
- component. Throws exception if not found.
-
getComponentArea
Returns information about the area where given component is laid in the GridLayout.- Parameters:
component- the component whose area information is requested.- Returns:
- an Area object that contains information how component is laid in the grid
-