001package jmri.jmrix.roco.z21.swing;
002
003import java.util.ResourceBundle;
004import javax.annotation.Nonnull;
005import javax.swing.JMenu;
006
007
008/**
009 * Create a menu containing the Z21 specific tools
010 *
011 * @author Paul Bender Copyright 2014
012 */
013public class Z21Menu extends JMenu {
014
015    public Z21Menu(String name, jmri.jmrix.roco.z21.Z21SystemConnectionMemo memo) {
016        this(memo);
017        setText(name);
018    }
019
020    public Z21Menu(@Nonnull jmri.jmrix.roco.z21.Z21SystemConnectionMemo memo) {
021
022        super();
023
024        ResourceBundle rb = ResourceBundle.getBundle("jmri.jmrix.roco.z21.z21ActionListBundle");
025
026        setText(memo.getUserName());
027
028        add(new jmri.jmrix.roco.z21.swing.mon.Z21MonAction());
029        add(new jmri.jmrix.roco.z21.swing.packetgen.PacketGenAction(rb.getString("jmri.jmrix.roco.z21.swing.packetgen.PacketGenAction"), memo));
030        add(new jmri.jmrix.roco.z21.swing.configtool.Z21ConfigAction(rb.getString("jmri.jmrix.roco.z21.swing.configtool.Z21ConfigAction"), memo));
031    }
032
033}