Module com.dlsc.gemsfx
Package com.dlsc.gemsfx.infocenter
Class NotificationGroup<T,S extends Notification<T>>
java.lang.Object
com.dlsc.gemsfx.infocenter.NotificationGroup<T,S>
- Type Parameters:
T- the type of the business / user objectsS- the type of the notifications
- All Implemented Interfaces:
Comparable<NotificationGroup>
public class NotificationGroup<T,S extends Notification<T>>
extends Object
implements Comparable<NotificationGroup>
The model object used to group a list of notifications. Each group can hold notifications of
a specific type. Each group also has its own view factory for notifications so that different
groups can display notifications in different ways.
-
Property Summary
PropertiesTypePropertyDescriptionfinal javafx.beans.property.BooleanPropertyA flag used to control whether the group will automatically change to "collapsed" state once the group is down to less than two notifications.final javafx.beans.property.BooleanPropertyA flag used to signal whether the group should be shown expanded or stacked.final javafx.beans.property.IntegerPropertyA number that determines how many notifications can be shown in the group before the "show all" button will be accessible.final javafx.beans.property.StringPropertyThe group's name.final javafx.beans.property.BooleanPropertyDetermines whether the user is allowed to pin the group so that is always stays visible at the top of the info center.final javafx.beans.property.BooleanPropertyPinned groups will always be shown at the top of the info center.final javafx.beans.property.BooleanPropertyDetermines if this group will show its name and controls when in expanded state.final javafx.beans.property.IntegerPropertyAn (optional) value for the sort order.final javafx.beans.property.ObjectProperty<javafx.util.Callback<S,NotificationView<T, S>>> A callback used to create theNotificationViewinstances for the info center. -
Field Summary
FieldsModifier and TypeFieldDescriptionfinal javafx.beans.property.BooleanPropertyfinal javafx.beans.property.BooleanPropertyfinal javafx.beans.property.BooleanProperty -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionfinal javafx.beans.property.BooleanPropertyA flag used to control whether the group will automatically change to "collapsed" state once the group is down to less than two notifications.intfinal javafx.beans.property.BooleanPropertyA flag used to signal whether the group should be shown expanded or stacked.final intGets the value of the property maximumNumberOfNotifications.final StringgetName()Gets the value of the property name.final javafx.collections.ObservableList<S>The list of notifications in the group.final IntegerGets the value of the property sortOrder.final javafx.util.Callback<S,NotificationView<T, S>> Gets the value of the property viewFactory.final booleanGets the value of the property autoCollapse.final booleanGets the value of the property expanded.final booleanGets the value of the property pinnable.final booleanisPinned()Gets the value of the property pinned.final booleanGets the value of the property showHeader.final javafx.beans.property.IntegerPropertyA number that determines how many notifications can be shown in the group before the "show all" button will be accessible.final javafx.beans.property.StringPropertyThe group's name.final javafx.beans.property.BooleanPropertyDetermines whether the user is allowed to pin the group so that is always stays visible at the top of the info center.final javafx.beans.property.BooleanPropertyPinned groups will always be shown at the top of the info center.final voidsetAutoCollapse(boolean autoCollapse) Sets the value of the property autoCollapse.final voidsetExpanded(boolean expanded) Sets the value of the property expanded.final voidsetMaximumNumberOfNotifications(int maximumNumberOfNotifications) Sets the value of the property maximumNumberOfNotifications.final voidSets the value of the property name.final voidsetPinnable(boolean pinnable) Sets the value of the property pinnable.final voidsetPinned(boolean pinned) Sets the value of the property pinned.final voidsetShowHeader(boolean showHeader) Sets the value of the property showHeader.final voidsetSortOrder(Integer sortOrder) Sets the value of the property sortOrder.final voidsetViewFactory(javafx.util.Callback<S, NotificationView<T, S>> viewFactory) Sets the value of the property viewFactory.final javafx.beans.property.BooleanPropertyDetermines if this group will show its name and controls when in expanded state.final javafx.beans.property.IntegerPropertyAn (optional) value for the sort order.final javafx.beans.property.ObjectProperty<javafx.util.Callback<S,NotificationView<T, S>>> A callback used to create theNotificationViewinstances for the info center.
-
Property Details
-
name
public final javafx.beans.property.StringProperty namePropertyThe group's name.- See Also:
-
sortOrder
public final javafx.beans.property.IntegerProperty sortOrderPropertyAn (optional) value for the sort order. Can be used to influence the order in which the groups are showing up in the info center. The value can be null.- See Also:
-
expanded
public final javafx.beans.property.BooleanProperty expandedPropertyA flag used to signal whether the group should be shown expanded or stacked.- See Also:
-
showHeader
public final javafx.beans.property.BooleanProperty showHeaderPropertyDetermines if this group will show its name and controls when in expanded state. Default is true.- See Also:
-
pinnable
public final javafx.beans.property.BooleanProperty pinnablePropertyDetermines whether the user is allowed to pin the group so that is always stays visible at the top of the info center.- See Also:
-
pinned
public final javafx.beans.property.BooleanProperty pinnedPropertyPinned groups will always be shown at the top of the info center. They can not be scrolled out of the visible area.- See Also:
-
viewFactory
public final javafx.beans.property.ObjectProperty<javafx.util.Callback<S extends Notification<T>,NotificationView<T, viewFactoryPropertyS extends Notification<T>>>> A callback used to create theNotificationViewinstances for the info center. Each group can have its own factory and customize the notification views.- See Also:
-
maximumNumberOfNotifications
public final javafx.beans.property.IntegerProperty maximumNumberOfNotificationsPropertyA number that determines how many notifications can be shown in the group before the "show all" button will be accessible. When the user presses this button the info center will switch to a different layout and display only this group's notifications inside aListView. -
autoCollapse
public final javafx.beans.property.BooleanProperty autoCollapsePropertyA flag used to control whether the group will automatically change to "collapsed" state once the group is down to less than two notifications. This behaviour is application-specific and some might choose to always keep the last expansion state, some might prefer to always return to a collapsed state to avoid clutter in the UI.- See Also:
-
-
Field Details
-
showHeader
public final javafx.beans.property.BooleanProperty showHeader -
pinnable
public final javafx.beans.property.BooleanProperty pinnable -
pinned
public final javafx.beans.property.BooleanProperty pinned
-
-
Constructor Details
-
NotificationGroup
-
-
Method Details
-
getName
Gets the value of the property name.- Property description:
- The group's name.
-
nameProperty
public final javafx.beans.property.StringProperty nameProperty()The group's name.- See Also:
-
setName
Sets the value of the property name.- Property description:
- The group's name.
-
getSortOrder
Gets the value of the property sortOrder.- Property description:
- An (optional) value for the sort order. Can be used to influence the order in which the groups are showing up in the info center. The value can be null.
-
sortOrderProperty
public final javafx.beans.property.IntegerProperty sortOrderProperty()An (optional) value for the sort order. Can be used to influence the order in which the groups are showing up in the info center. The value can be null.- See Also:
-
setSortOrder
Sets the value of the property sortOrder.- Property description:
- An (optional) value for the sort order. Can be used to influence the order in which the groups are showing up in the info center. The value can be null.
-
getNotifications
The list of notifications in the group.- Returns:
- the list of notifications
-
isExpanded
public final boolean isExpanded()Gets the value of the property expanded.- Property description:
- A flag used to signal whether the group should be shown expanded or stacked.
-
expandedProperty
public final javafx.beans.property.BooleanProperty expandedProperty()A flag used to signal whether the group should be shown expanded or stacked.- See Also:
-
setExpanded
public final void setExpanded(boolean expanded) Sets the value of the property expanded.- Property description:
- A flag used to signal whether the group should be shown expanded or stacked.
-
isShowHeader
public final boolean isShowHeader()Gets the value of the property showHeader.- Property description:
- Determines if this group will show its name and controls when in expanded state. Default is true.
-
showHeaderProperty
public final javafx.beans.property.BooleanProperty showHeaderProperty()Determines if this group will show its name and controls when in expanded state. Default is true.- See Also:
-
setShowHeader
public final void setShowHeader(boolean showHeader) Sets the value of the property showHeader.- Property description:
- Determines if this group will show its name and controls when in expanded state. Default is true.
-
isPinnable
public final boolean isPinnable()Gets the value of the property pinnable.- Property description:
- Determines whether the user is allowed to pin the group so that is always stays visible at the top of the info center.
-
pinnableProperty
public final javafx.beans.property.BooleanProperty pinnableProperty()Determines whether the user is allowed to pin the group so that is always stays visible at the top of the info center.- See Also:
-
setPinnable
public final void setPinnable(boolean pinnable) Sets the value of the property pinnable.- Property description:
- Determines whether the user is allowed to pin the group so that is always stays visible at the top of the info center.
-
isPinned
public final boolean isPinned()Gets the value of the property pinned.- Property description:
- Pinned groups will always be shown at the top of the info center. They can not be scrolled out of the visible area.
-
pinnedProperty
public final javafx.beans.property.BooleanProperty pinnedProperty()Pinned groups will always be shown at the top of the info center. They can not be scrolled out of the visible area.- See Also:
-
setPinned
public final void setPinned(boolean pinned) Sets the value of the property pinned.- Property description:
- Pinned groups will always be shown at the top of the info center. They can not be scrolled out of the visible area.
-
getViewFactory
Gets the value of the property viewFactory.- Property description:
- A callback used to create the
NotificationViewinstances for the info center. Each group can have its own factory and customize the notification views.
-
viewFactoryProperty
public final javafx.beans.property.ObjectProperty<javafx.util.Callback<S,NotificationView<T, viewFactoryProperty()S>>> A callback used to create theNotificationViewinstances for the info center. Each group can have its own factory and customize the notification views.- See Also:
-
setViewFactory
Sets the value of the property viewFactory.- Property description:
- A callback used to create the
NotificationViewinstances for the info center. Each group can have its own factory and customize the notification views.
-
getMaximumNumberOfNotifications
public final int getMaximumNumberOfNotifications()Gets the value of the property maximumNumberOfNotifications.- Property description:
- A number that determines how many notifications can be shown in the group before the
"show all" button will be accessible. When the user presses this button the info center
will switch to a different layout and display only this group's notifications inside
a
ListView.
-
maximumNumberOfNotificationsProperty
public final javafx.beans.property.IntegerProperty maximumNumberOfNotificationsProperty()A number that determines how many notifications can be shown in the group before the "show all" button will be accessible. When the user presses this button the info center will switch to a different layout and display only this group's notifications inside aListView. -
setMaximumNumberOfNotifications
public final void setMaximumNumberOfNotifications(int maximumNumberOfNotifications) Sets the value of the property maximumNumberOfNotifications.- Property description:
- A number that determines how many notifications can be shown in the group before the
"show all" button will be accessible. When the user presses this button the info center
will switch to a different layout and display only this group's notifications inside
a
ListView.
-
isAutoCollapse
public final boolean isAutoCollapse()Gets the value of the property autoCollapse.- Property description:
- A flag used to control whether the group will automatically change to "collapsed" state once the group is down to less than two notifications. This behaviour is application-specific and some might choose to always keep the last expansion state, some might prefer to always return to a collapsed state to avoid clutter in the UI.
-
autoCollapseProperty
public final javafx.beans.property.BooleanProperty autoCollapseProperty()A flag used to control whether the group will automatically change to "collapsed" state once the group is down to less than two notifications. This behaviour is application-specific and some might choose to always keep the last expansion state, some might prefer to always return to a collapsed state to avoid clutter in the UI.- See Also:
-
setAutoCollapse
public final void setAutoCollapse(boolean autoCollapse) Sets the value of the property autoCollapse.- Property description:
- A flag used to control whether the group will automatically change to "collapsed" state once the group is down to less than two notifications. This behaviour is application-specific and some might choose to always keep the last expansion state, some might prefer to always return to a collapsed state to avoid clutter in the UI.
-
compareTo
- Specified by:
compareToin interfaceComparable<T>
-