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

org.bklab.flow.factory.ContextMenuFactory Maven / Gradle / Ivy

There is a newer version: 22.0.1
Show newest version
package org.bklab.flow.factory;

import com.vaadin.flow.component.ClickEvent;
import com.vaadin.flow.component.Component;
import com.vaadin.flow.component.ComponentEventListener;
import com.vaadin.flow.component.contextmenu.ContextMenu;
import com.vaadin.flow.component.contextmenu.MenuItem;
import com.vaadin.flow.component.contextmenu.SubMenu;
import org.bklab.flow.FlowFactory;
import org.bklab.flow.base.ContextMenuBaseFactory;

public class ContextMenuFactory extends FlowFactory implements
        ContextMenuBaseFactory {
    public ContextMenuFactory() {
        this(new ContextMenu());
    }

    public ContextMenuFactory(Component target) {
        this(new ContextMenu(target));
    }

    public ContextMenuFactory(ContextMenu component) {
        super(component);
    }

    public ContextMenuFactory item(String string, ComponentEventListener> menuItem) {
        get().addItem(string, menuItem);
        return this;
    }

    public ContextMenuFactory item(Component component, ComponentEventListener> menuItem) {
        get().addItem(component, menuItem);
        return this;
    }
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy