Class Notify

java.lang.Object
com.avrix.ui.notify.Notify

public class Notify extends Object
The Notify class is responsible for managing and rendering notifications. It maintains a queue of notifications and provides methods to display various types of notifications.
  • Constructor Summary

    Constructors
    Constructor
    Description
     
  • Method Summary

    Modifier and Type
    Method
    Description
    static void
    critical(String text, int lifeTime)
    Displays a critical notification with a specified lifetime.
    static void
    error(String text, int lifeTime)
    Displays an error notification with a specified lifetime.
    static void
    hint(String text, int lifeTime)
    Displays a hint notification with a specified lifetime.
    static void
    info(String text, int lifeTime)
    Displays an informational notification with a specified lifetime.
    static void
    notify(Notification notification)
    Adds a Notification to the queue.
    static void
    Renders the notifications on the screen.
    static void
    setBorderOffsetBottom(int borderOffsetBottom)
    Sets the offset from the bottom edge of the window where notifications are displayed.
    static void
    setBorderOffsetRight(int borderOffsetRight)
    Sets the offset from the right edge of the window where notifications are displayed.
    static void
    setMaxVisibleNotification(int maxVisibleNotification)
    Sets the maximum number of notifications that can be visible at once.
    static void
    setNotificationMargin(int notificationMargin)
    Sets the margin between notifications.
    static void
    success(String text, int lifeTime)
    Displays a success notification with a specified lifetime.
    static void
    warn(String text, int lifeTime)
    Displays a warning notification with a specified lifetime.

    Methods inherited from class java.lang.Object

    equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Constructor Details

    • Notify

      public Notify()
  • Method Details

    • notify

      public static void notify(Notification notification)
      Adds a Notification to the queue.
      Parameters:
      notification - The notification to be added.
    • info

      public static void info(String text, int lifeTime)
      Displays an informational notification with a specified lifetime.
      Parameters:
      text - The notification text.
      lifeTime - The lifetime of the notification in seconds.
    • success

      public static void success(String text, int lifeTime)
      Displays a success notification with a specified lifetime.
      Parameters:
      text - The notification text.
      lifeTime - The lifetime of the notification in seconds.
    • warn

      public static void warn(String text, int lifeTime)
      Displays a warning notification with a specified lifetime.
      Parameters:
      text - The notification text.
      lifeTime - The lifetime of the notification in seconds.
    • error

      public static void error(String text, int lifeTime)
      Displays an error notification with a specified lifetime.
      Parameters:
      text - The notification text.
      lifeTime - The lifetime of the notification in seconds.
    • critical

      public static void critical(String text, int lifeTime)
      Displays a critical notification with a specified lifetime.
      Parameters:
      text - The notification text.
      lifeTime - The lifetime of the notification in seconds.
    • hint

      public static void hint(String text, int lifeTime)
      Displays a hint notification with a specified lifetime.
      Parameters:
      text - The notification text.
      lifeTime - The lifetime of the notification in seconds.
    • setBorderOffsetRight

      public static void setBorderOffsetRight(int borderOffsetRight)
      Sets the offset from the right edge of the window where notifications are displayed.
      Parameters:
      borderOffsetRight - The new offset from the right edge of the window.
    • setBorderOffsetBottom

      public static void setBorderOffsetBottom(int borderOffsetBottom)
      Sets the offset from the bottom edge of the window where notifications are displayed.
      Parameters:
      borderOffsetBottom - The new offset from the bottom edge of the window.
    • setMaxVisibleNotification

      public static void setMaxVisibleNotification(int maxVisibleNotification)
      Sets the maximum number of notifications that can be visible at once.
      Parameters:
      maxVisibleNotification - The new maximum number of visible notifications.
    • setNotificationMargin

      public static void setNotificationMargin(int notificationMargin)
      Sets the margin between notifications.
      Parameters:
      notificationMargin - The new margin between notifications.
    • render

      public static void render()
      Renders the notifications on the screen. Only the maximum number of visible notifications are shown. Notifications are rendered from the bottom of the screen upwards.