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

org.dominokit.domino.ui.dialogs.MessageDialog Maven / Gradle / Ivy

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

import elemental2.dom.HTMLDivElement;
import elemental2.dom.HTMLElement;
import elemental2.dom.Node;
import org.dominokit.domino.ui.Typography.Paragraph;
import org.dominokit.domino.ui.animations.Animation;
import org.dominokit.domino.ui.animations.Transition;
import org.dominokit.domino.ui.button.Button;
import org.dominokit.domino.ui.icons.BaseIcon;
import org.dominokit.domino.ui.icons.Icons;
import org.dominokit.domino.ui.modals.BaseModal;
import org.dominokit.domino.ui.style.Color;
import org.dominokit.domino.ui.style.Style;
import org.dominokit.domino.ui.utils.DominoElement;
import org.jboss.elemento.EventType;
import org.jboss.elemento.IsElement;

import java.util.function.Supplier;

import static java.util.Objects.nonNull;
import static org.jboss.elemento.Elements.div;

public class MessageDialog extends BaseModal {

    private DominoElement iconContainer = DominoElement.of(div());

    private DominoElement icon;
    private Color iconColorStart;
    private Color iconColorEnd;
    private Transition iconStartTransition;
    private Transition iconEndTransition;
    private Button okButton;

    public MessageDialog() {
        init(this);
    }

    public static MessageDialog createMessage(Node content) {
        return createMessage(content, () -> {
        });
    }

    public static MessageDialog createMessage(Node content, Supplier




© 2015 - 2024 Weber Informatics LLC | Privacy Policy