@Override public LoadingBox.View show() { NotifySettings settings = NotifySettings.newSettings(); settings.setShowProgressbar(true); settings.setPauseOnMouseOver(false); Notify.notify("Please wait", "Loading...", IconType.CLOCK_O, settings); return this; }
/** * Set placement of Notify on screen. Default placement is {@link NotifyPlacement#TOP_RIGHT}. * * @param placement Notify's placement on screen * @see NotifyPlacement */ public final void setPlacement(final NotifyPlacement placement) { setNotifyPlacement((placement != null) ? placement : NotifyPlacement.TOP_RIGHT); }
/** * Set the Notify's closed event handler. This event is fired when the modal * has finished closing and is removed from the document (will wait for CSS * transitions to complete). * * @param handler */ public final void setClosedHandler(final NotifyClosedHandler handler) { onClosed((handler != null) ? handler : NotifyClosedHandler.DEFAULT_CLOSED_HANDLER); }
/** * Set custom style name to Notify. Resulting class name is "alert-[customType]". * * @param customType Style name to set */ public final native void setType(String customType) /*-{ this.type = customType; }-*/;
/** * Display Notify with custom title, message, icon, and default settings. * * @param title Title to set * @param message Message to set * @param iconType IconType to set * @return Displayed Notify for update or hiding. */ public static final Notify notify(final String title, final String message, final IconType iconType) { return Notify.notify(title, message, Styles.FONT_AWESOME_BASE + " " + iconType.getCssName()); }
/** * Set the Notify's shown event handler. This event is fired when the modal has * been made visible to the user (will wait for CSS transitions to complete). * * @param handler */ public final void setShownHandler(final NotifyShownHandler handler) { onShown((handler != null) ? handler : NotifyShownHandler.DEFAULT_SHOWN_HANDLER); }
/** * Set the Notify's show event handler. The show event fires immediately when * the show instance method is called. * * @param handler */ public final void setShowHandler(final NotifyShowHandler handler) { onShow((handler != null) ? handler : NotifyShowHandler.DEFAULT_SHOW_HANDLER); }
/** * Set the Notify's close event handler. This event is fired immediately when * the notification is closing. * * @param handler */ public final void setCloseHandler(final NotifyCloseHandler handler) { onClose((handler != null) ? handler : NotifyCloseHandler.DEFAULT_CLOSE_HANDLER); }
@Override public LoadingBox.View hide() { Notify.hideAll(); return this; } }
/** * Update type of once displayed Notify (CSS style class name). * * @param type one of INFO, WARNING, DANGER, SUCCESS * @see org.gwtbootstrap3.extras.notify.client.constants.NotifyType */ public final void updateType(final NotifyType type) { if (type != null) { updateType(type.getCssName()); } }
/** * Set custom URL target.<br> * <br> * Defaults to {@link NotifyUrlTarget#BLANK}. * * @param urlTarget URL target */ public final void setUrlTarget(NotifyUrlTarget urlTarget) { setUrlTarget((urlTarget != null) ? urlTarget.getTarget() : NotifyUrlTarget.BLANK.getTarget()); }
@Override public SessionPresenter.View showWarning(final String message) { getSettings().setType(kieNotificationCssClass(NotifyType.WARNING)); showNotification(translate(SessionPresenterView_Warning), message, IconType.EXCLAMATION_TRIANGLE); return this; }
/** * Display Notify with custom title, message, icon, url and default settings. * * @param title Title to set * @param message Message to set * @param iconType IconType to set * @param url Url to set * @return Displayed Notify for update or hiding. */ public static final Notify notify(final String title, final String message, final IconType iconType, final String url) { return Notify.notify(title, message, Styles.FONT_AWESOME_BASE + " " + iconType.getCssName(), url); }
/** * Set placement of Notify on screen. Default placement is {@link NotifyPlacement#TOP_RIGHT}. * * @param placement Notify's placement on screen * @see NotifyPlacement */ public final void setPlacement(final NotifyPlacement placement) { setNotifyPlacement((placement != null) ? placement : NotifyPlacement.TOP_RIGHT); }
/** * Set the Notify's closed event handler. This event is fired when the modal * has finished closing and is removed from the document (will wait for CSS * transitions to complete). * * @param handler */ public final void setClosedHandler(final NotifyClosedHandler handler) { onClosed((handler != null) ? handler : NotifyClosedHandler.DEFAULT_CLOSED_HANDLER); }
/** * Set the Notify's shown event handler. This event is fired when the modal has * been made visible to the user (will wait for CSS transitions to complete). * * @param handler */ public final void setShownHandler(final NotifyShownHandler handler) { onShown((handler != null) ? handler : NotifyShownHandler.DEFAULT_SHOWN_HANDLER); }
/** * Set the Notify's show event handler. The show event fires immediately when * the show instance method is called. * * @param handler */ public final void setShowHandler(final NotifyShowHandler handler) { onShow((handler != null) ? handler : NotifyShowHandler.DEFAULT_SHOW_HANDLER); }
/** * Set the Notify's close event handler. This event is fired immediately when * the notification is closing. * * @param handler */ public final void setCloseHandler(final NotifyCloseHandler handler) { onClose((handler != null) ? handler : NotifyCloseHandler.DEFAULT_CLOSE_HANDLER); }
@Override public SessionPresenterView showError(final String message) { getSettings().setType(kieNotificationCssClass(NotifyType.DANGER)); showNotification(translate(SessionPresenterView_Error), message, IconType.EXCLAMATION_CIRCLE); return this; }
@Override public SessionPresenterView showMessage(final String message) { getSettings().setType(kieNotificationCssClass(NotifyType.SUCCESS)); showNotification(translate(SessionPresenterView_Info), message, IconType.INFO_CIRCLE); return this; }