Top Inners Fields Constructors Methods
com.dlsc.gemsfx.skins

public Class InfoCenterViewSkin

extends SkinBase<InfoCenterView>
Class Inheritance
Imports
com.dlsc.gemsfx.Spacer, com.dlsc.gemsfx.infocenter.InfoCenterEvent, .InfoCenterView, .Notification, .Notification.OnClickBehaviour, .NotificationGroup, .NotificationView, com.dlsc.gemsfx.util.ResourceBundleManager, javafx.animation.AnimationTimer, .Interpolator, .KeyFrame, .KeyValue, .Timeline, javafx.application.Platform, javafx.beans.InvalidationListener, .Observable, .WeakInvalidationListener, javafx.beans.binding.Bindings, .BooleanBinding, javafx.beans.property.DoubleProperty, .ObjectProperty, .SimpleDoubleProperty, .SimpleObjectProperty, javafx.collections.FXCollections, .ListChangeListener, .ObservableList, .WeakListChangeListener, javafx.collections.transformation.SortedList, javafx.geometry.Orientation, javafx.scene.Node, javafx.scene.control.Button, .ContentDisplay, .Label, .ListCell, .ListView, .MultipleSelectionModel, .ScrollPane, .SkinBase, .ToggleButton, .Tooltip, javafx.scene.input.MouseButton, javafx.scene.layout.HBox, .Pane, .Priority, .Region, .StackPane, .VBox, javafx.util.Callback, one.jpro.platform.utils.TreeShowing, org.kordamp.ikonli.javafx.FontIcon, java.text.MessageFormat, java.util.ArrayList, .List, .Optional, java.util.stream.Collectors

Nested and Inner Type Summary

Modifier and TypeClass and Description
pack-priv class
private class

Field Summary

Modifier and TypeField and Description
private final VBox
private final ObjectProperty<Notification<?>>
private final InvalidationListener
private final VBox
private final VBox
private final VBox
private final ListView<Notification<?>>
private final VBox
private final WeakInvalidationListener

Constructor Summary

AccessConstructor and Description
public

Method Summary

Modifier and TypeMethod and Description
private void
protected double
computeMaxHeight(double width, double topInset, double rightInset, double bottomInset, double leftInset)

Overrides javafx.scene.control.SkinBase.computeMaxHeight.

Computes the maximum allowable height of the Skin, based on the provided width.

protected double
computeMinHeight(double width, double topInset, double rightInset, double bottomInset, double leftInset)

Overrides javafx.scene.control.SkinBase.computeMinHeight.

Computes the minimum allowable height of the Skin, based on the provided width.

protected double
computePrefHeight(double width, double topInset, double rightInset, double bottomInset, double leftInset)

Overrides javafx.scene.control.SkinBase.computePrefHeight.

Calculates the preferred height of this SkinBase.

private void
configureNotificationView(NotificationView<T, S extends Notification<T>> notificationView)

private void
private void
private void
private void
updateView(List<NotificationGroup<?, ?>> groups, VBox container)

private void
Inherited from javafx.scene.control.SkinBase:
computeBaselineOffsetcomputeMaxWidthcomputeMinWidthcomputePrefWidthconsumeMouseEventsdisposeexecuteAccessibleActiongetChildrengetClassCssMetaDatagetCssMetaDatagetNodegetSkinnablelayoutChildrenlayoutInArealayoutInArealayoutInAreapositionInAreapositionInAreapseudoClassStateChangedqueryAccessibleAttributeregisterChangeListenerregisterInvalidationListenerregisterListChangeListenersnappedBottomInsetsnappedLeftInsetsnappedRightInsetsnappedTopInsetsnapPositionsnapPositionXsnapPositionYsnapSizesnapSizeXsnapSizeYsnapSpacesnapSpaceXsnapSpaceYunregisterChangeListenersunregisterInvalidationListenersunregisterListChangeListeners

Field Detail

allGroupsContainerback to summary
private final VBox allGroupsContainer
animatedNotificationback to summary
private final ObjectProperty<Notification<?>> animatedNotification
listItemsListenerback to summary
private final InvalidationListener listItemsListener
mainPaneback to summary
private final VBox mainPane
pinnedGroupsContainerback to summary
private final VBox pinnedGroupsContainer
singleGroupContainerback to summary
private final VBox singleGroupContainer
singleGroupListViewback to summary
private final ListView<Notification<?>> singleGroupListView
unpinnedGroupsContainerback to summary
private final VBox unpinnedGroupsContainer
weakListItemsListenerback to summary
private final WeakInvalidationListener weakListItemsListener

