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