Class Toaster

All Implemented Interfaces:
EventListener, IGProp<GProp<?>[]>, IPropCnr, Cloneable

public class Toaster extends PropCnr
The toaster property is always volatile. It defines its message along with position, direction, type and duration.
  • Constructor Details

    • Toaster

      public Toaster()
      Constructor without name.
    • Toaster

      public Toaster(Atom atom)
      Constructor with name.
      Parameters:
      atom - The atom name.
  • Method Details

    • toast

      public void toast(KString message, IToaster.Position position, IToaster.Direction direction, IToaster.Type type, int duration)
      Displays a simple, unobstructive and ephemeral text message to the user.
      Parameters:
      message - The message to display, cannot be null.
      position - Position of toast, default value is Position.BOTTOM_CENTER if null.
      direction - Direction of the toast animation, default Direction.UP if null.
      type - Type of message style: message, warning, error of fatal, default is message if null.
      duration - Duration of the toast message being shown in ms. Valid values are in the interval [0, 10000], 0 for a sticky toast.