001package jmri.jmrix.lenz.li101;
002
003/**
004 * Handle configuring an XpressNet layout connection via a Lenz LI101 adapter.
005 * <p>
006 * This uses the {@link LI101Adapter} class to do the actual connection.
007 *
008 * @author Bob Jacobsen Copyright (C) 2001, 2003
009 *
010 * @see LI101Adapter
011 */
012public class ConnectionConfig extends jmri.jmrix.lenz.AbstractXNetSerialConnectionConfig {
013
014    /**
015     * Ctor for an object being created during load process.
016     * Swing init is deferred.
017     * @param p serial port adapter.
018     */
019    public ConnectionConfig(jmri.jmrix.SerialPortAdapter p) {
020        super(p);
021    }
022
023    /**
024     * Ctor for a connection configuration with no preexisting adapter.
025     * {@link #setInstance()} will fill the adapter member.
026     */
027    public ConnectionConfig() {
028        super();
029    }
030
031    @Override
032    public String name() {
033        return "Lenz LI101"; // NOI18N
034    }
035
036    /**
037     * {@inheritDoc}
038     */
039    @Override
040    protected void setInstance() {
041        if (adapter == null) {
042            adapter = new LI101Adapter();
043        }
044    }
045
046}