All Downloads are FREE. Search and download functionalities are using the official Maven repository.

org.bklab.crud.menu.ICrudViewMenuColumnSupporter Maven / Gradle / Ivy

There is a newer version: 22.0.1
Show newest version
package org.bklab.crud.menu;

import com.vaadin.flow.component.Component;
import com.vaadin.flow.component.button.Button;
import com.vaadin.flow.component.contextmenu.ContextMenu;
import com.vaadin.flow.component.grid.ColumnTextAlign;
import com.vaadin.flow.component.grid.Grid;
import com.vaadin.flow.component.icon.VaadinIcon;
import com.vaadin.flow.function.ValueProvider;
import org.bklab.crud.FluentCrudView;
import org.bklab.flow.factory.ButtonFactory;

import java.util.List;
import java.util.function.Function;
import java.util.function.Supplier;

public interface ICrudViewMenuColumnSupporter, C extends FluentCrudView> {


    default C addMenuColumn(IFluentMenuBuilder menuEntityBiConsumer) {
        return this.addMenuColumn(() -> new ButtonFactory().icon(VaadinIcon.ELLIPSIS_DOTS_H.create())
                .lumoIcon().lumoSmall().lumoTertiaryInline().get(), menuEntityBiConsumer);
    }

    default C addEditIconMenuColumn(IFluentMenuBuilder menuEntityBiConsumer) {
        return this.addMenuColumn(() -> new ButtonFactory().icon(VaadinIcon.EDIT.create())
                .lumoIcon().lumoSmall().lumoTertiaryInline().get(), menuEntityBiConsumer);
    }

    default C addMenuColumn(Supplier




© 2015 - 2025 Weber Informatics LLC | Privacy Policy