001package jmri.jmrix.loconet.locobuffer;
002
003/**
004 * Definition of objects to handle configuring a LocoBuffer layout connection
005 * via a LocoBufferAdapter object.
006 *
007 * @author Bob Jacobsen Copyright (C) 2001, 2003, 2010
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     * @param p the SerialPortAdapter to associate with this connection
015     */
016    public ConnectionConfig(jmri.jmrix.SerialPortAdapter p) {
017        super(p);
018    }
019
020    /**
021     * Ctor for a connection configuration with no preexisting adapter.
022     * {@link #setInstance()} will fill the adapter member.
023     */
024    public ConnectionConfig() {
025        super();
026    }
027
028    @Override
029    public String name() {
030        return "LocoNet LocoBuffer"; // NOI18N
031    }
032
033    public boolean isOptList2Advanced() {
034        return false;
035    }
036
037    @Override
038    protected void setInstance() {
039        if (adapter == null) {
040            adapter = new LocoBufferAdapter();
041        }
042    }
043
044}