Class BorderLayout
java.lang.Object
com.vaadin.featurepack.desktop.layouts.AbstractLayout
com.vaadin.featurepack.desktop.layouts.BorderLayout
- All Implemented Interfaces:
Serializable
Border layout allows to place content into five regions. Each region may
contain no more than one component.
- Author:
- Vaadin Ltd
- See Also:
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final StringThe center layout constraint (middle of container).static final StringThe component goes at the end of the line direction for the layout (for left-to-right direction, it is located on the right).static final StringThe component goes at the beginning of the line direction for the layout (for left-to-right direction, it is located on the left).static final StringThe component comes after the last line of the layout's content.static final StringThe component comes before the first line of the layout's content. -
Constructor Summary
ConstructorsConstructorDescriptionConstructs a new aBorderLayoutwith no gaps between components.BorderLayout(int hgap, int vgap) Constructs a newBorderLayoutusing the provided horizontal and vertical gap between components. -
Method Summary
Modifier and TypeMethodDescriptionvoidaddComponent(com.vaadin.flow.component.Component component) getConstraints(com.vaadin.flow.component.Component component) intgetHgap()Returns the horizontal gap between components.intgetVgap()Returns the vertical gap between components.protected voidonContainerAttach(com.vaadin.flow.component.AttachEvent event) voidremoveComponent(com.vaadin.flow.component.Component component) voidsetConstraints(com.vaadin.flow.component.Component component, Object constraints) voidsetContainer(com.vaadin.flow.component.Component container) voidsetHgap(int hgap) Sets the horizontal gap between components.voidsetVgap(int vgap) Sets the vertical gap between components.Methods inherited from class com.vaadin.featurepack.desktop.layouts.AbstractLayout
getComponents, getContainer, onContainerDetach
-
Field Details
-
CENTER
The center layout constraint (middle of container).- See Also:
-
PAGE_START
The component comes before the first line of the layout's content.- See Also:
-
PAGE_END
The component comes after the last line of the layout's content.- See Also:
-
LINE_START
The component goes at the beginning of the line direction for the layout (for left-to-right direction, it is located on the left).- See Also:
-
LINE_END
The component goes at the end of the line direction for the layout (for left-to-right direction, it is located on the right).- See Also:
-
-
Constructor Details
-
BorderLayout
public BorderLayout()Constructs a new aBorderLayoutwith no gaps between components. -
BorderLayout
public BorderLayout(int hgap, int vgap) Constructs a newBorderLayoutusing the provided horizontal and vertical gap between components.- Parameters:
hgap- The horizontal gap to set.vgap- The vertical gap to set.- See Also:
-
-
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
-
addComponent
public void addComponent(com.vaadin.flow.component.Component component) - Overrides:
addComponentin classAbstractLayout
-
removeComponent
public void removeComponent(com.vaadin.flow.component.Component component) - Overrides:
removeComponentin classAbstractLayout
-
setConstraints
- Specified by:
setConstraintsin classAbstractLayout
-
getConstraints
- Specified by:
getConstraintsin classAbstractLayout
-
getHgap
public int getHgap()Returns the horizontal gap between components.- Returns:
- the horizontal gap between components
-
setHgap
public void setHgap(int hgap) Sets the horizontal gap between components.- Parameters:
hgap- the horizontal gap between components
-
getVgap
public int getVgap()Returns the vertical gap between components.- Returns:
- the vertical gap between components
-
setVgap
public void setVgap(int vgap) Sets the vertical gap between components.- Parameters:
vgap- the vertical gap between components
-