001package jmri.jmrix.can.nmranet; 002 003import java.util.ResourceBundle; 004import jmri.InstanceManager; 005import jmri.jmrix.can.CanSystemConnectionMemo; 006 007/** 008 * Does configuration for Nmra Net communications implementations. 009 * 010 * @author Bob Jacobsen Copyright (C) 2010 011 */ 012public class NmraConfigurationManager extends jmri.jmrix.can.ConfigurationManager { 013 014 public NmraConfigurationManager(CanSystemConnectionMemo memo) { 015 super(memo); 016 InstanceManager.store(cf = new jmri.jmrix.can.nmranet.swing.NmraNetComponentFactory(adapterMemo), 017 jmri.jmrix.swing.ComponentFactory.class); 018 InstanceManager.store(NmraConfigurationManager.this, NmraConfigurationManager.class); 019 } 020 021 jmri.jmrix.swing.ComponentFactory cf = null; 022 023 @Override 024 public void configureManagers() { 025 } 026 027 /** 028 * Tells which managers this class provides. 029 */ 030 @Override 031 public boolean provides(Class<?> type) { 032 return false; // nothing, by default 033 } 034 035 @Override 036 public <T> T get(Class<?> T) { 037 return null; // nothing, by default 038 } 039 040 @Override 041 public void dispose() { 042 if (cf != null) { 043 InstanceManager.deregister(cf, jmri.jmrix.swing.ComponentFactory.class); 044 } 045 InstanceManager.deregister(this, NmraConfigurationManager.class); 046 } 047 048 @Override 049 protected ResourceBundle getActionModelResourceBundle() { 050 //No actions that can be loaded at startup 051 return null; 052 } 053 054}