/** * Shows this notification on a Page. * * @param page * The page on which the notification should be shown */ public void show(Page page) { extend(page.getUI()); }
/** * Shows a notification message on the middle of the current page. The * message automatically disappears ("humanized message"). * * The caption is rendered as plain text with HTML automatically escaped. * * @see #Notification(String) * @see #show(Page) * * @param caption * The message * @return The Notification */ public static Notification show(String caption) { Notification notification = new Notification(caption); notification.extend(UI.getCurrent()); return notification; }
/** * Shows a notification message the current page. The position and behavior * of the message depends on the type, which is one of the basic types * defined in {@link Notification}, for instance * {@link Type#WARNING_MESSAGE}. * * The caption is rendered as plain text with HTML automatically escaped. * * @see Notification(String, int) * @see #show(Page) * * @param caption * The message * @param type * The message type * @return The Notification */ public static Notification show(String caption, Type type) { Notification notification = new Notification(caption, type); notification.extend(UI.getCurrent()); return notification; }
/** * Shows a notification message the current page. The position and behavior * of the message depends on the type, which is one of the basic types * defined in {@link Notification}, for instance * Notification.TYPE_WARNING_MESSAGE. * * The caption is rendered as plain text with HTML automatically escaped. * * @see #Notification(String, Type) * @see #show(Page) * * @param caption * The message * @param description * The message description * @param type * The message type * @return The Notification */ public static Notification show(String caption, String description, Type type) { Notification notification = new Notification(caption, description, type); notification.extend(UI.getCurrent()); return notification; }