Package com.tagtraum.core
Class SystemNotification
- java.lang.Object
-
- com.tagtraum.core.SystemNotification
-
public abstract class SystemNotification extends Object
Notification posted outside the application window, for example as macOS notification or as Windows system tray balloon.
SeeNotification
for in-frame notifications.- Author:
- Hendrik Schreiber
-
-
Constructor Summary
Constructors Modifier Constructor Description protected
SystemNotification(String title, String text, AudioFeedback sound, Image image)
-
Method Summary
All Methods Static Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description static SystemNotification
create(String title, String text, AudioFeedback sound)
Create a system-level notification with the given title, content and sound, which can be posted viapost(java.awt.Window)
.static SystemNotification
create(String title, String text, AudioFeedback sound, Image image)
Create a system-level notification with the given title, content and sound, which can be posted viapost(java.awt.Window)
.Image
getImage()
AudioFeedback
getSound()
String
getText()
String
getTitle()
abstract void
post(Window window)
Post the message, using the given window's icon representing the application, if possible.
-
-
-
Constructor Detail
-
SystemNotification
protected SystemNotification(String title, String text, AudioFeedback sound, Image image)
-
-
Method Detail
-
getTitle
public String getTitle()
-
getText
public String getText()
-
getSound
public AudioFeedback getSound()
-
getImage
public Image getImage()
-
create
public static SystemNotification create(String title, String text, AudioFeedback sound, Image image)
Create a system-level notification with the given title, content and sound, which can be posted viapost(java.awt.Window)
.- Parameters:
title
- titletext
- contentsound
- soundimage
- image- Returns:
- notification
- See Also:
post(java.awt.Window)
-
create
public static SystemNotification create(String title, String text, AudioFeedback sound)
Create a system-level notification with the given title, content and sound, which can be posted viapost(java.awt.Window)
.- Parameters:
title
- titletext
- contentsound
- sound- Returns:
- notification
- See Also:
post(java.awt.Window)
-
post
public abstract void post(Window window)
Post the message, using the given window's icon representing the application, if possible.- Parameters:
window
- application window
-
-