001package jmri.jmrix.dccpp.swing;
002
003import jmri.jmrix.dccpp.DCCppSystemConnectionMemo;
004
005/**
006 * Provide access to Swing components for the DCC++ subsystem.
007 *
008 * @author Bob Jacobsen Copyright (C) 2010
009 * @author Paul Bender Copyright (C) 2010
010 * @author      Mark Underwood Copyright (C) 2015
011 * @since 4.2.2
012 */
013public class DCCppComponentFactory extends jmri.jmrix.swing.ComponentFactory {
014
015    public DCCppComponentFactory(DCCppSystemConnectionMemo memo) {
016        this.memo = memo;
017    }
018
019    DCCppSystemConnectionMemo memo;
020
021    /**
022     * Provide a menu with all items attached to this system connection
023     */
024    @Override
025    public javax.swing.JMenu getMenu() {
026        if (memo.getDisabled()) {
027            return null;
028        }
029        return new DCCppMenu(memo); // TODO: Create this menu
030    }
031}
032
033
034