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