001package jmri.jmrix.sprog;
002
003import javax.swing.JMenu;
004
005/**
006 * Create a Systems menu containing the Jmri SPROG-specific tools.
007 *
008 * @author Bob Jacobsen Copyright 2003
009 */
010public class SPROGMenu extends JMenu {
011
012    public SPROGMenu(SprogSystemConnectionMemo memo) {
013        super();
014
015        if (memo != null) {
016            setText(memo.getUserName());
017        } else {
018            setText("Sprog");
019        }
020
021        if (memo != null) {
022            add(new jmri.jmrix.sprog.sprogmon.SprogMonAction(Bundle.getMessage("MonitorXTitle", "SPROG"), memo));
023            add(new jmri.jmrix.sprog.packetgen.SprogPacketGenAction(Bundle.getMessage("MenuItemSendCommand"), memo));
024            add(new jmri.jmrix.sprog.console.SprogConsoleAction(Bundle.getMessage("SprogConsoleTitle"), memo));
025            add(new javax.swing.JSeparator());
026            add(new jmri.jmrix.sprog.update.SprogVersionAction(Bundle.getMessage("GetSprogFirmwareVersion"), memo));
027            // Removed to avoid confusion with newer SPROG II and 3 that have now reached v3 and v4:
028            //add(new jmri.jmrix.sprog.update.Sprogv4UpdateAction(Bundle.getMessage("SprogXFirmwareUpdate", " v3/v4"), memo));
029            add(new jmri.jmrix.sprog.update.SprogIIUpdateAction(Bundle.getMessage("SprogXFirmwareUpdate"), memo));
030        }
031    }
032
033}