org.bklab.flow.base.ContextMenuBaseFactory Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of fluent-vaadin-flow Show documentation
Show all versions of fluent-vaadin-flow Show documentation
Broderick Labs for fluent vaadin flow. Inherits common Vaadin components.
package org.bklab.flow.base;
import com.vaadin.flow.component.Component;
import com.vaadin.flow.component.ComponentEventListener;
import com.vaadin.flow.component.contextmenu.ContextMenuBase;
import com.vaadin.flow.component.contextmenu.GeneratedVaadinContextMenu;
import com.vaadin.flow.component.contextmenu.MenuItemBase;
import com.vaadin.flow.component.contextmenu.SubMenuBase;
import org.bklab.flow.IFlowFactory;
@SuppressWarnings("unchecked")
public interface ContextMenuBaseFactory, I extends MenuItemBase, S extends SubMenuBase, E extends ContextMenuBaseFactory> extends IFlowFactory, GeneratedVaadinContextMenuFactory, HasComponentsFactory {
default E add(Component... add) {
get().add(add);
return (E) this;
}
default E remove(Component... remove) {
get().remove(remove);
return (E) this;
}
default E close() {
get().close();
return (E) this;
}
default E target(Component target) {
get().setTarget(target);
return (E) this;
}
default E removeAll() {
get().removeAll();
return (E) this;
}
default E componentAtIndex(int index, Component component) {
get().addComponentAtIndex(index, component);
return (E) this;
}
default E openedChangeListener(ComponentEventListener> openedChangeListener) {
get().addOpenedChangeListener(openedChangeListener);
return (E) this;
}
default E item(String item) {
get().addItem(item);
return (E) this;
}
default E item(Component item) {
get().addItem(item);
return (E) this;
}
default E openOnClick(boolean openOnClick) {
get().setOpenOnClick(openOnClick);
return (E) this;
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy