/** * Displays a message box with a progress bar. This message box has no buttons * and is not closeable by the user. You are responsible for updating the * progress bar as needed via {@link MessageBox#updateProgress} * * @param title the title bar text * @param msg the message box body text * @param progressText the text to display inside the progress bar * @return the new message box */ public static MessageBox progress(String title, String msg, String progressText) { MessageBox box = new MessageBox(); box.setTitleHtml(title); box.setMessage(msg); box.setType(MessageBoxType.PROGRESSS); box.setProgressHtml(progressText); box.setButtons(""); box.setClosable(false); box.show(); return box; }
/** * Displays a message box with an infinitely auto-updating progress bar. This * can be used to block user interaction while waiting for a long-running * process to complete that does not have defined intervals. You are * responsible for closing the message box when the process is complete. * * @param title the title bar text * @param msg the message box body text * @param progressText the text to display inside the progress bar * @return the new message box instance */ public static MessageBox wait(String title, String msg, String progressText) { MessageBox box = new MessageBox(); box.setTitleHtml(title); box.setMessage(msg); box.setType(MessageBoxType.WAIT); box.setProgressHtml(progressText); box.setButtons(""); box.setClosable(false); box.show(); return box; }