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

org.dominokit.domino.ui.spin.SpinItem Maven / Gradle / Ivy

There is a newer version: 1.0.139
Show newest version
package org.dominokit.domino.ui.spin;

import elemental2.dom.HTMLDivElement;
import elemental2.dom.HTMLElement;
import elemental2.dom.Node;
import org.dominokit.domino.ui.utils.BaseDominoElement;
import org.dominokit.domino.ui.utils.DominoElement;
import org.jboss.elemento.IsElement;

import static org.jboss.elemento.Elements.div;

public class SpinItem extends BaseDominoElement> {

    private T value;
    private DominoElement element = DominoElement.of(div().css(SpinStyles.spin_item));

    public SpinItem(T value) {
        this.value = value;
        init(this);
    }

    public SpinItem(T value, Node content) {
        this(value);
        setContent(content);
    }

    public SpinItem(T value, IsElement content) {
        this(value);
        setContent(content);
    }

    public static  SpinItem create(T value) {
        return new SpinItem<>(value);
    }

    public static  SpinItem create(T value, Node content) {
        return new SpinItem<>(value, content);
    }

    public static  SpinItem create(T value, IsElement content) {
        return new SpinItem<>(value, content);
    }

    public T getValue() {
        return value;
    }

    @Override
    public HTMLDivElement element() {
        return element.element();
    }

}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy