001package jmri.jmrix.qsi.serialdriver; 002 003import java.util.ResourceBundle; 004 005/** 006 * Definition of objects to handle configuring a layout connection via a QSI 007 * SerialDriverAdapter object. 008 * 009 * @author Bob Jacobsen Copyright (C) 2007 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 * @param p serial port adapter. 017 */ 018 public ConnectionConfig(jmri.jmrix.SerialPortAdapter p) { 019 super(p); 020 } 021 022 /** 023 * Ctor for a connection configuration with no preexisting adapter. 024 * {@link #setInstance()} will fill the adapter member. 025 */ 026 public ConnectionConfig() { 027 super(); 028 } 029 030 @Override 031 public String name() { 032 return "Quantum Programmer"; 033 } 034 035 @Override 036 protected ResourceBundle getActionModelResourceBundle() { 037 return ResourceBundle.getBundle("jmri.jmrix.qsi.QsiActionListBundle"); 038 } 039 040 /** 041 * {@inheritDoc} 042 */ 043 @Override 044 protected void setInstance() { 045 if(adapter == null) { 046 adapter = new SerialDriverAdapter(); 047 } 048 } 049 050}