001package jmri.jmrix.lenz.ztc640; 002 003/** 004 * Handle configuring an XpressNet layout connection via a ZTC Controls ZTC640 005 * adapter. 006 * <p> 007 * This uses the {@link ZTC640Adapter} class to do the actual connection. 008 * 009 * @author Bob Jacobsen Copyright (C) 2001, 2003 010 * 011 * @see ZTC640Adapter 012 */ 013public class ConnectionConfig extends jmri.jmrix.lenz.AbstractXNetSerialConnectionConfig { 014 015 /** 016 * Ctor for an object being created during load process; Swing init is 017 * deferred. 018 * @param p serial port adapter. 019 */ 020 public ConnectionConfig(jmri.jmrix.SerialPortAdapter p) { 021 super(p); 022 } 023 024 /** 025 * Ctor for a connection configuration with no preexisting adapter. 026 * {@link #setInstance()} will fill the adapter member. 027 */ 028 public ConnectionConfig() { 029 super(); 030 } 031 032 @Override 033 public String name() { 034 return "ZTC Controls ZTC640"; 035 } 036 037 String manufacturerName = "ZTC"; 038 039 @Override 040 public String getManufacturer() { 041 return manufacturerName; 042 } 043 044 @Override 045 public void setManufacturer(String manu) { 046 manufacturerName = manu; 047 } 048 049 /** 050 * {@inheritDoc} 051 */ 052 @Override 053 protected void setInstance() { 054 if (adapter == null) { 055 adapter = new ZTC640Adapter(); 056 } 057 } 058 059}