increase default show time for notifications

hello all,
i’m wondering that is it possible to increase default display time for notifications?
when a notification is displayed, then if i move the mouse, it disappears immediately.
thanks in advance.

Şaban

Is the setDelayMSec() in
Notification
what you are looking for or did you mean some other delay adjustment?

i know Notification class has such method, but i need an adjustment when i want to use Window class’ showNotification() method.
i saw there is no parameter for delay time in showNotification() method.
so i’m wondering if there is a setting for this or not around the whole application?

The showNotification(caption), etc. are just shorthands for creating a Notification object and adding it to the window, which you can also do with showNotification(Notification).

public void showNotification(String caption) {
    addNotification(new Notification(caption));
}

So, just do

Notification notif = new Notification("Hello", "there");
notif.setDelayMSec(1234);
getWindow().showNotification(notif);

It would be nice if the default delays could just be set rather than having to change every place where notifications are done. Is it possible for the API to allow the defaults to be changed so the more common methods use that value instead?

Thanks Marko.

Unless you have many Window subclasses, overriding the three Window#showNotification methods would have the same effect…