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 class
AbstractNotification.NotificationType
-
Field Summary
Fields Modifier and Type Field Description protected String
details
An optional string with a more detailed information that normally wouldn't fit inside the notification window.protected String
text
Short descriptive text.protected String
title
Notification title.protected TranslationService
ts
Reference to the translation service.protected AbstractNotification.NotificationType
type
What 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 void
close()
Programmatically closes the notification window (might not be supported in all implementations).String
getDetails()
String
getText()
String
getTitle()
AbstractNotification.NotificationType
getType()
abstract void
open()
Displays the notification,void
setDetails(String details)
void
setText(String text)
void
setTitle(String title)
void
setType(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).
-
-