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
PropertiesTypePropertyDescriptionfinal javafx.beans.property.BooleanPropertyGroups 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.BooleanPropertyDetermines whether the control will be transparent or not.Properties inherited from class javafx.scene.control.Control
contextMenu, skin, tooltipProperties inherited from class javafx.scene.layout.Region
background, border, cacheShape, centerShape, height, insets, maxHeight, maxWidth, minHeight, minWidth, opaqueInsets, padding, prefHeight, prefWidth, scaleShape, shape, snapToPixel, widthProperties inherited from class javafx.scene.Parent
needsLayoutProperties 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_SIZEFields inherited from class javafx.scene.Node
BASELINE_OFFSET_SAME_AS_HEIGHT -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionfinal javafx.beans.property.BooleanPropertyGroups can be opened automatically when a notification gets added to them.voidclearAll()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.DurationGets the value of theexpandDurationproperty.final javafx.collections.ObservableList<NotificationGroup<?,?>> A list of groups of notifications that will be visualized by the view.final Consumer<NotificationGroup<?,?>> Gets the value of theonShowAllGroupNotificationsproperty.final javafx.util.DurationGets the value of theshowAllFadeDurationproperty.final NotificationGroupGets the value of theshowAllGroupproperty.final javafx.util.DurationGets the value of theslideInDurationproperty.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 booleanGets the value of theautoOpenGroupproperty.final booleanGets the value of thetransparentproperty.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 voidsetAutoOpenGroup(boolean autoOpenGroup) Sets the value of theautoOpenGroupproperty.final voidsetExpandDuration(javafx.util.Duration expandDuration) Sets the value of theexpandDurationproperty.final voidsetOnShowAllGroupNotifications(Consumer<NotificationGroup<?, ?>> onShowAllGroupNotifications) Sets the value of theonShowAllGroupNotificationsproperty.final voidsetShowAllFadeDuration(javafx.util.Duration showAllFadeDuration) Sets the value of theshowAllFadeDurationproperty.final voidsetShowAllGroup(NotificationGroup showAllGroup) Sets the value of theshowAllGroupproperty.final voidsetSlideInDuration(javafx.util.Duration slideInDuration) Sets the value of theslideInDurationproperty.final voidsetTransparent(boolean transparent) Sets the value of thetransparentproperty.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.BooleanPropertyDetermines 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, tooltipPropertyMethods 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, widthPropertyMethods inherited from class javafx.scene.Parent
getChildren, getChildrenUnmodifiable, getManagedChildren, getStylesheets, isNeedsLayout, layout, lookup, needsLayoutProperty, requestLayout, requestParentLayout, setNeedsLayout, updateBoundsMethods 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, visiblePropertyMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface javafx.css.Styleable
getStyleableNode
-
Property Details
-
onShowAllGroupNotifications
public final javafx.beans.property.ObjectProperty<Consumer<NotificationGroup<?,?>>> onShowAllGroupNotificationsPropertyA 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. -
autoOpenGroup
public final javafx.beans.property.BooleanProperty autoOpenGroupPropertyGroups can be opened automatically when a notification gets added to them. The default is false. -
showAllGroup
The group that is currently being shown in the "show all" view of the control. -
showAllFadeDuration
public final javafx.beans.property.ObjectProperty<javafx.util.Duration> showAllFadeDurationPropertyThe duration used for the animation when switching between the standard view and the "show all" view. -
expandDuration
public final javafx.beans.property.ObjectProperty<javafx.util.Duration> expandDurationPropertyThe duration used for the expand / collapse animation when the view opens or closes a group. -
slideInDuration
public final javafx.beans.property.ObjectProperty<javafx.util.Duration> slideInDurationPropertyThe duration used for animating the slide-in / slide-out of a notification. -
transparent
public final javafx.beans.property.BooleanProperty transparentPropertyDetermines whether the control will be transparent or not. By default, a semi-transparent black background is showing.
-
-
Constructor Details
-
InfoCenterView
public InfoCenterView()Constructs a new view.
-
-
Method Details
-
createDefaultSkin
protected javafx.scene.control.Skin<?> createDefaultSkin()- Overrides:
createDefaultSkinin classjavafx.scene.control.Control
-
getUserAgentStylesheet
- Overrides:
getUserAgentStylesheetin classjavafx.scene.layout.Region
-
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
Gets the value of theonShowAllGroupNotificationsproperty.- 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
onShowAllGroupNotificationsproperty - 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 theonShowAllGroupNotificationsproperty.- 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 theonShowAllGroupNotificationsproperty- See Also:
-
isAutoOpenGroup
public final boolean isAutoOpenGroup()Gets the value of theautoOpenGroupproperty.- Property description:
- Groups can be opened automatically when a notification gets added to them. The default is false.
- Returns:
- the value of the
autoOpenGroupproperty - 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 theautoOpenGroupproperty.- Property description:
- Groups can be opened automatically when a notification gets added to them. The default is false.
- Parameters:
autoOpenGroup- the value for theautoOpenGroupproperty- See Also:
-
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
Gets the value of theshowAllGroupproperty.- Property description:
- The group that is currently being shown in the "show all" view of the control.
- Returns:
- the value of the
showAllGroupproperty - See Also:
-
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
Sets the value of theshowAllGroupproperty.- Property description:
- The group that is currently being shown in the "show all" view of the control.
- Parameters:
showAllGroup- the value for theshowAllGroupproperty- See Also:
-
getShowAllFadeDuration
public final javafx.util.Duration getShowAllFadeDuration()Gets the value of theshowAllFadeDurationproperty.- Property description:
- The duration used for the animation when switching between the standard view and the "show all" view.
- Returns:
- the value of the
showAllFadeDurationproperty - 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 theshowAllFadeDurationproperty.- Property description:
- The duration used for the animation when switching between the standard view and the "show all" view.
- Parameters:
showAllFadeDuration- the value for theshowAllFadeDurationproperty- See Also:
-
getExpandDuration
public final javafx.util.Duration getExpandDuration()Gets the value of theexpandDurationproperty.- Property description:
- The duration used for the expand / collapse animation when the view opens or closes a group.
- Returns:
- the value of the
expandDurationproperty - 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 theexpandDurationproperty.- Property description:
- The duration used for the expand / collapse animation when the view opens or closes a group.
- Parameters:
expandDuration- the value for theexpandDurationproperty- See Also:
-
getSlideInDuration
public final javafx.util.Duration getSlideInDuration()Gets the value of theslideInDurationproperty.- Property description:
- The duration used for animating the slide-in / slide-out of a notification.
- Returns:
- the value of the
slideInDurationproperty - 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 theslideInDurationproperty.- Property description:
- The duration used for animating the slide-in / slide-out of a notification.
- Parameters:
slideInDuration- the value for theslideInDurationproperty- See Also:
-
isTransparent
public final boolean isTransparent()Gets the value of thetransparentproperty.- 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
transparentproperty - 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 thetransparentproperty.- 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 thetransparentproperty- See Also:
-
clearAll
public void clearAll()
-