001package jmri.jmrix.jmriclient.swing; 002 003import javax.swing.JMenu; 004 005/** 006 * Create a "JMRIClient" menu containing the system-specific tools. 007 * 008 * @author Bob Jacobsen Copyright 2008 009 */ 010public class JMRIClientMenu extends JMenu { 011 012 public JMRIClientMenu(String name, jmri.jmrix.jmriclient.JMRIClientSystemConnectionMemo memo) { 013 this(memo); 014 setText(name); 015 } 016 017 public JMRIClientMenu(jmri.jmrix.jmriclient.JMRIClientSystemConnectionMemo memo) { 018 super(); 019 020 if (memo != null) { 021 setText(memo.getUserName()); 022 } else { 023 setText(Bundle.getMessage("MenuItemJMRIClient")); 024 } 025 026 if (memo != null) { 027 add(new jmri.jmrix.jmriclient.swing.mon.JMRIClientMonAction()); 028 add(new jmri.jmrix.jmriclient.swing.packetgen.PacketGenAction(Bundle.getMessage("MenuItemSendCommand"), memo)); 029 } 030 } 031 032}