public class NotificationDisplayer extends java.lang.Object
|Modifier and Type||Class and Description|
Notification handle used to manipulate the notification after it is created.
Priority of Notification
|Constructor and Description|
Create notification displayer which uses given toolbar to display the notifications.
|Modifier and Type||Method and Description|
Display custom component as notification.
Simplified creation of the notification calling internally
public NotificationDisplayer(javax.swing.JToolBar toolBar, boolean showBalloons)
toolBar- where to show information about existing notifications
falsethen creating notification in the displayer never creates balloon popup.
public NotificationDisplayer.Notification notify(NotificationDisplayer.Priority priority, javax.swing.Icon icon, java.lang.String title, java.lang.String description, javax.swing.Action action, boolean showBalloon)
notify(Priority, Icon, String, JComponent, JComponent). Creates needed components internaly, uses the same component for balloon and for popup.
priority- priority of the notification, no popup balloons are displayed if notification with greater priority is displayed. In the toolbar only the icon of the notification with the highest priority is displayed.
icon- icon of the notification, if
nullthe deafult warning icon is used
title- title of the notification
description- text of the notification
action- action added to the UI of the notification. Action is invoked with the notification as the event source.
showBalloon- Show Balloon popup when notification is created.
public NotificationDisplayer.Notification notify(NotificationDisplayer.Priority priority, javax.swing.Icon icon, java.lang.String title, javax.swing.JComponent balloonDetail, javax.swing.JComponent popupDetail)
priority- Priority of the notification.
icon- Icon of the notification, if
nullthe deafult warning icon is used. Used in notification balloon or in the notification list popup. The icon of the notification with the highest priority is displayed in the toolbar next to the number of notifications.
title- Title of the notification
balloonDetail- Component displayed inside the popup balloon when notification is created. If
nullno balloon is displayed. Also if there is already balloon of other notification with higher priority displayed then the balloon of current notification is not shown.
popupDetail- Component displayed in the notification list popup.