Class NotificationViewConfig
java.lang.Object
com.nomagic.magicdraw.ui.notification.config.NotificationViewConfig
- All Implemented Interfaces:
Cloneable
Helper class containing parameters that controls notification visual attributes and behavior.
-
Nested Class Summary
Nested Classes -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionclone()Returns notification background color.intReturns time amount in seconds for how long notification will be displayed.getIcon()Returns notification icon.booleanvoidsetBackgroundColor(Color backgroundColor) Sets notification background color.voidsetClosable(boolean closable) Indicates if notification can be closable.voidsetExpirationTime(int expirationTime) Sets time amount in seconds for how long notification will be displayed.voidsetHyperlinkLayoutOrientation(NotificationViewConfig.HyperlinkLayoutOrientation hyperlinkLayoutOrientation) Sets how multiple hyperlinks should be layed outvoidSets notification icon.voidsetShowMultipleNotifications(boolean showMultipleNotifications) Sets if same notification can be displayed many times simultaneously.booleanIndicates if same notification can be shown many times simultaneously.
-
Constructor Details
-
NotificationViewConfig
public NotificationViewConfig()
-
-
Method Details
-
getIcon
Returns notification icon.- Returns:
- notification icon
-
setIcon
Sets notification icon.- Parameters:
icon- notification icon
-
getBackgroundColor
Returns notification background color.- Returns:
- notification background color
-
setBackgroundColor
Sets notification background color.- Parameters:
backgroundColor- notification background color.
-
getExpirationTime
public int getExpirationTime()Returns time amount in seconds for how long notification will be displayed.- Returns:
- time amount in seconds
-
setExpirationTime
public void setExpirationTime(int expirationTime) Sets time amount in seconds for how long notification will be displayed.- Parameters:
expirationTime- time amount in seconds
-
showMultipleNotifications
public boolean showMultipleNotifications()Indicates if same notification can be shown many times simultaneously. If multiple requests to show the notification are sent while this property is set to false, only the first request will be honored. All other requests will be ignored.- Returns:
- true if the same notification can be shown many times simultaneously.
-
setShowMultipleNotifications
public void setShowMultipleNotifications(boolean showMultipleNotifications) Sets if same notification can be displayed many times simultaneously.- Parameters:
showMultipleNotifications- notification simultaneous display state
-
getHyperlinkLayoutOrientation
-
setHyperlinkLayoutOrientation
public void setHyperlinkLayoutOrientation(NotificationViewConfig.HyperlinkLayoutOrientation hyperlinkLayoutOrientation) Sets how multiple hyperlinks should be layed out- Parameters:
hyperlinkLayoutOrientation- orientation of hyperlinks
-
clone
-
setClosable
public void setClosable(boolean closable) Indicates if notification can be closable. This flag might be ignored by UI component.- Parameters:
closable- true if closable.
-
isClosable
public boolean isClosable()- Returns:
- true if notification is closable.
-