Interface MenuItemsInterface
-
public interface MenuItemsInterface
An interface which allows for extension of LocoNet menu items via an implementation of thejava.util.spi
mechanism.
TheMenuItemsService
invokes thegetMenuItems(boolean, jmri.util.swing.WindowInterface, jmri.jmrix.loconet.LocoNetSystemConnectionMemo)
method to retrieve the service provider's menu items.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description java.util.ArrayList<javax.swing.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.
-
-
-
Method Detail
-
getMenuItems
java.util.ArrayList<javax.swing.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 returnedArrayList
may contain zero, one or more of any of the objects allowed by aJMenu
object. This includes objects of the classLocoNetMenuItem
.- Parameters:
isLocoNetInterface
- informs whether the connection has actual hardware.wi
- allows the extension menu items to be associated with theWindowInterface
which relates to the connection's menu.memo
- theLocoNetSystemConnectionMemo
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.
-
-