com.alkacon.geranium.client.ui
public final class Notification extends java.lang.Object
| Modifier and Type | Class and Description |
|---|---|
static class |
Notification.Mode
Notification Mode.
|
static class |
Notification.Type
Notification Type.
|
| Modifier and Type | Field and Description |
|---|---|
static int |
ANIMATION_DURATION
The duration of the animations.
|
| Modifier and Type | Method and Description |
|---|---|
static Notification |
get()
Returns the singleton instance.
|
I_NotificationWidget |
getWidget()
Returns the widget.
|
boolean |
hasWidget()
Returns if the notification widget is set.
|
void |
hide()
Hides the notification message.
|
void |
send(Notification.Type type,
java.lang.String message)
Sends a new notification.
|
void |
sendBlocking(Notification.Type type,
java.lang.String message)
Sends a new blocking notification.
|
void |
sendDeferred(Notification.Type type,
java.lang.String message)
Sends a new notification after all other events have been processed.
|
void |
sendSticky(Notification.Type type,
java.lang.String message)
Sends a new sticky notification.
|
void |
setWidget(I_NotificationWidget widget)
Sets the widget.
|
static boolean |
shouldRestoreMessage(Notification.Mode oldMode,
Notification.Mode newMode,
Notification.Type oldType,
Notification.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 Notification get()
public static boolean shouldRestoreMessage(Notification.Mode oldMode, Notification.Mode newMode, Notification.Type oldType, Notification.Type newType)
oldMode - the old modenewMode - the new modeoldType - the old typenewType - the new typetrue if the message needs to be restoredpublic I_NotificationWidget getWidget()
public boolean hasWidget()
true if the notification widget is setpublic void hide()
public void send(Notification.Type type, java.lang.String message)
type - the notification typemessage - the messagepublic void sendBlocking(Notification.Type type, java.lang.String message)
type - the notification typemessage - the messagepublic void sendDeferred(Notification.Type type, java.lang.String message)
type - the notification typemessage - the messagepublic void sendSticky(Notification.Type type, java.lang.String message)
type - the notification typemessage - the messagepublic void setWidget(I_NotificationWidget widget)
widget - the widget to set