From: Bob J. <jac...@us...> - 2006-02-27 02:53:32
|
Update of /cvsroot/jmri/jmri/jmrix/oaktree/serialdriver/configurexml In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv2038/serialdriver/configurexml Added Files: ConnectionConfigXml.java Log Message: initial version --- NEW FILE: ConnectionConfigXml.java --- package jmri.jmrix.oaktree.serialdriver.configurexml; import jmri.InstanceManager; import jmri.jmrix.configurexml.AbstractConnectionConfigXml; import jmri.jmrix.oaktree.serialdriver.ConnectionConfig; import jmri.jmrix.oaktree.serialdriver.SerialDriverAdapter; import jmri.jmrix.oaktree.*; import com.sun.java.util.collections.List; import org.jdom.*; /** * Handle XML persistance of layout connections by persisting * the SerialDriverAdapter (and connections). Note this is * named as the XML version of a ConnectionConfig object, * but it's actually persisting the SerialDriverAdapter. * <P> * This class is invoked from jmrix.JmrixConfigPaneXml on write, * as that class is the one actually registered. Reads are brought * here directly via the class attribute in the XML. * * @author Bob Jacobsen Copyright: Copyright (c) 2003, 2006 * @version $Revision: 1.1 $ */ public class ConnectionConfigXml extends AbstractConnectionConfigXml { public ConnectionConfigXml() { super(); } protected void getInstance() { adapter = SerialDriverAdapter.instance(); } protected void register() { InstanceManager.configureManagerInstance().registerPref(new ConnectionConfig(adapter)); } // initialize logging static org.apache.log4j.Category log = org.apache.log4j.Category.getInstance(ConnectionConfigXml.class.getName()); } |