Class MenuItemsService
java.lang.Object
jmri.jmrix.loconet.swing.menuitemspi.MenuItemsService
A JAVA SPI Service to retrieve, from providers of the
MenuItemsInterface service, lists
of items to be added to the JMRI menu(s) associated with LocoNet connections.
-
Method Summary
Modifier and TypeMethodDescriptionstatic MenuItemsServiceMethod for getting the SPI service "singleton"getMenuExtensionsItems(boolean isLocoNetInterface, WindowInterface wi, LocoNetSystemConnectionMemo memo) Return menu items from all LocoNet Menu Extension SPI providers.
-
Method Details
-
getInstance
Method for getting the SPI service "singleton"- Returns:
- the singleton instance of this class
-
getMenuExtensionsItems
public List<JMenu> getMenuExtensionsItems(boolean isLocoNetInterface, WindowInterface wi, LocoNetSystemConnectionMemo memo) Return menu items from all LocoNet Menu Extension SPI providers.- Parameters:
isLocoNetInterface- informs whether the connection has actual hardwarewi- allows the extension menu items to be associated with the JAVA WindowInterface which relates to the connection's menumemo- the LocoNetSystemConnectionMemo associated with the menu to which the extension's MenuItem(s) are to be attached.- Returns:
- an ArrayList of JMenu objects, as populated from the menu items reported by any available SPI extensions. May be an empty ArrayList if none of the SPI extensions provide menu items for this menu.
-