001package jmri.jmrix.ecos.swing; 002 003import jmri.jmrix.ecos.EcosSystemConnectionMemo; 004 005/** 006 * Provide access to Swing components for the Ecos subsystem. 007 * 008 * @author Kevin Dickerson 2010 009 */ 010public class EcosComponentFactory extends jmri.jmrix.swing.ComponentFactory { 011 012 public EcosComponentFactory(EcosSystemConnectionMemo memo) { 013 this.memo = memo; 014 } 015 EcosSystemConnectionMemo memo; 016 017 /** 018 * Provide a menu with all items attached to this system connection 019 */ 020 //JMenu currentMenu; 021 @Override 022 public javax.swing.JMenu getMenu() { 023 if (memo.getDisabled()) { 024 return null; 025 } 026 return new EcosMenu(memo); 027 } 028 029}