From f4d556492e7ca262a10b1d58c3055b80d9815893 Mon Sep 17 00:00:00 2001 From: Marc Englund Date: Tue, 4 Dec 2007 09:29:14 +0000 Subject: [PATCH] Notifications set caption (not message) if only one string is provided. svn changeset:3135/svn branch:trunk --- src/com/itmill/toolkit/ui/Window.java | 24 ++++++++++++++++-------- 1 file changed, 16 insertions(+), 8 deletions(-) diff --git a/src/com/itmill/toolkit/ui/Window.java b/src/com/itmill/toolkit/ui/Window.java index 27f07c9291..e104c5881d 100644 --- a/src/com/itmill/toolkit/ui/Window.java +++ b/src/com/itmill/toolkit/ui/Window.java @@ -1189,12 +1189,16 @@ public class Window extends Panel implements URIHandler, ParameterHandler { this.scrollLeft = scrollLeft; } - public void showNotification(String message) { - addNotification(new Notification(message)); + public void showNotification(String caption) { + addNotification(new Notification(caption)); } - public void showNotification(String message, int type) { - addNotification(new Notification(message, type)); + public void showNotification(String caption, int type) { + addNotification(new Notification(caption, type)); + } + + public void showNotification(String caption, String message) { + addNotification(new Notification(caption, message)); } public void showNotification(String caption, String message, int type) { @@ -1237,12 +1241,16 @@ public class Window extends Panel implements URIHandler, ParameterHandler { private int delayMsec = 0; private String styleName; - public Notification(String message) { - this(null, message, TYPE_HUMANIZED_MESSAGE); + public Notification(String caption) { + this(caption, null, TYPE_HUMANIZED_MESSAGE); + } + + public Notification(String caption, int type) { + this(caption, null, type); } - public Notification(String message, int type) { - this(null, message, type); + public Notification(String caption, String message) { + this(caption, message, TYPE_HUMANIZED_MESSAGE); } public Notification(String caption, String message, int type) { -- 2.39.5