|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.alee.managers.notification.NotificationManager
public final class NotificationManager
This manager allows you to display custom notification popups within the application. You can also add custom actions, set their duration, modify popup styling and use some other advanced features.
WebInnerNotification
,
DisplayType
Field Summary | |
---|---|
protected static boolean |
avoidOverlappingSystemToolbar
Whether notifications displayed in separate windows should avoid overlapping system toolbar or not. |
protected static boolean |
cascade
Whether popups should be cascaded or not. |
protected static int |
cascadeAmount
Amount of cascaded in a row popups. |
protected static DisplayType |
displayType
Notifications display type. |
protected static int |
gap
Gap between notifications. |
protected static int |
location
Notifications display location. |
protected static java.awt.Insets |
margin
Notifications side margin. |
protected static java.util.Map<WebInnerNotification,PopupLayer> |
notificationPopups
Cached notification popups. |
protected static java.util.Map<PopupLayer,NotificationsLayout> |
notificationsLayouts
Cached notification layouts. |
protected static java.util.Map<WebNotification,java.awt.Window> |
notificationWindows
Cached notification windows. |
protected static java.util.Map<java.awt.GraphicsDevice,NotificationsScreenLayout> |
screenLayouts
Special layouts for notification windows. |
Fields inherited from interface javax.swing.SwingConstants |
---|
BOTTOM, CENTER, EAST, HORIZONTAL, LEADING, LEFT, NEXT, NORTH, NORTH_EAST, NORTH_WEST, PREVIOUS, RIGHT, SOUTH, SOUTH_EAST, SOUTH_WEST, TOP, TRAILING, VERTICAL, WEST |
Constructor Summary | |
---|---|
NotificationManager()
|
Method Summary | |
---|---|
static int |
getCascadeAmount()
Returns amount of cascaded in a row popups. |
static DisplayType |
getDisplayType()
Retyrns notification display type. |
static int |
getGap()
Returns gap between notifications. |
static int |
getLocation()
Returns notifications display location. |
static java.awt.Insets |
getMargin()
Returns notifications side margin. |
static void |
hideAllNotifications()
Hides all visible notifications. |
static boolean |
isAvoidOverlappingSystemToolbar()
Returns whether notifications displayed in separate windows should avoid overlapping system toolbar or not. |
static boolean |
isCascade()
Returns whether popups should be cascaded or not. |
static void |
setAvoidOverlappingSystemToolbar(boolean avoid)
Sets whether notifications displayed in separate windows should avoid overlapping system toolbar or not. |
static void |
setCascade(boolean cascade)
Sets whether popups should be cascaded or not. |
static void |
setCascadeAmount(int cascadeAmount)
Sets amount of cascaded in a row popups. |
static void |
setDisplayType(DisplayType displayType)
Sets notification display type. |
static void |
setGap(int gap)
Sets gap between notifications. |
static void |
setLocation(int location)
Sets notifications display location. |
static void |
setMargin(java.awt.Insets margin)
Sets notifications side margin. |
static void |
setMargin(int margin)
Sets notifications side margin. |
static void |
setMargin(int top,
int left,
int bottom,
int right)
Sets notifications side margin. |
static WebInnerNotification |
showInnerNotification(java.awt.Component content)
Returns displayed notification. |
static WebInnerNotification |
showInnerNotification(java.awt.Component showFor,
java.awt.Component content)
Returns displayed notification. |
static WebInnerNotification |
showInnerNotification(java.awt.Component showFor,
java.awt.Component content,
javax.swing.Icon icon)
Returns displayed notification. |
static WebInnerNotification |
showInnerNotification(java.awt.Component showFor,
java.awt.Component content,
javax.swing.Icon icon,
NotificationOption... options)
Returns displayed notification. |
static WebInnerNotification |
showInnerNotification(java.awt.Component showFor,
java.awt.Component content,
NotificationOption... options)
Returns displayed notification. |
static WebInnerNotification |
showInnerNotification(java.awt.Component content,
javax.swing.Icon icon)
Returns displayed notification. |
static WebInnerNotification |
showInnerNotification(java.awt.Component content,
javax.swing.Icon icon,
NotificationOption... options)
Returns displayed notification. |
static WebInnerNotification |
showInnerNotification(java.awt.Component content,
NotificationOption... options)
Returns displayed notification. |
static WebInnerNotification |
showInnerNotification(java.awt.Component showFor,
java.lang.String content)
Returns displayed notification. |
static WebInnerNotification |
showInnerNotification(java.awt.Component showFor,
java.lang.String content,
javax.swing.Icon icon)
Returns displayed notification. |
static WebInnerNotification |
showInnerNotification(java.awt.Component showFor,
java.lang.String content,
javax.swing.Icon icon,
NotificationOption... options)
Returns displayed notification. |
static WebInnerNotification |
showInnerNotification(java.awt.Component showFor,
java.lang.String content,
NotificationOption... options)
Returns displayed notification. |
static WebInnerNotification |
showInnerNotification(java.awt.Component showFor,
WebInnerNotification notification)
Displays notification on popup layer. |
static WebInnerNotification |
showInnerNotification(java.lang.String content)
Returns displayed notification. |
static WebInnerNotification |
showInnerNotification(java.lang.String content,
javax.swing.Icon icon)
Returns displayed notification. |
static WebInnerNotification |
showInnerNotification(java.lang.String content,
javax.swing.Icon icon,
NotificationOption... options)
Returns displayed notification. |
static WebInnerNotification |
showInnerNotification(java.lang.String content,
NotificationOption... options)
Returns displayed notification. |
static WebInnerNotification |
showInnerNotification(WebInnerNotification notification)
Displays notification on popup layer. |
static WebNotification |
showNotification(java.awt.Component content)
Returns displayed notification. |
static WebNotification |
showNotification(java.awt.Component showFor,
java.awt.Component content)
Returns displayed notification. |
static WebNotification |
showNotification(java.awt.Component showFor,
java.awt.Component content,
javax.swing.Icon icon)
Returns displayed notification. |
static WebNotification |
showNotification(java.awt.Component showFor,
java.awt.Component content,
javax.swing.Icon icon,
NotificationOption... options)
Returns displayed notification. |
static WebNotification |
showNotification(java.awt.Component showFor,
java.awt.Component content,
NotificationOption... options)
Returns displayed notification. |
static WebNotification |
showNotification(java.awt.Component content,
javax.swing.Icon icon)
Returns displayed notification. |
static WebNotification |
showNotification(java.awt.Component content,
javax.swing.Icon icon,
NotificationOption... options)
Returns displayed notification. |
static WebNotification |
showNotification(java.awt.Component content,
NotificationOption... options)
Returns displayed notification. |
static WebNotification |
showNotification(java.awt.Component showFor,
java.lang.String content)
Returns displayed notification. |
static WebNotification |
showNotification(java.awt.Component showFor,
java.lang.String content,
javax.swing.Icon icon)
Returns displayed notification. |
static WebNotification |
showNotification(java.awt.Component showFor,
java.lang.String content,
javax.swing.Icon icon,
NotificationOption... options)
Returns displayed notification. |
static WebNotification |
showNotification(java.awt.Component showFor,
java.lang.String content,
NotificationOption... options)
Returns displayed notification. |
static WebNotification |
showNotification(java.awt.Component showFor,
WebNotification notification)
Displays notification in window. |
static WebNotification |
showNotification(java.lang.String content)
Returns displayed notification. |
static WebNotification |
showNotification(java.lang.String content,
javax.swing.Icon icon)
Returns displayed notification. |
static WebNotification |
showNotification(java.lang.String content,
javax.swing.Icon icon,
NotificationOption... options)
Returns displayed notification. |
static WebNotification |
showNotification(java.lang.String content,
NotificationOption... options)
Returns displayed notification. |
static WebNotification |
showNotification(WebNotification notification)
Displays notification in window. |
static void |
updateNotificationLayouts()
Optimized layout updates for all visible notifications. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
protected static int location
protected static DisplayType displayType
protected static java.awt.Insets margin
protected static int gap
protected static boolean cascade
protected static int cascadeAmount
protected static boolean avoidOverlappingSystemToolbar
protected static final java.util.Map<PopupLayer,NotificationsLayout> notificationsLayouts
protected static final java.util.Map<WebInnerNotification,PopupLayer> notificationPopups
protected static final java.util.Map<java.awt.GraphicsDevice,NotificationsScreenLayout> screenLayouts
protected static final java.util.Map<WebNotification,java.awt.Window> notificationWindows
Constructor Detail |
---|
public NotificationManager()
Method Detail |
---|
public static int getLocation()
public static void setLocation(int location)
location
- new notifications display locationpublic static DisplayType getDisplayType()
public static void setDisplayType(DisplayType displayType)
displayType
- new notification display typepublic static java.awt.Insets getMargin()
public static void setMargin(int margin)
margin
- marginpublic static void setMargin(int top, int left, int bottom, int right)
top
- top marginleft
- left marginbottom
- bottom marginright
- right marginpublic static void setMargin(java.awt.Insets margin)
margin
- new notifications side marginpublic static int getGap()
public static void setGap(int gap)
gap
- new gap between notificationspublic static boolean isCascade()
public static void setCascade(boolean cascade)
cascade
- whether popups should be cascaded or notpublic static int getCascadeAmount()
public static void setCascadeAmount(int cascadeAmount)
cascadeAmount
- new amount of cascaded in a row popupspublic static boolean isAvoidOverlappingSystemToolbar()
public static void setAvoidOverlappingSystemToolbar(boolean avoid)
avoid
- whether notifications displayed in separate windows should avoid overlapping system toolbar or notpublic static void updateNotificationLayouts()
public static void hideAllNotifications()
public static WebNotification showNotification(java.lang.String content)
content
- notification text content
public static WebNotification showNotification(java.lang.String content, javax.swing.Icon icon)
content
- notification text contenticon
- notification icon
public static WebNotification showNotification(java.awt.Component showFor, java.lang.String content)
showFor
- component used to determine notification parent windowcontent
- notification text content
public static WebNotification showNotification(java.awt.Component showFor, java.lang.String content, javax.swing.Icon icon)
showFor
- component used to determine notification parent windowcontent
- notification text contenticon
- notification icon
public static WebNotification showNotification(java.awt.Component content)
content
- notification content
public static WebNotification showNotification(java.awt.Component content, javax.swing.Icon icon)
content
- notification contenticon
- notification icon
public static WebNotification showNotification(java.awt.Component showFor, java.awt.Component content)
showFor
- component used to determine notification parent windowcontent
- notification content
public static WebNotification showNotification(java.awt.Component showFor, java.awt.Component content, javax.swing.Icon icon)
showFor
- component used to determine notification parent windowcontent
- notification contenticon
- notification icon
public static WebNotification showNotification(java.lang.String content, NotificationOption... options)
content
- notification text contentoptions
- notification selectable options
public static WebNotification showNotification(java.lang.String content, javax.swing.Icon icon, NotificationOption... options)
content
- notification text contenticon
- notification iconoptions
- notification selectable options
public static WebNotification showNotification(java.awt.Component showFor, java.lang.String content, NotificationOption... options)
showFor
- component used to determine notification parent windowcontent
- notification text contentoptions
- notification selectable options
public static WebNotification showNotification(java.awt.Component showFor, java.lang.String content, javax.swing.Icon icon, NotificationOption... options)
showFor
- component used to determine notification parent windowcontent
- notification text contenticon
- notification iconoptions
- notification selectable options
public static WebNotification showNotification(java.awt.Component content, NotificationOption... options)
content
- notification contentoptions
- notification selectable options
public static WebNotification showNotification(java.awt.Component content, javax.swing.Icon icon, NotificationOption... options)
content
- notification contenticon
- notification iconoptions
- notification selectable options
public static WebNotification showNotification(java.awt.Component showFor, java.awt.Component content, NotificationOption... options)
showFor
- component used to determine notification parent windowcontent
- notification contentoptions
- notification selectable options
public static WebNotification showNotification(java.awt.Component showFor, java.awt.Component content, javax.swing.Icon icon, NotificationOption... options)
showFor
- component used to determine notification parent windowcontent
- notification contenticon
- notification iconoptions
- notification selectable options
public static WebNotification showNotification(WebNotification notification)
notification
- notification to displaypublic static WebNotification showNotification(java.awt.Component showFor, WebNotification notification)
showFor
- component used to determine notification parent windownotification
- notification to displaypublic static WebInnerNotification showInnerNotification(java.lang.String content)
content
- notification text content
public static WebInnerNotification showInnerNotification(java.lang.String content, javax.swing.Icon icon)
content
- notification text contenticon
- notification icon
public static WebInnerNotification showInnerNotification(java.awt.Component showFor, java.lang.String content)
showFor
- component used to determine window where notification should be displayedcontent
- notification text content
public static WebInnerNotification showInnerNotification(java.awt.Component showFor, java.lang.String content, javax.swing.Icon icon)
showFor
- component used to determine window where notification should be displayedcontent
- notification text contenticon
- notification icon
public static WebInnerNotification showInnerNotification(java.awt.Component content)
content
- notification content
public static WebInnerNotification showInnerNotification(java.awt.Component content, javax.swing.Icon icon)
content
- notification contenticon
- notification icon
public static WebInnerNotification showInnerNotification(java.awt.Component showFor, java.awt.Component content)
showFor
- component used to determine window where notification should be displayedcontent
- notification content
public static WebInnerNotification showInnerNotification(java.awt.Component showFor, java.awt.Component content, javax.swing.Icon icon)
showFor
- component used to determine window where notification should be displayedcontent
- notification contenticon
- notification icon
public static WebInnerNotification showInnerNotification(java.lang.String content, NotificationOption... options)
content
- notification text contentoptions
- notification selectable options
public static WebInnerNotification showInnerNotification(java.lang.String content, javax.swing.Icon icon, NotificationOption... options)
content
- notification text contenticon
- notification iconoptions
- notification selectable options
public static WebInnerNotification showInnerNotification(java.awt.Component showFor, java.lang.String content, NotificationOption... options)
showFor
- component used to determine window where notification should be displayedcontent
- notification text contentoptions
- notification selectable options
public static WebInnerNotification showInnerNotification(java.awt.Component showFor, java.lang.String content, javax.swing.Icon icon, NotificationOption... options)
showFor
- component used to determine window where notification should be displayedcontent
- notification text contenticon
- notification iconoptions
- notification selectable options
public static WebInnerNotification showInnerNotification(java.awt.Component content, NotificationOption... options)
content
- notification contentoptions
- notification selectable options
public static WebInnerNotification showInnerNotification(java.awt.Component content, javax.swing.Icon icon, NotificationOption... options)
content
- notification contenticon
- notification iconoptions
- notification selectable options
public static WebInnerNotification showInnerNotification(java.awt.Component showFor, java.awt.Component content, NotificationOption... options)
showFor
- component used to determine window where notification should be displayedcontent
- notification contentoptions
- notification selectable options
public static WebInnerNotification showInnerNotification(java.awt.Component showFor, java.awt.Component content, javax.swing.Icon icon, NotificationOption... options)
showFor
- component used to determine window where notification should be displayedcontent
- notification contenticon
- notification iconoptions
- notification selectable options
public static WebInnerNotification showInnerNotification(WebInnerNotification notification)
notification
- notification to displaypublic static WebInnerNotification showInnerNotification(java.awt.Component showFor, WebInnerNotification notification)
showFor
- component used to determine window where notification should be displayednotification
- notification to display
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |