001package jmri.jmrix.powerline.cp290;
002
003import javax.swing.JPanel;
004
005/**
006 * Definition of objects to handle configuring a Powerline layout connection
007 *
008 * @author Bob Jacobsen Copyright (C) 2003, 2006, 2007, 2008
009 * @author Ken Cameron Copyright (C) 2011
010 */
011public class ConnectionConfig extends jmri.jmrix.AbstractSerialConnectionConfig {
012
013    /**
014     * Ctor for an object being created during load process; Swing init is
015     * deferred.
016     *
017     * @param p 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    /**
032     * {@inheritDoc}
033     */
034    @Override
035    public void loadDetails(JPanel details) {
036        super.loadDetails(details);
037
038    }
039
040    @Override
041    public String name() {
042        return "CP290";
043    }
044
045    public boolean isOptList1Advanced() {
046        return true;
047    }
048
049    /**
050     * {@inheritDoc}
051     */
052    @Override
053    protected void setInstance() {
054        if (adapter == null) {
055            adapter = new SpecificDriverAdapter();
056        }
057    }
058
059}