001package jmri.jmrix.rps.serial;
002
003import java.util.ResourceBundle;
004
005/**
006 * Definition of objects to handle configuring an RPS layout connection.
007 *
008 * @author Bob Jacobsen Copyright (C) 2001, 2003, 2008
009 */
010public class ConnectionConfig extends jmri.jmrix.AbstractSerialConnectionConfig {
011
012    /**
013     * Ctor for an object being created during load process; Swing init is
014     * deferred.
015     * @param p Serial port adapter.
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 "RPS Base Station";
032    }
033
034    @Override
035    protected ResourceBundle getActionModelResourceBundle() {
036        return ResourceBundle.getBundle("jmri.jmrix.rps.RpsActionListBundle");
037    }
038
039    /**
040     * {@inheritDoc}
041     */
042    @Override
043    protected void setInstance() {
044        if (adapter == null ) {
045           adapter = new SerialAdapter();
046        }
047    }
048
049}