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