Interface MenuItemsInterface


public interface MenuItemsInterface
An interface which allows for extension of LocoNet menu items via an implementation of the java.util.spi mechanism.
The MenuItemsService invokes the getMenuItems(boolean, jmri.util.swing.WindowInterface, jmri.jmrix.loconet.LocoNetSystemConnectionMemo) method to retrieve the service provider's menu items.
  • Method Details

    • getMenuItems

      ArrayList<JMenu> getMenuItems(boolean isLocoNetInterface, WindowInterface wi, LocoNetSystemConnectionMemo memo)
      An interface for extension of the menu(s) associated with JMRI LocoNet-based connections, the JAVA SPI mechanism. Implementers of this JAVA SPI interface provide an ArrayList of zero or more items to be added to JMRI menu(s) for connection(s) of the "LocoNet" type.
      The returned ArrayList may contain zero, one or more of any of the objects allowed by a JMenu object. This includes objects of the class LocoNetMenuItem.
      Parameters:
      isLocoNetInterface - informs whether the connection has actual hardware.
      wi - allows the extension menu items to be associated with the WindowInterface which relates to the connection's menu.
      memo - the LocoNetSystemConnectionMemo associated with the menu to which the extension's MenuItem(s) are to be attached.
      Returns:
      an ArrayList of JMenu-compatible objects, as populated from the menu items reported by any available SPI extensions. Implementer may return an empty ArrayList if it does not implement any menu items.