Class InfoCenterView

java.lang.Object
javafx.scene.Node
javafx.scene.Parent
javafx.scene.layout.Region
javafx.scene.control.Control
com.dlsc.gemsfx.infocenter.InfoCenterView
All Implemented Interfaces:
javafx.css.Styleable, javafx.event.EventTarget, javafx.scene.control.Skinnable

public class InfoCenterView extends javafx.scene.control.Control
A view capable of displaying groups of different types of notifications. The user can choose to expand the groups or to stack all notifications of a group on top of each other. The view is intended to be used together with the InfoCenterPane, so that the visibility of the view is actively managed.
See Also:
  • Property Summary

    Properties
    Type
    Property
    Description
    final javafx.beans.property.BooleanProperty
    Groups can be opened automatically when a notification gets added to them.
    final javafx.beans.property.ObjectProperty<javafx.util.Duration>
    The duration used for the expand / collapse animation when the view opens or closes a group.
    final javafx.beans.property.ObjectProperty<Consumer<NotificationGroup<?,?>>>
    A callback that gets invoked when the user presses the "show all" button of a group that has more than the maximum number of notifications linked to it.
    final javafx.beans.property.ObjectProperty<javafx.util.Duration>
    The duration used for the animation when switching between the standard view and the "show all" view.
    final javafx.beans.property.ObjectProperty<NotificationGroup>
    The group that is currently being shown in the "show all" view of the control.
    final javafx.beans.property.ObjectProperty<javafx.util.Duration>
    The duration used for animating the slide-in / slide-out of a notification.
    final javafx.beans.property.BooleanProperty
    Determines whether the control will be transparent or not.

    Properties inherited from class javafx.scene.control.Control

    contextMenu, skin, tooltip

    Properties inherited from class javafx.scene.layout.Region

    background, border, cacheShape, centerShape, height, insets, maxHeight, maxWidth, minHeight, minWidth, opaqueInsets, padding, prefHeight, prefWidth, scaleShape, shape, snapToPixel, width

    Properties inherited from class javafx.scene.Parent

    needsLayout

    Properties inherited from class javafx.scene.Node

    accessibleHelp, accessibleRoleDescription, accessibleRole, accessibleText, blendMode, boundsInLocal, boundsInParent, cacheHint, cache, clip, cursor, depthTest, disabled, disable, effectiveNodeOrientation, effect, eventDispatcher, focused, focusTraversable, focusVisible, focusWithin, hover, id, inputMethodRequests, layoutBounds, layoutX, layoutY, localToParentTransform, localToSceneTransform, managed, mouseTransparent, nodeOrientation, onContextMenuRequested, onDragDetected, onDragDone, onDragDropped, onDragEntered, onDragExited, onDragOver, onInputMethodTextChanged, onKeyPressed, onKeyReleased, onKeyTyped, onMouseClicked, onMouseDragEntered, onMouseDragExited, onMouseDragged, onMouseDragOver, onMouseDragReleased, onMouseEntered, onMouseExited, onMouseMoved, onMousePressed, onMouseReleased, onRotate, onRotationFinished, onRotationStarted, onScrollFinished, onScroll, onScrollStarted, onSwipeDown, onSwipeLeft, onSwipeRight, onSwipeUp, onTouchMoved, onTouchPressed, onTouchReleased, onTouchStationary, onZoomFinished, onZoom, onZoomStarted, opacity, parent, pickOnBounds, pressed, rotate, rotationAxis, scaleX, scaleY, scaleZ, scene, style, translateX, translateY, translateZ, viewOrder, visible
  • Field Summary

    Fields inherited from class javafx.scene.layout.Region

    USE_COMPUTED_SIZE, USE_PREF_SIZE

    Fields inherited from class javafx.scene.Node

    BASELINE_OFFSET_SAME_AS_HEIGHT
  • Constructor Summary

    Constructors
    Constructor
    Description
    Constructs a new view.
  • Method Summary

    Modifier and Type
    Method
    Description
    final javafx.beans.property.BooleanProperty
    Groups can be opened automatically when a notification gets added to them.
    void
     
    protected javafx.scene.control.Skin<?>
     
    final javafx.beans.property.ObjectProperty<javafx.util.Duration>
    The duration used for the expand / collapse animation when the view opens or closes a group.
    final javafx.util.Duration
    Gets the value of the expandDuration property.
    final javafx.collections.ObservableList<NotificationGroup<?,?>>
    A list of groups of notifications that will be visualized by the view.
    Gets the value of the onShowAllGroupNotifications property.
    final javafx.util.Duration
    Gets the value of the showAllFadeDuration property.
    Gets the value of the showAllGroup property.
    final javafx.util.Duration
    Gets the value of the slideInDuration property.
    final javafx.collections.ObservableList<Notification<?>>
    A read-only list of all notifications of all groups currently added to the view.
    final javafx.collections.ObservableList<NotificationGroup<?,?>>
    A read-only list of the currently pinned groups.
    final javafx.collections.ObservableList<Notification<?>>
    A read-only list of all notifications of all pinned groups currently added to the view.
    final javafx.collections.ObservableList<NotificationGroup<?,?>>
    A read-only list of the currently unpinned groups.
    final javafx.collections.ObservableList<Notification<?>>
    A read-only list of all notifications of all unpinned groups currently added to the view.
     
    final boolean
    Gets the value of the autoOpenGroup property.
    final boolean
    Gets the value of the transparent property.
    final javafx.beans.property.ObjectProperty<Consumer<NotificationGroup<?,?>>>
    A callback that gets invoked when the user presses the "show all" button of a group that has more than the maximum number of notifications linked to it.
    final void
    setAutoOpenGroup(boolean autoOpenGroup)
    Sets the value of the autoOpenGroup property.
    final void
    setExpandDuration(javafx.util.Duration expandDuration)
    Sets the value of the expandDuration property.
    final void
    setOnShowAllGroupNotifications(Consumer<NotificationGroup<?,?>> onShowAllGroupNotifications)
    Sets the value of the onShowAllGroupNotifications property.
    final void
    setShowAllFadeDuration(javafx.util.Duration showAllFadeDuration)
    Sets the value of the showAllFadeDuration property.
    final void
    Sets the value of the showAllGroup property.
    final void
    setSlideInDuration(javafx.util.Duration slideInDuration)
    Sets the value of the slideInDuration property.
    final void
    setTransparent(boolean transparent)
    Sets the value of the transparent property.
    final javafx.beans.property.ObjectProperty<javafx.util.Duration>
    The duration used for the animation when switching between the standard view and the "show all" view.
    final javafx.beans.property.ObjectProperty<NotificationGroup>
    The group that is currently being shown in the "show all" view of the control.
    final javafx.beans.property.ObjectProperty<javafx.util.Duration>
    The duration used for animating the slide-in / slide-out of a notification.
    final javafx.beans.property.BooleanProperty
    Determines whether the control will be transparent or not.

    Methods inherited from class javafx.scene.control.Control

    computeMaxHeight, computeMaxWidth, computeMinHeight, computeMinWidth, computePrefHeight, computePrefWidth, contextMenuProperty, executeAccessibleAction, getBaselineOffset, getClassCssMetaData, getContextMenu, getControlCssMetaData, getCssMetaData, getInitialFocusTraversable, getSkin, getTooltip, isResizable, layoutChildren, queryAccessibleAttribute, setContextMenu, setSkin, setTooltip, skinProperty, tooltipProperty

    Methods inherited from class javafx.scene.layout.Region

    backgroundProperty, borderProperty, cacheShapeProperty, centerShapeProperty, getBackground, getBorder, getHeight, getInsets, getMaxHeight, getMaxWidth, getMinHeight, getMinWidth, getOpaqueInsets, getPadding, getPrefHeight, getPrefWidth, getShape, getWidth, heightProperty, insetsProperty, isCacheShape, isCenterShape, isScaleShape, isSnapToPixel, layoutInArea, layoutInArea, layoutInArea, layoutInArea, maxHeight, maxHeightProperty, maxWidth, maxWidthProperty, minHeight, minHeightProperty, minWidth, minWidthProperty, opaqueInsetsProperty, paddingProperty, positionInArea, positionInArea, prefHeight, prefHeightProperty, prefWidth, prefWidthProperty, resize, scaleShapeProperty, setBackground, setBorder, setCacheShape, setCenterShape, setHeight, setMaxHeight, setMaxSize, setMaxWidth, setMinHeight, setMinSize, setMinWidth, setOpaqueInsets, setPadding, setPrefHeight, setPrefSize, setPrefWidth, setScaleShape, setShape, setSnapToPixel, setWidth, shapeProperty, snappedBottomInset, snappedLeftInset, snappedRightInset, snappedTopInset, snapPosition, snapPositionX, snapPositionY, snapSize, snapSizeX, snapSizeY, snapSpace, snapSpaceX, snapSpaceY, snapToPixelProperty, widthProperty

    Methods inherited from class javafx.scene.Parent

    getChildren, getChildrenUnmodifiable, getManagedChildren, getStylesheets, isNeedsLayout, layout, lookup, needsLayoutProperty, requestLayout, requestParentLayout, setNeedsLayout, updateBounds

    Methods inherited from class javafx.scene.Node

    accessibleHelpProperty, accessibleRoleDescriptionProperty, accessibleRoleProperty, accessibleTextProperty, addEventFilter, addEventHandler, applyCss, autosize, blendModeProperty, boundsInLocalProperty, boundsInParentProperty, buildEventDispatchChain, cacheHintProperty, cacheProperty, clipProperty, computeAreaInScreen, contains, contains, cursorProperty, depthTestProperty, disabledProperty, disableProperty, effectiveNodeOrientationProperty, effectProperty, eventDispatcherProperty, fireEvent, focusedProperty, focusTraversableProperty, focusVisibleProperty, focusWithinProperty, getAccessibleHelp, getAccessibleRole, getAccessibleRoleDescription, getAccessibleText, getBlendMode, getBoundsInLocal, getBoundsInParent, getCacheHint, getClip, getContentBias, getCursor, getDepthTest, getEffect, getEffectiveNodeOrientation, getEventDispatcher, getId, getInitialCursor, getInputMethodRequests, getLayoutBounds, getLayoutX, getLayoutY, getLocalToParentTransform, getLocalToSceneTransform, getNodeOrientation, getOnContextMenuRequested, getOnDragDetected, getOnDragDone, getOnDragDropped, getOnDragEntered, getOnDragExited, getOnDragOver, getOnInputMethodTextChanged, getOnKeyPressed, getOnKeyReleased, getOnKeyTyped, getOnMouseClicked, getOnMouseDragEntered, getOnMouseDragExited, getOnMouseDragged, getOnMouseDragOver, getOnMouseDragReleased, getOnMouseEntered, getOnMouseExited, getOnMouseMoved, getOnMousePressed, getOnMouseReleased, getOnRotate, getOnRotationFinished, getOnRotationStarted, getOnScroll, getOnScrollFinished, getOnScrollStarted, getOnSwipeDown, getOnSwipeLeft, getOnSwipeRight, getOnSwipeUp, getOnTouchMoved, getOnTouchPressed, getOnTouchReleased, getOnTouchStationary, getOnZoom, getOnZoomFinished, getOnZoomStarted, getOpacity, getParent, getProperties, getPseudoClassStates, getRotate, getRotationAxis, getScaleX, getScaleY, getScaleZ, getScene, getStyle, getStyleableParent, getStyleClass, getTransforms, getTranslateX, getTranslateY, getTranslateZ, getTypeSelector, getUserData, getViewOrder, hasProperties, hoverProperty, idProperty, inputMethodRequestsProperty, intersects, intersects, isCache, isDisable, isDisabled, isFocused, isFocusTraversable, isFocusVisible, isFocusWithin, isHover, isManaged, isMouseTransparent, isPickOnBounds, isPressed, isVisible, layoutBoundsProperty, layoutXProperty, layoutYProperty, localToParent, localToParent, localToParent, localToParent, localToParent, localToParentTransformProperty, localToScene, localToScene, localToScene, localToScene, localToScene, localToScene, localToScene, localToScene, localToScene, localToScene, localToSceneTransformProperty, localToScreen, localToScreen, localToScreen, localToScreen, localToScreen, lookupAll, managedProperty, mouseTransparentProperty, nodeOrientationProperty, notifyAccessibleAttributeChanged, onContextMenuRequestedProperty, onDragDetectedProperty, onDragDoneProperty, onDragDroppedProperty, onDragEnteredProperty, onDragExitedProperty, onDragOverProperty, onInputMethodTextChangedProperty, onKeyPressedProperty, onKeyReleasedProperty, onKeyTypedProperty, onMouseClickedProperty, onMouseDragEnteredProperty, onMouseDragExitedProperty, onMouseDraggedProperty, onMouseDragOverProperty, onMouseDragReleasedProperty, onMouseEnteredProperty, onMouseExitedProperty, onMouseMovedProperty, onMousePressedProperty, onMouseReleasedProperty, onRotateProperty, onRotationFinishedProperty, onRotationStartedProperty, onScrollFinishedProperty, onScrollProperty, onScrollStartedProperty, onSwipeDownProperty, onSwipeLeftProperty, onSwipeRightProperty, onSwipeUpProperty, onTouchMovedProperty, onTouchPressedProperty, onTouchReleasedProperty, onTouchStationaryProperty, onZoomFinishedProperty, onZoomProperty, onZoomStartedProperty, opacityProperty, parentProperty, parentToLocal, parentToLocal, parentToLocal, parentToLocal, parentToLocal, pickOnBoundsProperty, pressedProperty, pseudoClassStateChanged, relocate, removeEventFilter, removeEventHandler, requestFocus, resizeRelocate, rotateProperty, rotationAxisProperty, scaleXProperty, scaleYProperty, scaleZProperty, sceneProperty, sceneToLocal, sceneToLocal, sceneToLocal, sceneToLocal, sceneToLocal, sceneToLocal, sceneToLocal, sceneToLocal, screenToLocal, screenToLocal, screenToLocal, setAccessibleHelp, setAccessibleRole, setAccessibleRoleDescription, setAccessibleText, setBlendMode, setCache, setCacheHint, setClip, setCursor, setDepthTest, setDisable, setDisabled, setEffect, setEventDispatcher, setEventHandler, setFocused, setFocusTraversable, setHover, setId, setInputMethodRequests, setLayoutX, setLayoutY, setManaged, setMouseTransparent, setNodeOrientation, setOnContextMenuRequested, setOnDragDetected, setOnDragDone, setOnDragDropped, setOnDragEntered, setOnDragExited, setOnDragOver, setOnInputMethodTextChanged, setOnKeyPressed, setOnKeyReleased, setOnKeyTyped, setOnMouseClicked, setOnMouseDragEntered, setOnMouseDragExited, setOnMouseDragged, setOnMouseDragOver, setOnMouseDragReleased, setOnMouseEntered, setOnMouseExited, setOnMouseMoved, setOnMousePressed, setOnMouseReleased, setOnRotate, setOnRotationFinished, setOnRotationStarted, setOnScroll, setOnScrollFinished, setOnScrollStarted, setOnSwipeDown, setOnSwipeLeft, setOnSwipeRight, setOnSwipeUp, setOnTouchMoved, setOnTouchPressed, setOnTouchReleased, setOnTouchStationary, setOnZoom, setOnZoomFinished, setOnZoomStarted, setOpacity, setPickOnBounds, setPressed, setRotate, setRotationAxis, setScaleX, setScaleY, setScaleZ, setStyle, setTranslateX, setTranslateY, setTranslateZ, setUserData, setViewOrder, setVisible, snapshot, snapshot, startDragAndDrop, startFullDrag, styleProperty, toBack, toFront, toString, translateXProperty, translateYProperty, translateZProperty, usesMirroring, viewOrderProperty, visibleProperty

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait

    Methods inherited from interface javafx.css.Styleable

    getStyleableNode
  • Property Details

  • Constructor Details

    • InfoCenterView

      public InfoCenterView()
      Constructs a new view.
  • Method Details

    • createDefaultSkin

      protected javafx.scene.control.Skin<?> createDefaultSkin()
      Overrides:
      createDefaultSkin in class javafx.scene.control.Control
    • getUserAgentStylesheet

      public String getUserAgentStylesheet()
      Overrides:
      getUserAgentStylesheet in class javafx.scene.layout.Region
    • getGroups

      public final javafx.collections.ObservableList<NotificationGroup<?,?>> getGroups()
      A list of groups of notifications that will be visualized by the view. Every notification has to be a member of a group.
      Returns:
      the list of notification groups
    • getUnmodifiableUnpinnedGroups

      public final javafx.collections.ObservableList<NotificationGroup<?,?>> getUnmodifiableUnpinnedGroups()
      A read-only list of the currently unpinned groups.
      Returns:
      the list of pinned groups
    • getUnmodifiablePinnedGroups

      public final javafx.collections.ObservableList<NotificationGroup<?,?>> getUnmodifiablePinnedGroups()
      A read-only list of the currently pinned groups.
      Returns:
      the list of pinned groups
    • getOnShowAllGroupNotifications

      public final Consumer<NotificationGroup<?,?>> getOnShowAllGroupNotifications()
      Gets the value of the onShowAllGroupNotifications property.
      Property description:
      A callback that gets invoked when the user presses the "show all" button of a group that has more than the maximum number of notifications linked to it. The default callback will switch to a list view control which will then be able to show all notifications of that group. Applications can choose to display the notifications in a different place, e.g. in a dialog.
      Returns:
      the value of the onShowAllGroupNotifications property
      See Also:
    • onShowAllGroupNotificationsProperty

      public final javafx.beans.property.ObjectProperty<Consumer<NotificationGroup<?,?>>> onShowAllGroupNotificationsProperty()
      A callback that gets invoked when the user presses the "show all" button of a group that has more than the maximum number of notifications linked to it. The default callback will switch to a list view control which will then be able to show all notifications of that group. Applications can choose to display the notifications in a different place, e.g. in a dialog.
      Returns:
      the callback that gets invoked when requesting to see all notifications of a group
      See Also:
    • setOnShowAllGroupNotifications

      public final void setOnShowAllGroupNotifications(Consumer<NotificationGroup<?,?>> onShowAllGroupNotifications)
      Sets the value of the onShowAllGroupNotifications property.
      Property description:
      A callback that gets invoked when the user presses the "show all" button of a group that has more than the maximum number of notifications linked to it. The default callback will switch to a list view control which will then be able to show all notifications of that group. Applications can choose to display the notifications in a different place, e.g. in a dialog.
      Parameters:
      onShowAllGroupNotifications - the value for the onShowAllGroupNotifications property
      See Also:
    • isAutoOpenGroup

      public final boolean isAutoOpenGroup()
      Gets the value of the autoOpenGroup property.
      Property description:
      Groups can be opened automatically when a notification gets added to them. The default is false.
      Returns:
      the value of the autoOpenGroup property
      See Also:
    • autoOpenGroupProperty

      public final javafx.beans.property.BooleanProperty autoOpenGroupProperty()
      Groups can be opened automatically when a notification gets added to them. The default is false.
      Returns:
      true if the group of a newly added notification should be automatically expanded
      See Also:
    • setAutoOpenGroup

      public final void setAutoOpenGroup(boolean autoOpenGroup)
      Sets the value of the autoOpenGroup property.
      Property description:
      Groups can be opened automatically when a notification gets added to them. The default is false.
      Parameters:
      autoOpenGroup - the value for the autoOpenGroup property
      See Also:
    • getUnmodifiableNotifications

      public final javafx.collections.ObservableList<Notification<?>> getUnmodifiableNotifications()
      A read-only list of all notifications of all groups currently added to the view.
      Returns:
      a flattened list of all notifications
    • getUnmodifiablePinnedNotifications

      public final javafx.collections.ObservableList<Notification<?>> getUnmodifiablePinnedNotifications()
      A read-only list of all notifications of all pinned groups currently added to the view.
      Returns:
      a flattened list of all notifications inside pinned groups
    • getUnmodifiableUnpinnedNotifications

      public final javafx.collections.ObservableList<Notification<?>> getUnmodifiableUnpinnedNotifications()
      A read-only list of all notifications of all unpinned groups currently added to the view.
      Returns:
      a flattened list of all notifications inside groups that are currently not pinned
    • getShowAllGroup

      public final NotificationGroup getShowAllGroup()
      Gets the value of the showAllGroup property.
      Property description:
      The group that is currently being shown in the "show all" view of the control.
      Returns:
      the value of the showAllGroup property
      See Also:
    • showAllGroupProperty

      public final javafx.beans.property.ObjectProperty<NotificationGroup> showAllGroupProperty()
      The group that is currently being shown in the "show all" view of the control.
      Returns:
      the group for which all notifications are shown in a list view
      See Also:
    • setShowAllGroup

      public final void setShowAllGroup(NotificationGroup showAllGroup)
      Sets the value of the showAllGroup property.
      Property description:
      The group that is currently being shown in the "show all" view of the control.
      Parameters:
      showAllGroup - the value for the showAllGroup property
      See Also:
    • getShowAllFadeDuration

      public final javafx.util.Duration getShowAllFadeDuration()
      Gets the value of the showAllFadeDuration property.
      Property description:
      The duration used for the animation when switching between the standard view and the "show all" view.
      Returns:
      the value of the showAllFadeDuration property
      See Also:
    • showAllFadeDurationProperty

      public final javafx.beans.property.ObjectProperty<javafx.util.Duration> showAllFadeDurationProperty()
      The duration used for the animation when switching between the standard view and the "show all" view.
      Returns:
      the duration for the fade-in / fade-out animation used for toggling views
      See Also:
    • setShowAllFadeDuration

      public final void setShowAllFadeDuration(javafx.util.Duration showAllFadeDuration)
      Sets the value of the showAllFadeDuration property.
      Property description:
      The duration used for the animation when switching between the standard view and the "show all" view.
      Parameters:
      showAllFadeDuration - the value for the showAllFadeDuration property
      See Also:
    • getExpandDuration

      public final javafx.util.Duration getExpandDuration()
      Gets the value of the expandDuration property.
      Property description:
      The duration used for the expand / collapse animation when the view opens or closes a group.
      Returns:
      the value of the expandDuration property
      See Also:
    • expandDurationProperty

      public final javafx.beans.property.ObjectProperty<javafx.util.Duration> expandDurationProperty()
      The duration used for the expand / collapse animation when the view opens or closes a group.
      Returns:
      the expand / collapse animation duration
      See Also:
    • setExpandDuration

      public final void setExpandDuration(javafx.util.Duration expandDuration)
      Sets the value of the expandDuration property.
      Property description:
      The duration used for the expand / collapse animation when the view opens or closes a group.
      Parameters:
      expandDuration - the value for the expandDuration property
      See Also:
    • getSlideInDuration

      public final javafx.util.Duration getSlideInDuration()
      Gets the value of the slideInDuration property.
      Property description:
      The duration used for animating the slide-in / slide-out of a notification.
      Returns:
      the value of the slideInDuration property
      See Also:
    • slideInDurationProperty

      public final javafx.beans.property.ObjectProperty<javafx.util.Duration> slideInDurationProperty()
      The duration used for animating the slide-in / slide-out of a notification.
      Returns:
      the slide-in duration of a new notification
      See Also:
    • setSlideInDuration

      public final void setSlideInDuration(javafx.util.Duration slideInDuration)
      Sets the value of the slideInDuration property.
      Property description:
      The duration used for animating the slide-in / slide-out of a notification.
      Parameters:
      slideInDuration - the value for the slideInDuration property
      See Also:
    • isTransparent

      public final boolean isTransparent()
      Gets the value of the transparent property.
      Property description:
      Determines whether the control will be transparent or not. By default, a semi-transparent black background is showing.
      Returns:
      the value of the transparent property
      See Also:
    • transparentProperty

      public final javafx.beans.property.BooleanProperty transparentProperty()
      Determines whether the control will be transparent or not. By default, a semi-transparent black background is showing.
      Returns:
      true if the control is not transparent
      See Also:
    • setTransparent

      public final void setTransparent(boolean transparent)
      Sets the value of the transparent property.
      Property description:
      Determines whether the control will be transparent or not. By default, a semi-transparent black background is showing.
      Parameters:
      transparent - the value for the transparent property
      See Also:
    • clearAll

      public void clearAll()