package app.navigation;
|
|
|
|
import com.vaadin.flow.component.orderedlayout.FlexComponent;
|
|
import com.vaadin.flow.component.orderedlayout.HorizontalLayout;
|
|
|
|
public abstract class AbstractNavigationHeader<T extends Navigation> extends HorizontalLayout {
|
|
protected final T navigation;
|
|
|
|
public AbstractNavigationHeader(T navigation) {
|
|
this.navigation = navigation;
|
|
defineLayout();
|
|
defineChildren();
|
|
}
|
|
|
|
private void defineLayout() {
|
|
setWidthFull();
|
|
setAlignItems(FlexComponent.Alignment.CENTER);
|
|
setJustifyContentMode(FlexComponent.JustifyContentMode.END);
|
|
}
|
|
|
|
protected abstract void defineChildren();
|
|
}
|