com.vaadin.flow.component.orderedlayout.
Class FlexLayout
- java.lang.Object
-
- com.vaadin.flow.component.Component
-
- com.vaadin.flow.component.orderedlayout.FlexLayout
-
All Implemented Interfaces:
AttachNotifier, ClickNotifier<FlexLayout>, DetachNotifier, HasComponents, HasElement, HasEnabled, HasOrderedComponents<FlexLayout>, HasSize, HasStyle, FlexComponent<FlexLayout>, Serializable
@Tag(value="div") public class FlexLayout extends Component implements FlexComponent<FlexLayout>, ClickNotifier<FlexLayout>
A layout component that implements Flexbox. It uses the default flex-direction and doesn't have any predetermined width or height.
This component can be used as a base class for more advanced layouts.
See Also:
-
-
Nested Class Summary
Nested Classes Modifier and Type Class and Description static class
FlexLayout.WrapMode
Possible values for the
flex-wrap
CSS property, which determines how the elements inside the layout should behave when they don't fit inside the layout.-
Nested classes/interfaces inherited from interface com.vaadin.flow.component.orderedlayout.FlexComponent
FlexComponent.Alignment, FlexComponent.JustifyContentMode
-
-
Constructor Summary
Constructors Constructor and Description FlexLayout()
Default constructor.
FlexLayout(Component... children)
Convenience constructor to create a layout with the children already inside it.
-
Method Summary
All Methods Modifier and Type Method and Description FlexLayout.WrapMode
getWrapMode()
Gets the current flex wrap mode of the layout.
void
setWrapMode(FlexLayout.WrapMode wrapMode)
Gets the
FlexLayout.WrapMode
used by this layout.-
Methods inherited from class com.vaadin.flow.component.Component
addListener, fireEvent, from, get, getChildren, getElement, getEventBus, getId, getLocale, getParent, getTranslation, getTranslation, getUI, hasListener, isTemplateMapped, isVisible, onAttach, onDetach, onEnabledStateChanged, set, setElement, setId, setVisible
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface com.vaadin.flow.component.orderedlayout.FlexComponent
expand, getAlignItems, getAlignSelf, getFlexGrow, getJustifyContentMode, replace, setAlignItems, setAlignSelf, setFlexGrow, setJustifyContentMode
-
Methods inherited from interface com.vaadin.flow.component.HasOrderedComponents
getComponentAt, getComponentCount, indexOf
-
Methods inherited from interface com.vaadin.flow.component.HasComponents
add, add, addComponentAsFirst, addComponentAtIndex, remove, removeAll
-
Methods inherited from interface com.vaadin.flow.component.HasEnabled
isEnabled, setEnabled
-
Methods inherited from interface com.vaadin.flow.component.HasElement
getElement
-
Methods inherited from interface com.vaadin.flow.component.HasStyle
addClassName, addClassNames, getClassName, getClassNames, getStyle, hasClassName, removeClassName, removeClassNames, setClassName, setClassName
-
Methods inherited from interface com.vaadin.flow.component.HasSize
getHeight, getMaxHeight, getMaxWidth, getMinHeight, getMinWidth, getWidth, setHeight, setHeightFull, setMaxHeight, setMaxWidth, setMinHeight, setMinWidth, setSizeFull, setSizeUndefined, setWidth, setWidthFull
-
Methods inherited from interface com.vaadin.flow.component.ClickNotifier
addClickListener, addClickShortcut
-
Methods inherited from interface com.vaadin.flow.component.AttachNotifier
addAttachListener
-
Methods inherited from interface com.vaadin.flow.component.DetachNotifier
addDetachListener
-
-
-
-
Constructor Detail
-
FlexLayout
public FlexLayout()
Default constructor. Creates an empty layout.
-
FlexLayout
public FlexLayout(Component... children)
Convenience constructor to create a layout with the children already inside it.
Parameters:
children
- the items to add to this layoutSee Also:
-
-
Method Detail
-
setWrapMode
public void setWrapMode(FlexLayout.WrapMode wrapMode)
Gets the
FlexLayout.WrapMode
used by this layout.The default flex wrap mode is
FlexLayout.WrapMode.NOWRAP
.Parameters:
wrapMode
- the flex wrap mode of the layout, nevernull
-
getWrapMode
public FlexLayout.WrapMode getWrapMode()
Gets the current flex wrap mode of the layout.
The default flex wrap mode is
FlexLayout.WrapMode.NOWRAP
.Returns:
the flex wrap mode used by the layout, never
null
-
-