Class RecentlyViewedWindow

All Implemented Interfaces:
Styleable, EventTarget, Skinnable, SearchedItemPanelDestinationUI

public class RecentlyViewedWindow extends ScrollPane implements SearchedItemPanelDestinationUI
Window to display recently viewed items. It is a ScrollPane, which contains a VBox for the content.
  • Field Details

    • content

      private final VBox content
      The VBox that holds the content of the window.
  • Constructor Details

    • RecentlyViewedWindow

      private RecentlyViewedWindow()
      Private constructor to initialize the RecentlyViewedWindow.
      Preconditions:
      The RecentlyViewedWindow should be properly initialized to contain a ScrollPane with a VBox as its content.
      Postconditions:
      The RecentlyViewedWindow instance is created with a ScrollPane containing an empty VBox as its content, ready to have recently viewed items added to it.
  • Method Details

    • create

      public static RecentlyViewedWindow create()
      Factory method to create a RecentlyViewedWindow instance with a title label and a scrollable content area.
      Returns:
      A RecentlyViewedWindow instance with a title label and an empty scrollable content area.
    • setContent

      public void setContent(List<Node> panels)
      Sets the content of the RecentlyViewedWindow with the given list of Node instances.
      Specified by:
      setContent in interface SearchedItemPanelDestinationUI
      Parameters:
      panels - The list of Node instances to be displayed in the RecentlyViewedWindow.
      Preconditions:
      The panels list should contain valid Node instances to be displayed in the RecentlyViewedWindow.
      Postconditions:
      The RecentlyViewedWindow's content is updated to display the provided Node instances.