Package io.github.asyncronous.toast.ui

Examples of io.github.asyncronous.toast.ui.ToastWindow


     *
     * @param msg The text of the message you want to display
     * @example Toaster.popQuestion("This is a question?");
     */
    public void popQuestion(String msg) {
        ToastWindow window = new ToastWindow();
        window.setText(msg);
        window.setIcon(new ImageIcon((Image) UIManager.get(ToasterConstants.QUESTION_ICON)));
        window.pop();
    }
View Full Code Here


     *
     * @param msg The text of the message you want to display
     * @example Toaster.pop("This is some information");
     */
    public void pop(String msg) {
        ToastWindow window = new ToastWindow();
        window.setText(msg);
        window.setIcon(new ImageIcon((Image) UIManager.get(ToasterConstants.INFO_ICON)));
        window.pop();
    }
View Full Code Here

     *
     * @param msg The text of the message you want to display
     * @example Toaster.popWarning("This is a warning");
     */
    public void popWarning(String msg) {
        ToastWindow window = new ToastWindow();
        window.setText(msg);
        window.setIcon(new ImageIcon((Image) UIManager.get(ToasterConstants.WARNING_ICON)));
        window.pop();
    }
View Full Code Here

     *
     * @param msg The text of the message you want to display
     * @example Toaster.popError("This is an error");
     */
    public void popError(String msg) {
        ToastWindow window = new ToastWindow();
        window.setText(msg);
        window.setIcon(new ImageIcon((Image) UIManager.get(ToasterConstants.ERROR_ICON)));
        window.pop();
    }
View Full Code Here

     * @example ImageIcon image = new ImageIcon(ImageIO.read(getClass().getResourceAsStream
     * ("/assets/toaster/icons/error.png"
     * ))); Toaster.pop("This is an error", image);
     */
    public void pop(String msg, Icon ico) {
        ToastWindow window = new ToastWindow();
        window.setText(msg);
        window.setIcon(ico);
        window.pop();
    }
View Full Code Here

TOP

Related Classes of io.github.asyncronous.toast.ui.ToastWindow

Copyright © 2018 www.massapicom. 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.