001package jmri.jmrix.bachrus; 002 003import java.util.ResourceBundle; 004import javax.swing.JMenu; 005 006/** 007 * Create a "Systems" menu containing the bachrus-specific tools. 008 * 009 * @author Andrew Crosland Copyright 2010 010 */ 011public class SpeedoMenu extends JMenu { 012 013 public SpeedoMenu(String name, SpeedoSystemConnectionMemo memo) { 014 this(memo); 015 setText(name); 016 } 017 018 public SpeedoMenu(SpeedoSystemConnectionMemo memo) { 019 020 super(); 021 ResourceBundle rb = ResourceBundle.getBundle("jmri.jmrix.JmrixSystemsBundle"); 022 023 if (memo != null) { 024 setText(memo.getUserName()); 025 } else { 026 setText("Speedo"); 027 } 028 029 if (memo != null) { 030 add(new jmri.jmrix.bachrus.SpeedoConsoleAction(rb.getString("MenuItemSpeedo"), memo)); 031 } 032 } 033 034}