001package jmri.jmrix.rps;
002
003import javax.swing.JMenu;
004import javax.swing.JSeparator;
005
006/**
007 * Create an "RPS" menu containing the JMRI RPS-specific tools.
008 *
009 * @author Bob Jacobsen Copyright 2006, 2007, 2008
010 */
011public class RpsMenu extends JMenu {
012
013    private RpsSystemConnectionMemo _memo = null;
014
015    public RpsMenu(String name, RpsSystemConnectionMemo memo) {
016        this(memo);
017        setText(name);
018    }
019
020    public RpsMenu(RpsSystemConnectionMemo memo) {
021
022        super();
023        if (memo != null) {
024            setText(memo.getUserName());
025        } else {
026            setText(Bundle.getMessage("MenuSystem"));
027        }
028        _memo = memo;
029
030        // tools that work
031        add(new jmri.jmrix.rps.rpsmon.RpsMonAction(_memo));
032        add(new jmri.jmrix.rps.aligntable.AlignTableAction(_memo));
033        add(new jmri.jmrix.rps.swing.polling.PollTableAction(_memo));
034        add(new jmri.jmrix.rps.swing.debugger.DebuggerAction(_memo));
035        add(new jmri.jmrix.rps.trackingpanel.RpsTrackingFrameAction(_memo));
036        add(new jmri.jmrix.rps.swing.soundset.SoundSetAction(_memo));
037
038        add(new JSeparator());
039
040        // old, obsolete or not updated tools
041        add(new jmri.jmrix.rps.reversealign.AlignmentPanelAction(_memo));
042    }
043
044}