001package jmri.jmrix.ieee802154.swing; 002 003import jmri.jmrix.ieee802154.IEEE802154SystemConnectionMemo; 004 005/** 006 * Provide access to Swing components for the IEEE 802.15.4 subsystem. 007 * 008 * @author Paul Bender Copyright (C) 2014 009 */ 010public class IEEE802154ComponentFactory extends jmri.jmrix.swing.ComponentFactory { 011 012 public IEEE802154ComponentFactory(IEEE802154SystemConnectionMemo memo) { 013 this.memo = memo; 014 } 015 016 IEEE802154SystemConnectionMemo memo; 017 018 /** 019 * Provide a menu with all items attached to this system connection 020 */ 021 @Override 022 public javax.swing.JMenu getMenu() { 023 if (memo.getDisabled()) { 024 return null; 025 } 026 return new IEEE802154Menu(memo); 027 } 028} 029 030 031