Class FlowLayout
java.lang.Object
com.vaadin.featurepack.desktop.layouts.AbstractLayout
com.vaadin.featurepack.desktop.layouts.FlowLayout
- All Implemented Interfaces:
Serializable
Flow layout arranges components in a directional flow.
- Author:
- Vaadin Ltd
- See Also:
-
Constructor Summary
ConstructorsConstructorDescriptionConstructs a newFlowLayoutwith a centered alignment and a default 5-pixels horizontal and vertical gap.FlowLayout(int align) Constructs a newFlowLayoutwith the specified alignment and a default 5-pixels horizontal and vertical gap.FlowLayout(int align, int hgap, int vgap) Constructs a newFlowLayoutwith the specified alignment and the indicated horizontal and vertical gaps. -
Method Summary
Modifier and TypeMethodDescriptionintSeeBaseFlowLayoutgetConstraints(com.vaadin.flow.component.Component component) intgetHgap()Returns the horizontal gap between components and between the components and the borders of the container.intgetVgap()Returns the vertical gap between components and between the components and the borders of the container.protected voidonContainerAttach(com.vaadin.flow.component.AttachEvent event) voidsetAlignment(int align) SeeBaseFlowLayoutvoidsetConstraints(com.vaadin.flow.component.Component component, Object constraints) voidsetContainer(com.vaadin.flow.component.Component container) voidsetHgap(int hgap) Sets the horizontal gap between components and between the components and the borders of the container.voidsetVgap(int vgap) Sets the vertical gap between components and between the components and the borders of the container.Methods inherited from class com.vaadin.featurepack.desktop.layouts.AbstractLayout
addComponent, getComponents, getContainer, onContainerDetach, removeComponent
-
Constructor Details
-
FlowLayout
public FlowLayout()Constructs a newFlowLayoutwith a centered alignment and a default 5-pixels horizontal and vertical gap. -
FlowLayout
public FlowLayout(int align) Constructs a newFlowLayoutwith the specified alignment and a default 5-pixels horizontal and vertical gap.- Parameters:
align- the alignment value
-
FlowLayout
public FlowLayout(int align, int hgap, int vgap) Constructs a newFlowLayoutwith the specified alignment and the indicated horizontal and vertical gaps.- Parameters:
align- the alignment valuehgap- the horizontal gap between components and between the components and the borders of the containervgap- the vertical gap between components and between the components and the borders of the container
-
-
Method Details
-
onContainerAttach
protected void onContainerAttach(com.vaadin.flow.component.AttachEvent event) - Overrides:
onContainerAttachin classAbstractLayout
-
setContainer
public void setContainer(com.vaadin.flow.component.Component container) - Overrides:
setContainerin classAbstractLayout
-
getHgap
public int getHgap()Returns the horizontal gap between components and between the components and the borders of the container.- Returns:
- the horizontal gap between components and between the components and the borders of the container
-
setHgap
public void setHgap(int hgap) Sets the horizontal gap between components and between the components and the borders of the container.- Parameters:
hgap- the horizontal gap between components and between the components and the borders of the container
-
getVgap
public int getVgap()Returns the vertical gap between components and between the components and the borders of the container.- Returns:
- the vertical gap between components and between the components and the borders of the container
-
setVgap
public void setVgap(int vgap) Sets the vertical gap between components and between the components and the borders of the container.- Parameters:
vgap- the vertical gap between components and between the components and the borders of the container
-
setConstraints
- Specified by:
setConstraintsin classAbstractLayout- Throws:
UnsupportedOperationException- FlowLayout does not support constraints
-
getConstraints
- Specified by:
getConstraintsin classAbstractLayout- Throws:
UnsupportedOperationException- FlowLayout does not support constraints
-
setAlignment
public void setAlignment(int align) SeeBaseFlowLayout- Parameters:
align-
-
getAlignment
public int getAlignment()SeeBaseFlowLayout- Parameters:
align-
-