/** * Adds the ScrollablePopupMenuItem to the item list and to the parent. * Fires the event 'itemsWereAdded' on the parent pop up menu * * @param item * The item to add * @param details * The details for the 'itemsWereAdded' event */ protected void addItem(ScrollablePopupMenuItem item, String details) { int oldSize = items.size(); items.add(0, item); parent.add(item, 0, oldSize, items.size()); parent.fireItemsWereAdded (new ScrollablePopupMenuEvent(parent, ScrollablePopupMenuEvent.ITEMS_ADDED, 1, details)); }
/** * Adds the ScrollablePopupMenuItem to the item list and to the parent. * Fires the event 'itemsWereAdded' on the parent pop up menu * * @param item * The item to add * @param details * The details for the 'itemsWereAdded' event */ protected void addItem(ScrollablePopupMenuItem item, String details) { int oldSize = items.size(); items.add(0, item); parent.add(item, 0, oldSize, items.size()); parent.fireItemsWereAdded (new ScrollablePopupMenuEvent(parent, ScrollablePopupMenuEvent.ITEMS_ADDED, 1, details)); }