org.bklab.flow.IFluentFlowFactory 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;
import com.vaadin.flow.component.Component;
import org.bklab.flow.base.AttachNotifierFactory;
import org.bklab.flow.base.DetachNotifierFactory;
import org.bklab.flow.base.HasElementFactory;
import org.bklab.flow.base.HasReturnThis;
import java.util.function.Consumer;
import java.util.function.Predicate;
public interface IFluentFlowFactory> extends
HasElementFactory, AttachNotifierFactory>,
DetachNotifierFactory>, HasReturnThis, IFlowFactory {
default E enabledStateChanged(boolean onEnabledStateChanged) {
get().onEnabledStateChanged(onEnabledStateChanged);
return thisObject();
}
default E id(String id) {
get().setId(id);
return thisObject();
}
default E visible(boolean visible) {
get().setVisible(visible);
return thisObject();
}
default E attributeTitle(String title) {
get().getElement().setAttribute("title", title);
return thisObject();
}
default E peek(Consumer consumer) {
consumer.accept(get());
return thisObject();
}
default E peek(boolean canPeek, Consumer consumer) {
return canPeek ? thisObject() : peek(consumer);
}
default E peek(Predicate canPeek, Consumer consumer) {
return canPeek.test(get()) ? thisObject() : peek(consumer);
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy