Package com.storedobject.vaadin
Class GridLayout
java.lang.Object
com.vaadin.flow.component.Component
com.storedobject.vaadin.CSSGrid
com.storedobject.vaadin.GridLayout
- All Implemented Interfaces:
HasSize,HasStyle,com.vaadin.flow.component.AttachNotifier,com.vaadin.flow.component.DetachNotifier,com.vaadin.flow.component.HasComponents,com.vaadin.flow.component.HasElement,com.vaadin.flow.component.HasEnabled,com.vaadin.flow.component.HasOrderedComponents,com.vaadin.flow.component.HasSize,com.vaadin.flow.component.HasStyle,Serializable
A layout for arranging components in a grid style. Only columns (just the count or sizes) can be specified.
When more components are added, it will wrap to the next rows if the column count exceeds the specified limit.
- Author:
- Syam
- See Also:
-
Nested Class Summary
Nested classes/interfaces inherited from class com.storedobject.vaadin.CSSGrid
CSSGrid.Position -
Constructor Summary
ConstructorsConstructorDescriptionGridLayout(int numberOfColumns) Constructor.GridLayout(int... columnSizes) Constructor.GridLayout(String... columnSizes) Constructor. -
Method Summary
Modifier and TypeMethodDescriptionvoidsetColumns(int numberOfColumns) Set equally sized columns.voidsetColumnSizes(int... sizes) Set column sizes.voidsetColumnSizes(String... sizes) Set column sizes.Methods inherited from class com.storedobject.vaadin.CSSGrid
align, center, getColumnSpan, getRowSpan, justify, setColumnGap, setColumnGap, setColumnSpan, setGap, setGap, setRowGap, setRowGap, setRowSpan, styleMethods inherited from class com.vaadin.flow.component.Component
addListener, findAncestor, fireEvent, from, get, getChildren, getElement, getEventBus, getId, getListeners, getLocale, getParent, getTranslation, getTranslation, getTranslation, getTranslation, getTranslation, getTranslation, getUI, hasListener, isAttached, isTemplateMapped, isVisible, onAttach, onDetach, onEnabledStateChanged, removeFromParent, scrollIntoView, scrollIntoView, set, setElement, setId, setVisibleMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface com.vaadin.flow.component.AttachNotifier
addAttachListenerMethods inherited from interface com.vaadin.flow.component.DetachNotifier
addDetachListenerMethods inherited from interface com.vaadin.flow.component.HasComponents
add, add, add, addComponentAsFirst, addComponentAtIndex, remove, remove, removeAllMethods inherited from interface com.vaadin.flow.component.HasElement
getElementMethods inherited from interface com.vaadin.flow.component.HasEnabled
isEnabled, setEnabledMethods inherited from interface com.vaadin.flow.component.HasOrderedComponents
getChildren, getComponentAt, getComponentCount, indexOf, replaceMethods inherited from interface com.vaadin.flow.component.HasSize
getHeight, getHeightUnit, getMaxHeight, getMaxWidth, getMinHeight, getMinWidth, getWidth, getWidthUnit, setHeight, setHeightFull, setMaxHeight, setMaxHeight, setMaxWidth, setMaxWidth, setMinHeight, setMinHeight, setMinWidth, setMinWidth, setSizeFull, setSizeUndefined, setWidth, setWidthFullMethods inherited from interface com.storedobject.vaadin.HasStyle
getClassName, getClassNames, getInternalElement, getStyle, setClassNameMethods inherited from interface com.vaadin.flow.component.HasStyle
addClassName, addClassNames, hasClassName, removeClassName, removeClassNames, setClassName
-
Constructor Details
-
GridLayout
public GridLayout(int numberOfColumns) Constructor.- Parameters:
numberOfColumns- Number of equally sized columns
-
GridLayout
public GridLayout(int... columnSizes) Constructor.- Parameters:
columnSizes- Sizes of proportionately sized columns (A zero value set the size to "auto" meaning the size will be automatically determined from the component's size)
-
GridLayout
-
-
Method Details
-
setColumnSizes
-
setColumnSizes
public void setColumnSizes(int... sizes) Set column sizes.- Parameters:
sizes- Sizes of proportionately sized columns (A zero value set the size to "auto" meaning the size will be automatically determined from the component's size)
-
setColumns
public void setColumns(int numberOfColumns) Set equally sized columns.- Parameters:
numberOfColumns- Number of columns to set
-