001package jmri.jmrix.zimo.swing;
002
003import jmri.jmrix.zimo.Mx1SystemConnectionMemo;
004
005/**
006 * Provide access to Swing components for the Mrc subsystem.
007 *
008 * @author Bob Jacobsen Copyright (C) 2010 Copied from nce.swing
009 * @author Ken Cameron 2014
010 * @author Kevin Dickerson 2014
011 */
012public class Mx1ComponentFactory extends jmri.jmrix.swing.ComponentFactory {
013
014    public Mx1ComponentFactory(Mx1SystemConnectionMemo memo) {
015        this.memo = memo;
016    }
017
018    Mx1SystemConnectionMemo memo;
019
020    /**
021     * Provide a menu with all items attached to this system connection
022     */
023    @Override
024    public javax.swing.JMenu getMenu() {
025        if (memo.getDisabled()) {
026            return null;
027        }
028        return new Mx1Menu(memo);
029    }
030}
031
032
033