Class MenuItemsService
- java.lang.Object
-
- jmri.jmrix.loconet.swing.menuitemspi.MenuItemsService
-
public final class MenuItemsService extends java.lang.Object
A JAVA SPI Service to retrieve, from providers of theMenuItemsInterface
service, lists of items to be added to the JMRI menu(s) associated with LocoNet connections.
-
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static MenuItemsService
getInstance()
Method for getting the SPI service "singleton"java.util.List<javax.swing.JMenu>
getMenuExtensionsItems(boolean isLocoNetInterface, WindowInterface wi, LocoNetSystemConnectionMemo memo)
Return menu items from all LocoNet Menu Extension SPI providers.
-
-
-
Method Detail
-
getInstance
public static MenuItemsService getInstance()
Method for getting the SPI service "singleton"- Returns:
- the singleton instance of this class
-
getMenuExtensionsItems
public java.util.List<javax.swing.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.
-
-