org.dominokit.domino.ui.utils.HtmlComponentBuilder Maven / Gradle / Ivy
package org.dominokit.domino.ui.utils;
import elemental2.dom.HTMLElement;
import elemental2.dom.Node;
import org.gwtproject.safehtml.shared.SafeHtml;
import org.jboss.elemento.IsElement;
import org.jboss.elemento.HtmlContentBuilder;
public class HtmlComponentBuilder> extends HtmlContentBuilder{
private T component;
public HtmlComponentBuilder(T component) {
super(component.element());
this.component = component;
}
public T build(){
return component;
}
@Override
public HtmlComponentBuilder innerHtml(SafeHtml html) {
super.innerHtml(html);
return this;
}
@Override
public HtmlComponentBuilder add(IsElement> element) {
super.add(element);
return this;
}
@Override
public HtmlComponentBuilder add(String text) {
super.add(text);
return this;
}
@Override
public HtmlComponentBuilder add(Node element) {
super.add(element);
return this;
}
@Override
public HtmlComponentBuilder addAll(HTMLElement... elements) {
super.addAll(elements);
return this;
}
@Override
public HtmlComponentBuilder addAll(Iterable> elements) {
super.addAll(elements);
return this;
}
@Override
public HtmlComponentBuilder addAll(IsElement>... elements) {
super.addAll(elements);
return this;
}
@Override
public HtmlComponentBuilder textContent(String text) {
super.textContent(text);
return this;
}
@Override
public HtmlComponentBuilder css(String... classes) {
super.css(classes);
return this;
}
}