001package jmri.jmrix.mrc.simulator;
002
003import javax.swing.JPanel;
004
005/**
006 * Definition of objects to handle configuring a layout connection via an MRC
007 * SerialDriverAdapter object.
008 *
009 * @author Bob Jacobsen Copyright (C) 2001, 2003 copied from NCE
010 * @author kcameron Copyright (C) 2014
011 */
012public class ConnectionConfig extends jmri.jmrix.AbstractSimulatorConnectionConfig {
013
014    public final static String NAME = "Simulator";// NOI18N
015
016    /**
017     * Ctor for an object being created during load process; Swing init is
018     * deferred.
019     * @param p serial port adapter
020     */
021    public ConnectionConfig(jmri.jmrix.SerialPortAdapter p) {
022        super(p);
023    }
024
025    /**
026     * Ctor for a functional Swing object with no existing adapter.
027     */
028    public ConnectionConfig() {
029        super();
030    }
031
032    @Override
033    public String name() {
034        return NAME;
035    }
036
037    /**
038     * {@inheritDoc}
039     */
040    @Override
041    public void loadDetails(JPanel details) {
042        super.loadDetails(details);
043    }
044
045    /**
046     * {@inheritDoc}
047     */
048    @Override
049    protected void setInstance() {
050        if (adapter == null) {
051            adapter = new SimulatorAdapter();
052        }
053    }
054
055}