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 objects
S - 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

    Properties
    Type
    Property
    Description
    final javafx.beans.property.BooleanProperty
    A 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.BooleanProperty
    A flag used to signal whether the group should be shown expanded or stacked.
    final javafx.beans.property.IntegerProperty
    A number that determines how many notifications can be shown in the group before the "show all" button will be accessible.
    final javafx.beans.property.StringProperty
    The group's name.
    final javafx.beans.property.BooleanProperty
    Determines 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.BooleanProperty
    Pinned groups will always be shown at the top of the info center.
    final javafx.beans.property.BooleanProperty
    Determines if this group will show its name and controls when in expanded state.
    final javafx.beans.property.IntegerProperty
    An (optional) value for the sort order.
    final javafx.beans.property.ObjectProperty<javafx.util.Callback<S,NotificationView<T,S>>>
    A callback used to create the NotificationView instances for the info center.
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    final javafx.beans.property.BooleanProperty
     
    final javafx.beans.property.BooleanProperty
     
    final javafx.beans.property.BooleanProperty
     
  • Constructor Summary

    Constructors
    Constructor
    Description
     
  • Method Summary

    Modifier and Type
    Method
    Description
    final javafx.beans.property.BooleanProperty
    A flag used to control whether the group will automatically change to "collapsed" state once the group is down to less than two notifications.
    int
     
    final javafx.beans.property.BooleanProperty
    A flag used to signal whether the group should be shown expanded or stacked.
    final int
    Gets the value of the property maximumNumberOfNotifications.
    final String
    Gets the value of the property name.
    final javafx.collections.ObservableList<S>
    The list of notifications in the group.
    final Integer
    Gets the value of the property sortOrder.
    final javafx.util.Callback<S,NotificationView<T,S>>
    Gets the value of the property viewFactory.
    final boolean
    Gets the value of the property autoCollapse.
    final boolean
    Gets the value of the property expanded.
    final boolean
    Gets the value of the property pinnable.
    final boolean
    Gets the value of the property pinned.
    final boolean
    Gets the value of the property showHeader.
    final javafx.beans.property.IntegerProperty
    A number that determines how many notifications can be shown in the group before the "show all" button will be accessible.
    final javafx.beans.property.StringProperty
    The group's name.
    final javafx.beans.property.BooleanProperty
    Determines 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.BooleanProperty
    Pinned groups will always be shown at the top of the info center.
    final void
    setAutoCollapse(boolean autoCollapse)
    Sets the value of the property autoCollapse.
    final void
    setExpanded(boolean expanded)
    Sets the value of the property expanded.
    final void
    setMaximumNumberOfNotifications(int maximumNumberOfNotifications)
    Sets the value of the property maximumNumberOfNotifications.
    final void
    Sets the value of the property name.
    final void
    setPinnable(boolean pinnable)
    Sets the value of the property pinnable.
    final void
    setPinned(boolean pinned)
    Sets the value of the property pinned.
    final void
    setShowHeader(boolean showHeader)
    Sets the value of the property showHeader.
    final void
    setSortOrder(Integer sortOrder)
    Sets the value of the property sortOrder.
    final void
    setViewFactory(javafx.util.Callback<S,NotificationView<T,S>> viewFactory)
    Sets the value of the property viewFactory.
    final javafx.beans.property.BooleanProperty
    Determines if this group will show its name and controls when in expanded state.
    final javafx.beans.property.IntegerProperty
    An (optional) value for the sort order.
    final javafx.beans.property.ObjectProperty<javafx.util.Callback<S,NotificationView<T,S>>>
    A callback used to create the NotificationView instances for the info center.

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Property Details

    • name

      public final javafx.beans.property.StringProperty nameProperty
      The group's name.
      See Also:
    • sortOrder

      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:
    • expanded

      public final javafx.beans.property.BooleanProperty expandedProperty
      A flag used to signal whether the group should be shown expanded or stacked.
      See Also:
    • showHeader

      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:
    • pinnable

      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:
    • pinned

      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:
    • viewFactory

      public final javafx.beans.property.ObjectProperty<javafx.util.Callback<S extends Notification<T>,NotificationView<T,S extends Notification<T>>>> viewFactoryProperty
      A callback used to create the NotificationView instances 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 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 a ListView.
      See Also:
    • autoCollapse

      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:
  • 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

      public NotificationGroup(String name)
  • Method Details

    • getName

      public final String 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

      public final void setName(String name)
      Sets the value of the property name.
      Property description:
      The group's name.
    • getSortOrder

      public final Integer 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

      public final void setSortOrder(Integer sortOrder)
      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

      public final javafx.collections.ObservableList<S> 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

      public final javafx.util.Callback<S,NotificationView<T,S>> getViewFactory()
      Gets the value of the property viewFactory.
      Property description:
      A callback used to create the NotificationView instances 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,S>>> viewFactoryProperty()
      A callback used to create the NotificationView instances for the info center. Each group can have its own factory and customize the notification views.
      See Also:
    • setViewFactory

      public final void setViewFactory(javafx.util.Callback<S,NotificationView<T,S>> viewFactory)
      Sets the value of the property viewFactory.
      Property description:
      A callback used to create the NotificationView instances 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 a ListView.
      See Also:
    • 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

      public int compareTo(NotificationGroup o)
      Specified by:
      compareTo in interface Comparable<T>