A notification message, used to display temporary messages to the user - for
example "Document saved", or "Save failed".
The notification message can consist of several parts: caption, description
and icon. It is usually used with only caption - one should be wary of
filling the notification with too much information.
The notification message tries to be as unobtrusive as possible, while still
drawing needed attention. There are several basic types of messages that can
be used in different situations:
- TYPE_HUMANIZED_MESSAGE fades away quickly as soon as the user uses the
mouse or types something. It can be used to show fairly unimportant messages,
such as feedback that an operation succeeded ("Document Saved") - the kind of
messages the user ignores once the application is familiar.
- TYPE_WARNING_MESSAGE is shown for a short while after the user uses the
mouse or types something. It's default style is also more noticeable than the
humanized message. It can be used for messages that do not contain a lot of
important information, but should be noticed by the user. Despite the name,
it does not have to be a warning, but can be used instead of the humanized
message whenever you want to make the message a little more noticeable.
- TYPE_ERROR_MESSAGE requires to user to click it before disappearing, and
can be used for critical messages.
- TYPE_TRAY_NOTIFICATION is shown for a while in the lower right corner of
the window, and can be used for "convenience notifications" that do not have
to be noticed immediately, and should not interfere with the current task -
for instance to show "You have a new message in your inbox" while the user is
working in some other area of the application.
In addition to the basic pre-configured types, a Notification can also be
configured to show up in a custom position, for a specified time (or until
clicked), and with a custom stylename. An icon can also be added.