Class Notification
java.lang.Object
com.nomagic.magicdraw.ui.notification.AbstractNotification
com.nomagic.magicdraw.ui.notification.Notification
- All Implemented Interfaces:
Serializable
This class contains data used to construct and display MagicDraw notification. Notification can be displayed as separate popup in lower right corner or in designated area of control. NOTE: although HTML tags are supported, the notification title/text should not be wrapped into <html><body></body></html> tags as during the construction of the notification's popup, such wrapping is already done by the notification manager.
- See Also:
-
Nested Class Summary
Modifier and TypeClassDescriptionstatic enum
Context enum indicates notification origin. -
Constructor Summary
ConstructorDescriptionNotification
(String id, String title) Constructs notification with specified id and title.Notification
(String id, String title, String text) Constructs notification with specified id, title and text.Notification
(String id, String title, String text, HRefRunnable[] actions) Constructs notification with specified id, title, text and list of actions user can perform upon notification.Notification
(String id, String title, String text, HRefRunnable[] actions, NotificationSeverity severity) Constructs notification with specified id, title, text, severity and list of actions user can perform upon notification.Notification
(String id, String title, String text, HRefRunnable[] actions, NotificationSeverity severity, Notification.Context context) Constructs notification with specified id, title, text, severity, context and list of actions user can perform upon notification.Notification
(String id, String title, String text, NotificationSeverity severity) Constructs notification with specified id, title, text and severity.Notification
(String id, String title, String text, String longText) Constructs notification with specified id, title, short and long text description.Notification
(String id, String title, String text, String longText, HRefRunnable[] actions) Constructs notification with specified id, title, short description, long description and list of actions user can perform upon notification.Notification
(String id, String title, String text, String longText, HRefRunnable[] actions, NotificationSeverity severity) Constructs notification with specified id, title, short text, long text, severity and list of actions user can perform upon notification.Notification
(String id, String title, String text, String longText, HRefRunnable[] actions, NotificationSeverity severity, Notification.Context context) Constructs notification with specified id, title, short text, long text, severity, context and list of actions user can perform upon notification.Notification
(String id, String title, String text, String longText, NotificationSeverity severity) Constructs notification with specified id, title, short description, long description and severity. -
Method Summary
Modifier and TypeMethodDescriptionboolean
Returns notification contextReturns notification severityint
hashCode()
boolean
void
setContext
(Notification.Context context) Sets new notification contextvoid
setLogExpanded
(boolean logExpanded) void
setLongText
(String longText) Sets notification long textvoid
setSeverity
(NotificationSeverity severity) Sets notification severityMethods inherited from class com.nomagic.magicdraw.ui.notification.AbstractNotification
addHRefAction, getHRefAction, getID, getLongText, getText, getTitle, removeHRefAction, removeHRefAction, setText, setTitle
-
Constructor Details
-
Notification
public Notification() -
Notification
Constructs notification with specified id and title. Default ENVIRONMENT context and INFO severity is used while creating notification. No actions or text is set for this notification- Parameters:
id
- notification unique idtitle
- notification title
-
Notification
Constructs notification with specified id, title and text. Default ENVIRONMENT context and INFO severity is used while creating notification. No actions are set for this notification- Parameters:
id
- notification unique idtitle
- notification titletext
- notification text
-
Notification
public Notification(String id, @CheckForNull String title, @CheckForNull String text, @CheckForNull String longText) Constructs notification with specified id, title, short and long text description. Default ENVIRONMENT context and INFO severity is used while creating notification. No actions are set for this notification- Parameters:
id
- notification unique idtitle
- notification titletext
- notification textlongText
- notification long text
-
Notification
public Notification(String id, @CheckForNull String title, @CheckForNull String text, NotificationSeverity severity) Constructs notification with specified id, title, text and severity. Default ENVIRONMENT context is used while creating notification. No actions are set for this notification- Parameters:
id
- notification unique idtitle
- notification titletext
- notification textseverity
- notification severity
-
Notification
public Notification(String id, @CheckForNull String title, @CheckForNull String text, @CheckForNull String longText, NotificationSeverity severity) Constructs notification with specified id, title, short description, long description and severity. Default ENVIRONMENT context is used while creating notification. No actions are set for this notification- Parameters:
id
- notification unique idtitle
- notification titletext
- notification textlongText
- notification long textseverity
- notification severity
-
Notification
public Notification(String id, @CheckForNull String title, @CheckForNull String text, @CheckForNull HRefRunnable[] actions) Constructs notification with specified id, title, text and list of actions user can perform upon notification. Default ENVIRONMENT context and severity INFO is set while creating notification.- Parameters:
id
- notification unique idtitle
- notification titletext
- notification textactions
- list of actions user can take
-
Notification
public Notification(String id, @CheckForNull String title, @CheckForNull String text, @CheckForNull String longText, @CheckForNull HRefRunnable[] actions) Constructs notification with specified id, title, short description, long description and list of actions user can perform upon notification. Default ENVIRONMENT context and severity INFO is set while creating notification.- Parameters:
id
- notification unique idtitle
- notification titletext
- notification textlongText
- notification long textactions
- list of actions user can take
-
Notification
public Notification(String id, @CheckForNull String title, @CheckForNull String text, @CheckForNull HRefRunnable[] actions, NotificationSeverity severity) Constructs notification with specified id, title, text, severity and list of actions user can perform upon notification. Default ENVIRONMENT context is set while creating notification.- Parameters:
id
- notification unique idtitle
- notification titletext
- notification textactions
- list of actions user can takeseverity
- notification severity level
-
Notification
public Notification(String id, @CheckForNull String title, @CheckForNull String text, @CheckForNull String longText, @CheckForNull HRefRunnable[] actions, NotificationSeverity severity) Constructs notification with specified id, title, short text, long text, severity and list of actions user can perform upon notification. Default ENVIRONMENT context is set while creating notification.- Parameters:
id
- notification unique idtitle
- notification titletext
- notification textactions
- list of actions user can takeseverity
- notification severity level
-
Notification
public Notification(String id, @CheckForNull String title, @CheckForNull String text, @CheckForNull HRefRunnable[] actions, NotificationSeverity severity, Notification.Context context) Constructs notification with specified id, title, text, severity, context and list of actions user can perform upon notification.- Parameters:
id
- notification unique idtitle
- notification titletext
- notification textactions
- list of actions user can takeseverity
- notification severity levelcontext
- notification context
-
Notification
public Notification(String id, @CheckForNull String title, @CheckForNull String text, @CheckForNull String longText, @CheckForNull HRefRunnable[] actions, NotificationSeverity severity, Notification.Context context) Constructs notification with specified id, title, short text, long text, severity, context and list of actions user can perform upon notification.- Parameters:
id
- notification unique idtitle
- notification titletext
- notification textlongText
- notification long textactions
- list of actions user can takeseverity
- notification severity levelcontext
- notification context
-
-
Method Details
-
getSeverity
Returns notification severity- Returns:
- notification severity
-
setSeverity
Sets notification severity- Parameters:
severity
- new notification severity
-
getContext
Returns notification context- Returns:
- notification context
-
setContext
Sets new notification context- Parameters:
context
- notification context
-
setLongText
Description copied from class:AbstractNotification
Sets notification long text- Overrides:
setLongText
in classAbstractNotification
- Parameters:
longText
- notification long text
-
isLogExpanded
public boolean isLogExpanded() -
setLogExpanded
public void setLogExpanded(boolean logExpanded) -
equals
-
hashCode
public int hashCode()
-