MenuItem
- the GUI toolkit specific type for menu itemspublic class PositionSortingStrategy<MenuItem> extends Object implements MenuItemSortingStrategy<MenuItem,PositionableMenuItemAdapterFactory<MenuItem>>
Constructor and Description |
---|
PositionSortingStrategy() |
Modifier and Type | Method and Description |
---|---|
int |
getMenuItemInsertionPoint(List<? extends MenuItemSupplierFactoryEntry<MenuItem,PositionableMenuItemAdapterFactory<MenuItem>>> entryList,
MenuItemSupplierFactoryEntry<MenuItem,PositionableMenuItemAdapterFactory<MenuItem>> entry)
Gets the instertion point of the new menu entry.
|
Optional<Integer> |
getSeparatorInsertionPoint(int index,
List<? extends MenuItemSupplierFactoryEntry<MenuItem,PositionableMenuItemAdapterFactory<MenuItem>>> entryList,
MenuItemSupplierFactoryEntry<MenuItem,PositionableMenuItemAdapterFactory<MenuItem>> entry)
Gets the instertion point of a new separator.
|
public int getMenuItemInsertionPoint(List<? extends MenuItemSupplierFactoryEntry<MenuItem,PositionableMenuItemAdapterFactory<MenuItem>>> entryList, MenuItemSupplierFactoryEntry<MenuItem,PositionableMenuItemAdapterFactory<MenuItem>> entry)
getMenuItemInsertionPoint
in interface MenuItemSortingStrategy<MenuItem,PositionableMenuItemAdapterFactory<MenuItem>>
entryList
- the existing menu entriesentry
- the new entrypublic Optional<Integer> getSeparatorInsertionPoint(int index, List<? extends MenuItemSupplierFactoryEntry<MenuItem,PositionableMenuItemAdapterFactory<MenuItem>>> entryList, MenuItemSupplierFactoryEntry<MenuItem,PositionableMenuItemAdapterFactory<MenuItem>> entry)
MenuItemSortingStrategy.getMenuItemInsertionPoint(java.util.List, org.drombler.acp.core.action.MenuItemSupplierFactoryEntry)
.getSeparatorInsertionPoint
in interface MenuItemSortingStrategy<MenuItem,PositionableMenuItemAdapterFactory<MenuItem>>
index
- the index of the new menu entry which was added to the listentryList
- the existing menu entries including the new menu entryentry
- the new menu entry which was added to the listCopyright © 2012–2017 Drombler. All rights reserved.