org.dominokit.domino.ui.loaders.RotationLoader Maven / Gradle / Ivy
package org.dominokit.domino.ui.loaders;
import elemental2.dom.HTMLDivElement;
import org.dominokit.domino.ui.style.Style;
import org.jboss.gwt.elemento.core.IsElement;
import org.jboss.gwt.elemento.template.DataElement;
import org.jboss.gwt.elemento.template.Templated;
import javax.annotation.PostConstruct;
@Templated
public abstract class RotationLoader extends BaseLoader implements IsElement {
@DataElement
HTMLDivElement loadingText;
@DataElement
HTMLDivElement loader;
@PostConstruct
void init() {
init(this);
}
public static RotationLoader create() {
return new Templated_RotationLoader();
}
@Override
public void setLoadingText(String text) {
loadingText.textContent = text;
}
@Override
public void setSize(String width, String height) {
onAttached(mutationRecord -> {
Style.of(loader).setWidth(width).setHeight(height);
});
}
@Override
public void removeLoadingText() {
onAttached(mutationRecord -> loadingText.remove());
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy