Class BaseFlowLayout
java.lang.Object
com.vaadin.featurepack.desktop.layouts.BaseFlowLayout
- All Implemented Interfaces:
Serializable
Flow layout arranges components in a directional flow.
- Author:
- Vaadin Ltd
- See Also:
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final intThis value indicates that each row of components should be centered.protected intstatic final intThis value indicates that each row of components should be justified to the start of the container (for left-to-right direction, it is the left edge).static final intThis value indicates that each row of components should be justified to the end of the container (for left-to-right direction, it is the right edge).protected int -
Constructor Summary
ConstructorsConstructorDescriptionConstructs a newFlowLayoutwith a centered alignment and a default 5-pixels horizontal and vertical gap.BaseFlowLayout(int align) Constructs a newFlowLayoutwith the specified alignment and a default 5-pixels horizontal and vertical gap.BaseFlowLayout(int align, int hgap, int vgap) Constructs a newFlowLayoutwith the specified alignment and the indicated horizontal and vertical gaps. -
Method Summary
Modifier and TypeMethodDescriptionintGets the alignment for this layout.protected intprotected intprotected voidsetAlignment(int align, com.vaadin.flow.component.Component container) Sets the alignment for this layout.protected voidsetHorizontalGap(int horizontalGap) protected voidsetVerticalGap(int verticalGap) protected voidupdateAlignment(com.vaadin.flow.component.Component container)
-
Field Details
-
horizontalGap
protected int horizontalGap -
verticalGap
protected int verticalGap -
CENTER
public static final int CENTERThis value indicates that each row of components should be centered.- See Also:
-
LEADING
public static final int LEADINGThis value indicates that each row of components should be justified to the start of the container (for left-to-right direction, it is the left edge).- See Also:
-
TRAILING
public static final int TRAILINGThis value indicates that each row of components should be justified to the end of the container (for left-to-right direction, it is the right edge).- See Also:
-
-
Constructor Details
-
BaseFlowLayout
public BaseFlowLayout()Constructs a newFlowLayoutwith a centered alignment and a default 5-pixels horizontal and vertical gap. -
BaseFlowLayout
public BaseFlowLayout(int align) Constructs a newFlowLayoutwith the specified alignment and a default 5-pixels horizontal and vertical gap.- Parameters:
align- the alignment value
-
BaseFlowLayout
public BaseFlowLayout(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
-
getAlignment
public int getAlignment()Gets the alignment for this layout. Possible values areFlowLayout.LEADING,FlowLayout.CENTER, orFlowLayout.TRAILING. -
setAlignment
protected void setAlignment(int align, com.vaadin.flow.component.Component container) Sets the alignment for this layout. Possible values areFlowLayout.LEADING,FlowLayout.CENTER, orFlowLayout.TRAILING.- Parameters:
align- the alignment value
-
updateAlignment
protected void updateAlignment(com.vaadin.flow.component.Component container) -
setHorizontalGap
protected void setHorizontalGap(int horizontalGap) -
setVerticalGap
protected void setVerticalGap(int verticalGap) -
getHorizontalGap
protected int getHorizontalGap() -
getVerticalGap
protected int getVerticalGap()
-