Package io.github.asyncronous.toast.ui

Examples of io.github.asyncronous.toast.ui.ToastWindow.pop()


     */
    public void popQuestion(String msg) {
        ToastWindow window = new ToastWindow();
        window.setText(msg);
        window.setIcon(new ImageIcon((Image) UIManager.get(ToasterConstants.QUESTION_ICON)));
        window.pop();
    }

    /**
     * Will generate a standard info Toaster Notification with the chosen settings
     *
 
View Full Code Here


     */
    public void pop(String msg) {
        ToastWindow window = new ToastWindow();
        window.setText(msg);
        window.setIcon(new ImageIcon((Image) UIManager.get(ToasterConstants.INFO_ICON)));
        window.pop();
    }

    /**
     * Will generate a warning Toaster Notification with the chosen settings
     *
 
View Full Code Here

     */
    public void popWarning(String msg) {
        ToastWindow window = new ToastWindow();
        window.setText(msg);
        window.setIcon(new ImageIcon((Image) UIManager.get(ToasterConstants.WARNING_ICON)));
        window.pop();
    }

    /**
     * Will generate an error Toaster Notification with the chosen settings
     *
 
View Full Code Here

     */
    public void popError(String msg) {
        ToastWindow window = new ToastWindow();
        window.setText(msg);
        window.setIcon(new ImageIcon((Image) UIManager.get(ToasterConstants.ERROR_ICON)));
        window.pop();
    }

    /**
     * Will generate a Toaster Notification with a custom Icon & the chosen settings
     *
 
View Full Code Here

     */
    public void pop(String msg, Icon ico) {
        ToastWindow window = new ToastWindow();
        window.setText(msg);
        window.setIcon(ico);
        window.pop();
    }

    private Image createImage(String name) {
        try {
            InputStream stream = Toaster.class.getResourceAsStream("/assets/toast/icons/" + name + ".png");
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.