java.lang.Object
com.dlsc.gemsfx.infocenter.Notification<T>
- Type Parameters:
T- the type of the user object
- All Implemented Interfaces:
Comparable<Notification<T>>
A pure model object containing the data for a
NotificationView.
Notifications can be added to groups (NotificationGroup).- See Also:
-
Property Summary
PropertiesTypePropertyDescriptionfinal javafx.beans.property.ObjectProperty<ZonedDateTime>The time stamp for this notification.final javafx.beans.property.BooleanPropertyA flag that gets updated when the notification's group was expanded or collapsed.final javafx.beans.property.ObjectProperty<javafx.util.Callback<Notification<T>,Notification.OnClickBehaviour>> A callback that determines how the notification and the view will behave when the user clicks on it.final javafx.beans.property.StringPropertyA short summary of the noteworthy thing that happened.final javafx.beans.property.StringPropertyThe title of the notification, e.g.final javafx.beans.property.ObjectProperty<T>An (optional) user object for easy linking between the notification and the business object for which the notification was created, e.g. -
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic enumA list of possible behaviours that are supported when the user clicks on a notification. -
Field Summary
FieldsModifier and TypeFieldDescriptionfinal javafx.beans.property.ObjectProperty<javafx.util.Callback<Notification<T>,Notification.OnClickBehaviour>> -
Constructor Summary
ConstructorsConstructorDescriptionNotification(String title, String summary) Constructs a new notification.Notification(String title, String summary, ZonedDateTime dateTime) Constructs a new notification. -
Method Summary
Modifier and TypeMethodDescriptionintcompareTo(Notification<T> o) final javafx.beans.property.ObjectProperty<ZonedDateTime>The time stamp for this notification.final javafx.beans.property.BooleanPropertyA flag that gets updated when the notification's group was expanded or collapsed.final javafx.collections.ObservableList<NotificationAction>A list of (optional) actions that the user can perform directly from within the notification.final ZonedDateTimeGets the value of the property dateTime.final NotificationGroupgetGroup()The group to which the notification belongs.final javafx.util.Callback<Notification<T>,Notification.OnClickBehaviour> Gets the value of the property onClick.final StringGets the value of the property summary.final StringgetTitle()Gets the value of the property title.final TGets the value of the property userObject.final booleanGets the value of the property expanded.final javafx.beans.property.ObjectProperty<javafx.util.Callback<Notification<T>,Notification.OnClickBehaviour>> A callback that determines how the notification and the view will behave when the user clicks on it.final voidremove()Convenience method to remove the notification from its group / its parent.final voidsetDateTime(ZonedDateTime dateTime) Sets the value of the property dateTime.final voidsetExpanded(boolean expanded) Sets the value of the property expanded.final voidsetOnClick(javafx.util.Callback<Notification<T>, Notification.OnClickBehaviour> onClick) Sets the value of the property onClick.final voidsetSummary(String summary) Sets the value of the property summary.final voidSets the value of the property title.final voidsetUserObject(T userObject) Sets the value of the property userObject.final javafx.beans.property.StringPropertyA short summary of the noteworthy thing that happened.final javafx.beans.property.StringPropertyThe title of the notification, e.g.toString()final javafx.beans.property.ObjectProperty<T>An (optional) user object for easy linking between the notification and the business object for which the notification was created, e.g.
-
Property Details
-
title
public final javafx.beans.property.StringProperty titlePropertyThe title of the notification, e.g. "Purchase Order #123456" when this is the subject of an email for which the notification was created.- See Also:
-
summary
public final javafx.beans.property.StringProperty summaryPropertyA short summary of the noteworthy thing that happened.- See Also:
-
dateTime
The time stamp for this notification.- See Also:
-
userObject
An (optional) user object for easy linking between the notification and the business object for which the notification was created, e.g. an email or a calendar entry.- See Also:
-
expanded
public final javafx.beans.property.BooleanProperty expandedPropertyA flag that gets updated when the notification's group was expanded or collapsed.- See Also:
-
onClick
public final javafx.beans.property.ObjectProperty<javafx.util.Callback<Notification<T>,Notification.OnClickBehaviour>> onClickPropertyA callback that determines how the notification and the view will behave when the user clicks on it. The default behaviour is to hide the view and remove the notification from its group.- See Also:
-
-
Field Details
-
onClick
public final javafx.beans.property.ObjectProperty<javafx.util.Callback<Notification<T>,Notification.OnClickBehaviour>> onClick
-
-
Constructor Details
-
Notification
Constructs a new notification.- Parameters:
title- the title that will usually be shown in boldsummary- a summary text of the noteworthy thing that happeneddateTime- the date and time when the noteworthy thing happened
-
Notification
Constructs a new notification.- Parameters:
title- the title that will usually be shown in boldsummary- a summary text of the noteworthy thing that happened
-
-
Method Details
-
getGroup
The group to which the notification belongs.- Returns:
- the notification's parent
-
remove
public final void remove()Convenience method to remove the notification from its group / its parent. -
getTitle
Gets the value of the property title.- Property description:
- The title of the notification, e.g. "Purchase Order #123456" when this is the subject of an email for which the notification was created.
-
titleProperty
public final javafx.beans.property.StringProperty titleProperty()The title of the notification, e.g. "Purchase Order #123456" when this is the subject of an email for which the notification was created.- See Also:
-
setTitle
Sets the value of the property title.- Property description:
- The title of the notification, e.g. "Purchase Order #123456" when this is the subject of an email for which the notification was created.
-
getSummary
Gets the value of the property summary.- Property description:
- A short summary of the noteworthy thing that happened.
-
summaryProperty
public final javafx.beans.property.StringProperty summaryProperty()A short summary of the noteworthy thing that happened.- See Also:
-
setSummary
Sets the value of the property summary.- Property description:
- A short summary of the noteworthy thing that happened.
-
getDateTime
Gets the value of the property dateTime.- Property description:
- The time stamp for this notification.
-
dateTimeProperty
The time stamp for this notification.- See Also:
-
setDateTime
Sets the value of the property dateTime.- Property description:
- The time stamp for this notification.
-
getActions
A list of (optional) actions that the user can perform directly from within the notification.- Returns:
- a list of possible actions
-
getUserObject
Gets the value of the property userObject.- Property description:
- An (optional) user object for easy linking between the notification and the business object for which the notification was created, e.g. an email or a calendar entry.
-
userObjectProperty
An (optional) user object for easy linking between the notification and the business object for which the notification was created, e.g. an email or a calendar entry.- See Also:
-
setUserObject
Sets the value of the property userObject.- Property description:
- An (optional) user object for easy linking between the notification and the business object for which the notification was created, e.g. an email or a calendar entry.
-
isExpanded
public final boolean isExpanded()Gets the value of the property expanded.- Property description:
- A flag that gets updated when the notification's group was expanded or collapsed.
-
expandedProperty
public final javafx.beans.property.BooleanProperty expandedProperty()A flag that gets updated when the notification's group was expanded or collapsed.- See Also:
-
setExpanded
public final void setExpanded(boolean expanded) Sets the value of the property expanded.- Property description:
- A flag that gets updated when the notification's group was expanded or collapsed.
-
getOnClick
Gets the value of the property onClick.- Property description:
- A callback that determines how the notification and the view will behave when the user clicks on it. The default behaviour is to hide the view and remove the notification from its group.
-
onClickProperty
public final javafx.beans.property.ObjectProperty<javafx.util.Callback<Notification<T>,Notification.OnClickBehaviour>> onClickProperty()A callback that determines how the notification and the view will behave when the user clicks on it. The default behaviour is to hide the view and remove the notification from its group.- See Also:
-
setOnClick
public final void setOnClick(javafx.util.Callback<Notification<T>, Notification.OnClickBehaviour> onClick) Sets the value of the property onClick.- Property description:
- A callback that determines how the notification and the view will behave when the user clicks on it. The default behaviour is to hide the view and remove the notification from its group.
-
toString
-
compareTo
- Specified by:
compareToin interfaceComparable<T>
-