001package jmri.jmrix.loconet.uhlenbrock;
002
003/**
004 * Definition of objects to handle configuring an Uhlenbrock serial port layout
005 * connection via an UhlenbrockAdapter object.
006 *
007 * @author Bob Jacobsen Copyright (C) 2001, 2003
008 */
009public class ConnectionConfig extends jmri.jmrix.AbstractSerialConnectionConfig {
010
011    /**
012     * Ctor for an object being created during load process; Swing init is
013     * deferred.
014     *
015     * @param p  a @link jmri.jmrix.SerialPortAdapter} object
016     */
017    public ConnectionConfig(jmri.jmrix.SerialPortAdapter p) {
018        super(p);
019    }
020
021    /**
022     * Ctor for a connection configuration with no preexisting adapter.
023     * {@link #setInstance()} will fill the adapter member.
024     */
025    public ConnectionConfig() {
026        super();
027    }
028
029    @Override
030    public String name() {
031        return "Intellibox-II (USB)";
032    } // NOI18N
033
034    @Override
035    protected void setInstance() {
036        if (adapter == null) {
037            adapter = new UhlenbrockAdapter();
038        }
039    }
040
041}