Package com.vaadin.classic.v8.ui
Interface Layout.AlignmentHandler
-
- All Superinterfaces:
java.io.Serializable
- All Known Implementing Classes:
AbstractOrderedLayout,FormLayout,GridLayout,HorizontalLayout,VerticalLayout
- Enclosing interface:
- Layout
public static interface Layout.AlignmentHandler extends java.io.SerializableAlignmentHandler is most commonly an advancedLayoutthat can align its components.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description AlignmentgetComponentAlignment(com.vaadin.flow.component.Component childComponent)Returns the current Alignment of given component.AlignmentgetDefaultComponentAlignment()Returns the alignment used for new components added to this layout.voidsetComponentAlignment(com.vaadin.flow.component.Component childComponent, Alignment alignment)Set alignment for one contained component in this layout.voidsetDefaultComponentAlignment(Alignment defaultComponentAlignment)Sets the alignment used for new components added to this layout.
-
-
-
Method Detail
-
setComponentAlignment
void setComponentAlignment(com.vaadin.flow.component.Component childComponent, Alignment alignment)Set alignment for one contained component in this layout. Use predefined alignments from Alignment class.Example:
layout.setComponentAlignment(myComponent, Alignment.TOP_RIGHT);- Parameters:
childComponent- the component to align within it's layout cell.alignment- the Alignment value to be set
-
getComponentAlignment
Alignment getComponentAlignment(com.vaadin.flow.component.Component childComponent)
Returns the current Alignment of given component.- Parameters:
childComponent-- Returns:
- the
Alignment
-
setDefaultComponentAlignment
void setDefaultComponentAlignment(Alignment defaultComponentAlignment)
Sets the alignment used for new components added to this layout. The default isAlignment.TOP_LEFT.- Parameters:
defaultComponentAlignment- The new default alignment
-
getDefaultComponentAlignment
Alignment getDefaultComponentAlignment()
Returns the alignment used for new components added to this layout.- Returns:
- The default alignment
-
-