001package jmri.jmrix.ieee802154.swing; 002 003import java.util.ResourceBundle; 004import javax.swing.JMenu; 005 006/** 007 * Create a menu containing the IEEE 802.15.4 specific tools 008 * 009 * @author Paul Bender Copyright 2013 010 */ 011public class IEEE802154Menu extends JMenu { 012 013 public IEEE802154Menu(String name, jmri.jmrix.ieee802154.IEEE802154SystemConnectionMemo memo) { 014 this(memo); 015 setText(name); 016 } 017 018 public IEEE802154Menu(jmri.jmrix.ieee802154.IEEE802154SystemConnectionMemo memo) { 019 020 super(); 021 022 ResourceBundle rb = ResourceBundle.getBundle("jmri.jmrix.ieee802154.IEEE802154ActionListBundle"); 023 024 if (memo != null) { 025 setText(memo.getUserName()); 026 } else { 027 setText(rb.getString("MenuIEEE802154")); 028 } 029 030 if (memo != null) { 031 add(new jmri.jmrix.ieee802154.swing.mon.IEEE802154MonAction()); 032 add(new jmri.jmrix.ieee802154.swing.packetgen.PacketGenAction(rb.getString("jmri.jmrix.ieee802154.swing.packetgen.PacketGenAction"), memo)); 033 } 034 } 035 036}