Constructor Detail

InfoCenterViewSkinback to summary
public InfoCenterViewSkin(InfoCenterView view)

Method Detail

addPlaceholderIfNotNullback to summary
private void addPlaceholderIfNotNull(Node placeholder, BooleanBinding emptyBing)
computeMaxHeightback to summary
protected double computeMaxHeight(double width, double topInset, double rightInset, double bottomInset, double leftInset)

Overrides javafx.scene.control.SkinBase.computeMaxHeight.

Doc from javafx.scene.control.SkinBase.computeMaxHeight.

Computes the maximum allowable height of the Skin, based on the provided width.

Annotations
@Override
computeMinHeightback to summary
protected double computeMinHeight(double width, double topInset, double rightInset, double bottomInset, double leftInset)

Overrides javafx.scene.control.SkinBase.computeMinHeight.

Doc from javafx.scene.control.SkinBase.computeMinHeight.

Computes the minimum allowable height of the Skin, based on the provided width.

Annotations
@Override
computePrefHeightback to summary
protected double computePrefHeight(double width, double topInset, double rightInset, double bottomInset, double leftInset)

Overrides javafx.scene.control.SkinBase.computePrefHeight.

Doc from javafx.scene.control.SkinBase.computePrefHeight.

Calculates the preferred height of this SkinBase. The default implementation calculates this height as the height of the area occupied by its managed children when they are positioned at their current positions at their preferred heights.

Annotations
@Override
configureNotificationViewback to summary
private void configureNotificationView(NotificationView<T, S extends Notification<T>> notificationView)
removePlaceholderIfNotNullback to summary
private void removePlaceholderIfNotNull(Node placeholder)
updateTimesback to summary
private void updateTimes()
updateViewback to summary
private void updateView()
updateViewback to summary
private void updateView(List<NotificationGroup<?, ?>> groups, VBox container)
updateVisibilitiesback to summary
private void updateVisibilities()
com.dlsc.gemsfx.skins back to summary

pack-priv Class InfoCenterViewSkin.GroupView<T, S extends Notification<T>>

extends StackPane
Class Inheritance

Field Summary

Modifier and TypeField and Description
private final Timeline
private final DoubleProperty
private final NotificationGroup<T, S>
private final HBox
private final ListChangeListener<Notification<T>>
private final InvalidationListener
private final InvalidationListener
private final WeakListChangeListener<Notification<T>>
private final WeakInvalidationListener
private final WeakInvalidationListener

Constructor Summary

AccessConstructor and Description
public

Method Summary

Modifier and TypeMethod and Description
private void
animate(boolean expand)

protected double
computeMaxHeight(double width)

Overrides javafx.scene.layout.Region.computeMaxHeight.

Computes the maximum height of this region.

protected double
computeMinHeight(double width)

Overrides javafx.scene.layout.StackPane.computeMinHeight.

Computes the minimum height of this region.

protected double
computePrefHeight(double width)

Overrides javafx.scene.layout.StackPane.computePrefHeight.

Computes the preferred height of this region for the given width; Region subclasses should override this method to return an appropriate value based on their content and layout strategy.

private void
public DoubleProperty
public double
protected void
layoutChildren()

Overrides javafx.scene.layout.StackPane.layoutChildren.

Invoked during the layout pass to layout the children in this Parent.

public void
setExpansionProgress(double expansionProgress)

private void
private void
Inherited from javafx.scene.layout.StackPane:
alignmentPropertyclearConstraintscomputeMinWidthcomputePrefWidthgetAlignmentgetAlignmentgetClassCssMetaDatagetContentBiasgetCssMetaDatagetMarginrequestLayoutsetAlignmentsetAlignmentsetMargin

Field Detail

expandTimelineback to summary
private final Timeline expandTimeline
expansionProgressback to summary
private final DoubleProperty expansionProgress
groupback to summary
private final NotificationGroup<T, S> group
headerBoxback to summary
private final HBox headerBox
notificationsChangedListenerback to summary
private final ListChangeListener<Notification<T>> notificationsChangedListener
requestedNotificationListenerback to summary
private final InvalidationListener requestedNotificationListener
spacingListenerback to summary
private final InvalidationListener spacingListener
weakNotificationsChangedListenerback to summary
private final WeakListChangeListener<Notification<T>> weakNotificationsChangedListener
weakRequestedNotificationListenerback to summary
private final WeakInvalidationListener weakRequestedNotificationListener
weakSpacingListenerback to summary
private final WeakInvalidationListener weakSpacingListener

