package com.ts3client.ui; import com.ts3client.notify.desktop.DesktopNotifications; import com.ts3client.ui.tray.AwtTray; /** * Desktop notifications as messages from AWT's tray icon, for Windows and macOS: they * land in the system's notification centre. A message cannot be replaced or taken back. */ final class TrayNotifications implements DesktopNotifications { private final AwtTray tray; TrayNotifications(AwtTray tray) { this.tray = tray; } @Override public int show(Notice notice, int replaces) { tray.showMessage(notice.title(), notice.body(), notice.onOpen()); return 1; } @Override public void close(int id) { } @Override public boolean canReply() { return false; } @Override public void shutdown() { } }