public final class CmsNotification
extends java.lang.Object
限定符和类型 | 类和说明 |
---|---|
static class |
CmsNotification.Mode
Notification Mode.
|
static class |
CmsNotification.Type
Notification Type.
|
限定符和类型 | 字段和说明 |
---|---|
static int |
ANIMATION_DURATION
The duration of the animations.
|
限定符和类型 | 方法和说明 |
---|---|
static CmsNotification |
get()
Returns the singleton instance.
|
I_CmsNotificationWidget |
getWidget()
Returns the widget.
|
boolean |
hasWidget()
Returns if the notification widget is set.
|
void |
hide()
Hides the notification message.
|
void |
send(CmsNotification.Type type,
java.lang.String message)
Sends a new notification.
|
void |
sendBlocking(CmsNotification.Type type,
java.lang.String message)
Sends a new blocking notification.
|
void |
sendDeferred(CmsNotification.Type type,
java.lang.String message)
Sends a new notification after all other events have been processed.
|
void |
sendSticky(CmsNotification.Type type,
java.lang.String message)
Sends a new sticky notification.
|
void |
setWidget(I_CmsNotificationWidget widget)
Sets the widget.
|
static boolean |
shouldRestoreMessage(CmsNotification.Mode oldMode,
CmsNotification.Mode newMode,
CmsNotification.Type oldType,
CmsNotification.Type newType)
Returns if the message of the old mode and type needs to be restored after a new message has been shown.
|
public static final int ANIMATION_DURATION
public static CmsNotification get()
public static boolean shouldRestoreMessage(CmsNotification.Mode oldMode, CmsNotification.Mode newMode, CmsNotification.Type oldType, CmsNotification.Type newType)
oldMode
- the old modenewMode
- the new modeoldType
- the old typenewType
- the new typetrue
if the message needs to be restoredpublic I_CmsNotificationWidget getWidget()
public boolean hasWidget()
true
if the notification widget is setpublic void hide()
public void send(CmsNotification.Type type, java.lang.String message)
type
- the notification typemessage
- the messagepublic void sendBlocking(CmsNotification.Type type, java.lang.String message)
type
- the notification typemessage
- the messagepublic void sendDeferred(CmsNotification.Type type, java.lang.String message)
type
- the notification typemessage
- the messagepublic void sendSticky(CmsNotification.Type type, java.lang.String message)
type
- the notification typemessage
- the messagepublic void setWidget(I_CmsNotificationWidget widget)
widget
- the widget to set