Class DropDownHistoryModel

    • Constructor Detail

      • DropDownHistoryModel

        public DropDownHistoryModel​(DropDownComponent.ScrollablePopupMenu parent,
                                    HistoryBrowserInterface historyBrowserInterface)
        Creates the history pop up menu model.
        Parameters:
        parent - The parent ScrollablePopupMenu
        historyBrowserInterface - The historyBrowserInterface. Used to update the parent pop up menu when the HistoryBrowser fires the events
    • Method Detail

      • createItem

        public DropDownComponent.ScrollablePopupMenuItem createItem​(java.lang.String itemName)
        Creates the ScrollablePopupMenuItem with the specific name.
        Parameters:
        itemName - the name of the item
        Returns:
        the item
      • addItem

        protected void addItem​(DropDownComponent.ScrollablePopupMenuItem item,
                               java.lang.String details)
        Adds the ScrollablePopupMenuItem to the item list and to the parent. Fires the event 'itemsWereAdded' on the parent pop up menu
        Parameters:
        item - The item to add
        details - The details for the 'itemsWereAdded' event
      • removeItem

        protected void removeItem​(DropDownComponent.ScrollablePopupMenuItem item,
                                  java.lang.String details)
        Removes the ScrollablePopupMenuItem from the item list and from the parent. Fires the event 'itemsWereRemoved' on the parent pop up menu
        Parameters:
        item - The item to remove
        details - The details for the 'itemsWereRemoved' event
      • removeLastScrollablePopupMenuItem

        protected boolean removeLastScrollablePopupMenuItem​(java.lang.String details)
        Removes the last scrollable popup menu item from the items list and from the parent pop up menu.
        Parameters:
        details - The details for the 'itemsWereRemoved' event
        Returns:
        True if item was successfully removed
      • removeFirstScrollablePopupMenuItem

        protected boolean removeFirstScrollablePopupMenuItem​(java.lang.String details)
        Removes the first scrollable popup menu item from the items list and from the parent pop up menu.
        Parameters:
        details - The details for the 'itemsWereRemoved' event
        Returns:
        True if item was successfully removed
      • clearAllScrollablePopupMenuItems

        protected void clearAllScrollablePopupMenuItems​(java.lang.String details)
        Removes all scrollable popup menu items from the items list and from the parent pop up menu.
        Parameters:
        details - The details for the event