001package jmri.jmrix.cmri; 002 003import javax.swing.JMenu; 004 005/** 006 * Create a "Systems" menu containing the Jmri CMRI-specific tools. 007 * 008 * @author Bob Jacobsen Copyright 2003 009 * @author Chuck Catania Copyright 2014, 2015, 2016, 2017, 2018 010 */ 011public class CMRIMenu extends JMenu { 012 013 public CMRIMenu(String name, CMRISystemConnectionMemo memo) { 014 this(memo); 015 setText(name); 016 } 017 018 public CMRIMenu(CMRISystemConnectionMemo memo) { 019 super(); 020 if (memo != null) { 021 setText(memo.getUserName()); 022 } else { 023 setText(Bundle.getMessage("MenuCMRI")); 024 } 025 // Re-ordered c2 026 if (memo != null) { 027 add(new jmri.jmrix.cmri.serial.nodeconfigmanager.NodeConfigManagerAction(memo)); 028 add(new javax.swing.JSeparator()); 029 add(new jmri.jmrix.cmri.serial.cmrinetmanager.CMRInetManagerAction(Bundle.getMessage("MenuItemCMRInetManager"), memo)); 030 add(new jmri.jmrix.cmri.serial.cmrinetmanager.CMRInetMetricsAction(Bundle.getMessage("MenuItemCMRInetMetrics"), memo)); 031 add(new javax.swing.JSeparator()); 032 add(new jmri.jmrix.cmri.serial.serialmon.SerialMonAction(Bundle.getMessage("MenuItemCommandMonitor"), memo)); 033 add(new javax.swing.JSeparator()); 034 add(new jmri.jmrix.cmri.serial.assignment.ListAction(Bundle.getMessage("MenuItemAssignments"), memo)); 035 add(new javax.swing.JSeparator()); 036 add(new jmri.jmrix.cmri.serial.diagnostic.DiagnosticAction(Bundle.getMessage("MenuItemDiagnostics"), memo)); 037 //add(new jmri.jmrix.cmri.serial.packetgen.SerialPacketGenAction(Bundle.getMessage("MenuItemSendCommand"), memo)); 038 // add(new jmri.jmrix.cmri.serial.nodeconfig.NodeConfigAction(memo)); 039 // add(new jmri.jmrix.cmri.serial.assignment.ListAction(Bundle.getMessage("MenuItemAssignments"), memo)); 040 } 041 } 042 043}