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

org.dominokit.domino.ui.loaders.Win8Loader 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 Win8Loader extends BaseLoader implements IsElement {

    @DataElement
    HTMLDivElement loadingText;

    @DataElement
    HTMLDivElement loader;

    @PostConstruct
    void init() {
        init(this);
    }

    public static Win8Loader create() {
        return new Templated_Win8Loader();
    }

    @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