001package jmri.jmrix.internal;
002
003import jmri.jmrix.AbstractSimulatorConnectionConfig;
004import jmri.jmrix.SerialPortAdapter;
005
006/**
007 * Definition of objects to handle configuring a virtual layout connection.
008 *
009 * @author Bob Jacobsen Copyright (C) 2001, 2003, 2010
010 */
011public class ConnectionConfig extends AbstractSimulatorConnectionConfig {
012
013    /**
014     * Ctor for an object being created during load process.
015     *
016     * @param p serial port adapter
017     */
018    public ConnectionConfig(SerialPortAdapter p) {
019        super(p);
020    }
021
022    /**
023     * Ctor for a functional Swing object with no existing adapter.
024     */
025    public ConnectionConfig() {
026        super();
027    }
028
029    @Override
030    public String name() {
031        return "No Connection";
032    }
033//    public String name() {
034//        return Bundle.getMessage("NoConnectionChoice");
035//    }
036
037    /**
038     * {@inheritDoc}
039     */
040    @Override
041    protected void setInstance() {
042        if (adapter == null) {
043            adapter = new InternalAdapter();
044        }
045    }
046
047}