001package jmri.jmrix.lenz.swing; 002 003import javax.swing.JMenu; 004 005/** 006 * Create a menu containing the XpressNet specific tools 007 * 008 * @author Paul Bender Copyright 2003,2010 009 */ 010public class XNetMenu extends JMenu { 011 012 public XNetMenu(String name, jmri.jmrix.lenz.XNetSystemConnectionMemo memo) { 013 this(memo); 014 setText(name); 015 } 016 017 public XNetMenu(jmri.jmrix.lenz.XNetSystemConnectionMemo memo) { 018 019 super(); 020 021 if (memo != null) { 022 setText(memo.getUserName()); 023 } else { 024 setText(Bundle.getMessage("MenuXpressNet")); 025 } 026 027 add(new jmri.jmrix.lenz.swing.mon.XNetMonAction()); 028 add(new jmri.jmrix.lenz.swing.systeminfo.SystemInfoAction(Bundle.getMessage("MenuItemXNetSystemInformation"), memo)); 029 add(new jmri.jmrix.lenz.swing.packetgen.PacketGenAction(Bundle.getMessage("MenuItemSendXNetCommand"), memo)); 030 add(new javax.swing.JSeparator()); 031 add(new jmri.jmrix.lenz.swing.stackmon.StackMonAction(Bundle.getMessage("MenuItemCSDatabaseManager"), memo)); 032 add(new jmri.jmrix.lenz.swing.li101.LI101Action(Bundle.getMessage("MenuItemLI101ConfigurationManager"), memo)); 033 add(new jmri.jmrix.lenz.swing.liusb.LIUSBConfigAction(Bundle.getMessage("MenuItemLIUSBConfigurationManager"), memo)); 034 add(new jmri.jmrix.lenz.swing.lz100.LZ100Action(Bundle.getMessage("MenuItemLZ100ConfigurationManager"), memo)); 035 add(new jmri.jmrix.lenz.swing.lzv100.LZV100Action(Bundle.getMessage("MenuItemLZV100ConfigurationManager"), memo)); 036 // The LV102 configuration works with OpsModeProgramming, so does not 037 // need the system connection memo. 038 add(new jmri.jmrix.lenz.swing.lv102.LV102Action(Bundle.getMessage("MenuItemLV102ConfigurationManager"))); 039 } 040 041}