Class SimilarItemsContainer

All Implemented Interfaces:
Styleable, EventTarget, Skinnable, SearchedItemPanelDestinationUI

public class SimilarItemsContainer extends ScrollPane implements SearchedItemPanelDestinationUI
Container to display similar items. Uses an HBox layout and houses SearchedItemPanels
  • Field Details

    • content

      private final HBox content
      The HBox that holds the content of the container.
  • Constructor Details

    • SimilarItemsContainer

      private SimilarItemsContainer()
      Constructor for SimilarItemsContainer. Initializes the container with a title label and sets up the layout.
      Preconditions:
      The SimilarItemsContainer should be properly initialized to contain a ScrollPane with an HBox layout and a title label.
      Postconditions:
      The SimilarItemsContainer instance is created with a ScrollPane containing an HBox layout and a title label, ready to have similar items added to it.
  • Method Details

    • create

      public static SimilarItemsContainer create()
      Factory method to create a SimilarItemsContainer instance with a title label and appropriate styling.
      Returns:
      A SimilarItemsContainer instance with a title label and appropriate styling, ready to have similar items added to it.
    • setContent

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