Search in sources :

Example 1 with MappingCloseButtonClicked

use of org.archcnl.ui.inputview.rulesormappingeditorview.mappingeditor.events.MappingCloseButtonClicked in project ArchCNL by Mari-Wie.

the class MappingEditorView method createTitleBar.

private HorizontalLayout createTitleBar(String mappingType) {
    final Label title = new Label("Create or edit a " + mappingType);
    title.setClassName("card-title-box--title");
    final Button closeButton = new Button(new Icon(VaadinIcon.CLOSE), click -> fireEvent(new MappingCloseButtonClicked(this, true)));
    final HorizontalLayout titleBar = new HorizontalLayout(title, closeButton);
    titleBar.setWidthFull();
    title.setWidthFull();
    titleBar.setDefaultVerticalComponentAlignment(Alignment.CENTER);
    return titleBar;
}
Also used : Button(com.vaadin.flow.component.button.Button) Label(com.vaadin.flow.component.html.Label) VaadinIcon(com.vaadin.flow.component.icon.VaadinIcon) Icon(com.vaadin.flow.component.icon.Icon) MappingCloseButtonClicked(org.archcnl.ui.inputview.rulesormappingeditorview.mappingeditor.events.MappingCloseButtonClicked) HorizontalLayout(com.vaadin.flow.component.orderedlayout.HorizontalLayout)

Aggregations

Button (com.vaadin.flow.component.button.Button)1 Label (com.vaadin.flow.component.html.Label)1 Icon (com.vaadin.flow.component.icon.Icon)1 VaadinIcon (com.vaadin.flow.component.icon.VaadinIcon)1 HorizontalLayout (com.vaadin.flow.component.orderedlayout.HorizontalLayout)1 MappingCloseButtonClicked (org.archcnl.ui.inputview.rulesormappingeditorview.mappingeditor.events.MappingCloseButtonClicked)1