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

org.bklab.flow.base.HasComponentsFactory Maven / Gradle / Ivy

There is a newer version: 22.0.1
Show newest version
/*
 * Copyright (c) 2008 - 2020. - Broderick Labs.
 * Author: Broderick Johansson
 * E-mail: [email protected]
 * Modify date:2020-06-17 20:13:07
 * _____________________________
 * Project name: fluent-vaadin-flow
 * Class name:org.bklab.flow.base.HasComponentsFactory
 * Copyright (c) 2008 - 2020. - Broderick Labs.
 */

package org.bklab.flow.base;

import com.vaadin.flow.component.Component;
import com.vaadin.flow.component.HasComponents;
import org.bklab.flow.IFlowFactory;

@SuppressWarnings("unchecked")
public interface HasComponentsFactory>
        extends IFlowFactory, HasEnabledFactory {

    default E add(Component... add) {
        get().add(add);
        return (E) this;
    }

    default E add(String add) {
        get().add(add);
        return (E) this;
    }

    default E remove(Component... remove) {
        get().remove(remove);
        return (E) this;
    }

    default E removeAll() {
        get().removeAll();
        return (E) this;
    }

    default E componentAsFirst(Component componentAsFirst) {
        get().addComponentAsFirst(componentAsFirst);
        return (E) this;
    }

    default E componentAtIndex(int index, Component component) {
        get().addComponentAtIndex(index, component);
        return (E) this;
    }

}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy