Package it.tidalwave.util.ui
Class UserNotification
java.lang.Object
it.tidalwave.util.ui.UserNotification
- Direct Known Subclasses:
UserNotificationWithFeedback
- Author:
- Fabrizio Giudici
-
Field Summary
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionstatic UserNotification
Creates a notification with empty caption and text.withCaption
(Class<?> bundleClass, String resourceName, Object... params) Associates a caption to the notification, retrieved from a resource bundle.withCaption
(String caption) Associates a caption to the notification.Associates a text to the notification, retrieved from a resource bundle.Associates a text to the notification.
-
Field Details
-
Constructor Details
-
Method Details
-
notification
Creates a notification with empty caption and text.- Returns:
- the notification
-
withCaption
Associates a caption to the notification.- Parameters:
caption
- the caption- Returns:
- the notification
-
withCaption
@Nonnull public UserNotification withCaption(@Nonnull Class<?> bundleClass, @Nonnull String resourceName, @Nonnull Object... params) Associates a caption to the notification, retrieved from a resource bundle.- Parameters:
bundleClass
- the class where to search the resource bundle fromresourceName
- the resource name of the caption in the bundleparams
- some (optional) parameters to the resource- Returns:
- the notification
-
withText
Associates a text to the notification.- Parameters:
text
- the text- Returns:
- the notification
-
withText
@Nonnull public UserNotification withText(@Nonnull Class<?> bundleClass, @Nonnull String resourceName, @Nonnull Object... params) Associates a text to the notification, retrieved from a resource bundle.- Parameters:
bundleClass
- the class where to search the resource bundle fromresourceName
- the resource name of the text in the bundleparams
- some (optional) parameters to the resource- Returns:
- the notification
-