Constructor Detail

GroupViewback to summary
public GroupView(NotificationGroup<T, S> group)

Method Detail

animateback to summary
private void animate(boolean expand)
computeMaxHeightback to summary
protected double computeMaxHeight(double width)

Overrides javafx.scene.layout.Region.computeMaxHeight.

Doc from javafx.scene.layout.Region.computeMaxHeight.

Computes the maximum height of this region. Returns Double.MAX_VALUE by default. Region subclasses may override this method to return a different value based on their content and layout strategy. If the subclass doesn't have a HORIZONTAL content bias, then the width parameter can be ignored.

Annotations
@Override
computeMinHeightback to summary
protected double computeMinHeight(double width)

Overrides javafx.scene.layout.StackPane.computeMinHeight.

Doc from javafx.scene.layout.Region.computeMinHeight.

Computes the minimum height of this region. Returns the sum of the top and bottom insets by default. Region subclasses should override this method to return an appropriate value based on their content and layout strategy. If the subclass doesn't have a HORIZONTAL content bias, then the width parameter can be ignored.

Annotations
@Override
computePrefHeightback to summary
protected double computePrefHeight(double width)

Overrides javafx.scene.layout.StackPane.computePrefHeight.

Doc from javafx.scene.layout.Region.computePrefHeight.

Computes the preferred height of this region for the given width; Region subclasses should override this method to return an appropriate value based on their content and layout strategy. If the subclass doesn't have a HORIZONTAL content bias, then the width parameter can be ignored.

Annotations
@Override
createNotificationViewsback to summary
private void createNotificationViews()
expansionProgressPropertyback to summary
public DoubleProperty expansionProgressProperty()
getExpansionProgressback to summary
public double getExpansionProgress()
layoutChildrenback to summary
protected void layoutChildren()

Overrides javafx.scene.layout.StackPane.layoutChildren.

Doc from javafx.scene.Parent.layoutChildren.

Invoked during the layout pass to layout the children in this Parent. By default it will only set the size of managed, resizable content to their preferred sizes and does not do any node positioning.

Subclasses should override this function to layout content as needed.

Annotations
@Override
setExpansionProgressback to summary
public void setExpansionProgress(double expansionProgress)
showNotificationViewback to summary
private void showNotificationView()
updateStyleClassback to summary
private void updateStyleClass()
com.dlsc.gemsfx.skins back to summary

private Class InfoCenterViewSkin.NotificationListCell

extends ListCell<Notification<?>>
Class Inheritance

Constructor Summary

AccessConstructor and Description
public

Method Summary

Modifier and TypeMethod and Description
protected void
updateItem(Notification<?> notification, boolean empty)

Overrides javafx.scene.control.Cell.updateItem.

The updateItem method should not be called by developers, but it is the best method for developers to override to allow for them to customise the visuals of the cell.

Inherited from javafx.scene.control.ListCell:
cancelEditcommitEditcreateDefaultSkinexecuteAccessibleActiongetListViewlayoutChildrenlistViewPropertyqueryAccessibleAttributestartEditupdateListView

Constructor Detail

NotificationListCellback to summary
public NotificationListCell()

Method Detail

updateItemback to summary
protected void updateItem(Notification<?> notification, boolean empty)

Overrides javafx.scene.control.Cell.updateItem.

Doc from javafx.scene.control.Cell.updateItem.

The updateItem method should not be called by developers, but it is the best method for developers to override to allow for them to customise the visuals of the cell. To clarify, developers should never call this method in their code (they should leave it up to the UI control, such as the javafx.scene.control.ListView control) to call this method. However, the purpose of having the updateItem method is so that developers, when specifying custom cell factories (again, like the ListView cell factory), the updateItem method can be overridden to allow for complete customisation of the cell.

It is very important that subclasses of Cell override the updateItem method properly, as failure to do so will lead to issues such as blank cells or cells with unexpected content appearing within them. Here is an example of how to properly override the updateItem method:

protected void updateItem(T item, boolean empty) {
    super.updateItem(item, empty);

    if (empty || item == null) {
        setText(null);
        setGraphic(null);
    } else {
        setText(item.toString());
    }
}

Note in this code sample two important points:

  1. We call the super.updateItem(T, boolean) method. If this is not done, the item and empty properties are not correctly set, and you are likely to end up with graphical issues.
  2. We test for the empty condition, and if true, we set the text and graphic properties to null. If we do not do this, it is almost guaranteed that end users will see graphical artifacts in cells unexpectedly.
Annotations
@Override