Class UserNotification

java.lang.Object
it.tidalwave.util.ui.UserNotification
Direct Known Subclasses:
UserNotificationWithFeedback

@Immutable public class UserNotification extends Object
Author:
Fabrizio Giudici
  • Field Details Link icon

    • text Link icon

      protected final String text
    • caption Link icon

      protected final String caption
  • Constructor Details Link icon

    • UserNotification Link icon

      public UserNotification()
  • Method Details Link icon

    • notification Link icon

      @Nonnull public static UserNotification notification()
      Creates a notification with empty caption and text.
      Returns:
      the notification
    • withCaption Link icon

      @Nonnull public UserNotification withCaption(@Nonnull String caption)
      Associates a caption to the notification.
      Parameters:
      caption - the caption
      Returns:
      the notification
    • withCaption Link icon

      @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 from
      resourceName - the resource name of the caption in the bundle
      params - some (optional) parameters to the resource
      Returns:
      the notification
    • withText Link icon

      @Nonnull public UserNotification withText(@Nonnull String text)
      Associates a text to the notification.
      Parameters:
      text - the text
      Returns:
      the notification
    • withText Link icon

      @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 from
      resourceName - the resource name of the text in the bundle
      params - some (optional) parameters to the resource
      Returns:
      the notification