Package jmri.jmrix.easydcc
Class EasyDccSystemConnectionMemo
- java.lang.Object
-
- jmri.beans.UnboundBean
-
- jmri.beans.Bean
-
- jmri.jmrix.DefaultSystemConnectionMemo
-
- jmri.jmrix.easydcc.EasyDccSystemConnectionMemo
-
- All Implemented Interfaces:
BeanInterface
,PropertyChangeFirer
,PropertyChangeProvider
,Disposable
,ConfiguringSystemConnectionMemo
,SystemConnectionMemo
public class EasyDccSystemConnectionMemo extends DefaultSystemConnectionMemo implements ConfiguringSystemConnectionMemo
Lightweight class to denote that a system is active, and provide general information.Objects of specific subtypes are registered in the instance manager to activate their particular system.
Migrated for multiple connections, multi char connection prefix and Simulator.
-
-
Field Summary
Fields Modifier and Type Field Description (package private) ComponentFactory
cf
-
Fields inherited from class jmri.jmrix.DefaultSystemConnectionMemo
classObjectMap
-
Fields inherited from class jmri.beans.Bean
propertyChangeSupport
-
Fields inherited from interface jmri.SystemConnectionMemo
DEREGISTER, DISABLED, INTERVAL, STORE, SYSTEM_PREFIX, USER_NAME
-
-
Constructor Summary
Constructors Constructor Description EasyDccSystemConnectionMemo()
EasyDccSystemConnectionMemo(java.lang.String prefix, java.lang.String name)
EasyDccSystemConnectionMemo(EasyDccTrafficController et)
Ctor
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
configureManagers()
Configure the common managers for EasyDCC connections.void
dispose()
Dispose of System Connection.protected java.util.ResourceBundle
getActionModelResourceBundle()
EasyDccConsistManager
getConsistManager()
Provide access to the ConsistManager for this particular connection.<B extends NamedBean>
java.util.Comparator<B>getNamedBeanComparator(java.lang.Class<B> type)
Get the Comparator to be used for two NamedBeans.EasyDccPowerManager
getPowerManager()
EasyDccProgrammerManager
getProgrammerManager()
ThrottleManager
getThrottleManager()
EasyDccTrafficController
getTrafficController()
Provide access to the TrafficController for this particular connection.EasyDccTurnoutManager
getTurnoutManager()
boolean
provides(java.lang.Class<?> c)
Check if this connection provides a specific manager type.void
setEasyDccTrafficController(EasyDccTrafficController et)
void
setProgrammerManager(EasyDccProgrammerManager p)
void
setThrottleManager(ThrottleManager t)
-
Methods inherited from class jmri.jmrix.DefaultSystemConnectionMemo
deregister, get, getActionFactory, getDefaultOutputInterval, getDisabled, getOutputInterval, getSystemPrefix, getUserName, isDirty, isRestartRequired, register, setConsistManager, setDisabled, setOutputInterval, setSystemPrefix, setUserName, store
-
Methods inherited from class jmri.beans.Bean
addPropertyChangeListener, addPropertyChangeListener, fireIndexedPropertyChange, fireIndexedPropertyChange, fireIndexedPropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, getPropertyChangeListeners, getPropertyChangeListeners, isNotifyOnEDT, removePropertyChangeListener, removePropertyChangeListener
-
Methods inherited from class jmri.beans.UnboundBean
getIndexedProperty, getProperty, getPropertyNames, hasIndexedProperty, hasProperty, setIndexedProperty, setProperty
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface jmri.beans.PropertyChangeProvider
addPropertyChangeListener, addPropertyChangeListener, getPropertyChangeListeners, getPropertyChangeListeners, removePropertyChangeListener, removePropertyChangeListener
-
Methods inherited from interface jmri.SystemConnectionMemo
get, getActionFactory, getDefaultOutputInterval, getDisabled, getOutputInterval, getSystemPrefix, getUserName, isDirty, isRestartRequired, register, setDisabled, setOutputInterval, setSystemPrefix, setUserName
-
-
-
-
Constructor Detail
-
EasyDccSystemConnectionMemo
public EasyDccSystemConnectionMemo()
-
EasyDccSystemConnectionMemo
public EasyDccSystemConnectionMemo(EasyDccTrafficController et)
Ctor- Parameters:
et
- the associated TrafficController
-
EasyDccSystemConnectionMemo
public EasyDccSystemConnectionMemo(@Nonnull java.lang.String prefix, @Nonnull java.lang.String name)
-
-
Method Detail
-
getTrafficController
public EasyDccTrafficController getTrafficController()
Provide access to the TrafficController for this particular connection.- Returns:
- traffic controller, provided if null.
-
setEasyDccTrafficController
public void setEasyDccTrafficController(EasyDccTrafficController et)
-
configureManagers
public void configureManagers()
Configure the common managers for EasyDCC connections. This puts the common manager config in one place. This method is static so that it can be referenced from classes that don't inherit.- Specified by:
configureManagers
in interfaceConfiguringSystemConnectionMemo
-
getPowerManager
public EasyDccPowerManager getPowerManager()
-
getThrottleManager
public ThrottleManager getThrottleManager()
-
setThrottleManager
public void setThrottleManager(ThrottleManager t)
-
getTurnoutManager
public EasyDccTurnoutManager getTurnoutManager()
-
getConsistManager
public EasyDccConsistManager getConsistManager()
Description copied from class:DefaultSystemConnectionMemo
Provide access to the ConsistManager for this particular connection.- Overrides:
getConsistManager
in classDefaultSystemConnectionMemo
- Returns:
- the provided ConsistManager or null if the connection does not provide a ConsistManager
-
getProgrammerManager
public EasyDccProgrammerManager getProgrammerManager()
-
setProgrammerManager
public void setProgrammerManager(EasyDccProgrammerManager p)
-
getActionModelResourceBundle
protected java.util.ResourceBundle getActionModelResourceBundle()
- Specified by:
getActionModelResourceBundle
in classDefaultSystemConnectionMemo
-
getNamedBeanComparator
public <B extends NamedBean> java.util.Comparator<B> getNamedBeanComparator(java.lang.Class<B> type)
Description copied from class:DefaultSystemConnectionMemo
Get the Comparator to be used for two NamedBeans. This is typically anNamedBeanComparator
, but may be any Comparator that works for this connection type.- Specified by:
getNamedBeanComparator
in interfaceSystemConnectionMemo
- Specified by:
getNamedBeanComparator
in classDefaultSystemConnectionMemo
- Type Parameters:
B
- the type of NamedBean- Parameters:
type
- the class of NamedBean- Returns:
- the Comparator
-
provides
public boolean provides(java.lang.Class<?> c)
Description copied from class:DefaultSystemConnectionMemo
Check if this connection provides a specific manager type. This method must return false if a manager for the specific type is not provided, and must return true if a manager for the specific type is provided.- Specified by:
provides
in interfaceSystemConnectionMemo
- Overrides:
provides
in classDefaultSystemConnectionMemo
- Parameters:
c
- The class type for the manager to be provided- Returns:
- true if the specified manager is provided
- See Also:
DefaultSystemConnectionMemo.get(java.lang.Class)
-
dispose
public void dispose()
Description copied from class:DefaultSystemConnectionMemo
Dispose of System Connection.Removes objects from classObjectMap after calling dispose if Disposable. Removes these objects from InstanceManager.
- Specified by:
dispose
in interfaceDisposable
- Specified by:
dispose
in interfaceSystemConnectionMemo
- Overrides:
dispose
in classDefaultSystemConnectionMemo
-
-