001package jmri.jmrix.mrc.serialdriver; 002 003/** 004 * Definition of objects to handle configuring an USB Interface layout 005 * connection via a MRC SerialDriverAdapter object. 006 * 007 * @author Bob Jacobsen Copyright (C) 2001, 2003 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 * 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 Bundle.getMessage("TypeSerial"); 032 } 033 034 /** 035 * {@inheritDoc} 036 */ 037 @Override 038 protected void setInstance() { 039 if (adapter == null) { 040 adapter = new SerialDriverAdapter(); 041 } 042 } 043 044}