Class AbstractNotification
- java.lang.Object
-
- org.neotropic.util.visual.notifications.AbstractNotification
-
- Direct Known Subclasses:
DetailedNotification,SimpleNotification
public abstract class AbstractNotification extends Object
A feedback message displayed after the execution of an action. Subclasses can customize the way they are displayed- Author:
- Charles Edward Bedon Cortazar <charles.bedon@kuwaiba.org>
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classAbstractNotification.NotificationType
-
Field Summary
Fields Modifier and Type Field Description protected StringdetailsAn optional string with a more detailed information that normally wouldn't fit inside the notification window.protected StringtextShort descriptive text.protected StringtitleNotification title.protected TranslationServicetsReference to the translation service.protected AbstractNotification.NotificationTypetypeWhat kind of information is intended to be displayed.
-
Constructor Summary
Constructors Constructor Description AbstractNotification(String title, String text, AbstractNotification.NotificationType type, TranslationService ts)
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description abstract voidclose()Programmatically closes the notification window (might not be supported in all implementations).StringgetDetails()StringgetText()StringgetTitle()AbstractNotification.NotificationTypegetType()abstract voidopen()Displays the notification,voidsetDetails(String details)voidsetText(String text)voidsetTitle(String title)voidsetType(AbstractNotification.NotificationType type)
-
-
-
Field Detail
-
title
protected String title
Notification title.
-
text
protected String text
Short descriptive text.
-
type
protected AbstractNotification.NotificationType type
What kind of information is intended to be displayed.
-
ts
protected TranslationService ts
Reference to the translation service.
-
details
protected String details
An optional string with a more detailed information that normally wouldn't fit inside the notification window. If this value is different from null, a "details" link should be provided by the subclass implementation.
-
-
Constructor Detail
-
AbstractNotification
public AbstractNotification(String title, String text, AbstractNotification.NotificationType type, TranslationService ts)
-
-
Method Detail
-
getTitle
public String getTitle()
-
setTitle
public void setTitle(String title)
-
getText
public String getText()
-
setText
public void setText(String text)
-
getDetails
public String getDetails()
-
setDetails
public void setDetails(String details)
-
getType
public AbstractNotification.NotificationType getType()
-
setType
public void setType(AbstractNotification.NotificationType type)
-
open
public abstract void open()
Displays the notification,
-
close
public abstract void close()
Programmatically closes the notification window (might not be supported in all implementations).
-
-