Package jmri.jmrix.grapevine
Class GrapevineSystemConnectionMemo
- java.lang.Object
-
- jmri.beans.UnboundBean
-
- jmri.beans.Bean
-
- jmri.jmrix.DefaultSystemConnectionMemo
-
- jmri.jmrix.grapevine.GrapevineSystemConnectionMemo
-
- All Implemented Interfaces:
BeanInterface,PropertyChangeFirer,PropertyChangeProvider,Disposable,ConfiguringSystemConnectionMemo,SystemConnectionMemo
public class GrapevineSystemConnectionMemo extends DefaultSystemConnectionMemo implements ConfiguringSystemConnectionMemo
Minimum required SystemConnectionMemo for Grapevine. Expanded for multichar/multiconnection support. Nodes are handled bij superclass.
-
-
Field Summary
Fields Modifier and Type Field Description (package private) ComponentFactorycf-
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 GrapevineSystemConnectionMemo()GrapevineSystemConnectionMemo(java.lang.String prefix, java.lang.String name)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidconfigureManagers()Configure the common managers for Grapevine connections.voiddispose()Dispose of System Connection.protected java.util.ResourceBundlegetActionModelResourceBundle()Provide Grapevine menu strings.LightManagergetLightManager()Provide access to the LightManager 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.SensorManagergetSensorManager()Provide access to the SensorManager for this particular connection.SerialTrafficControllergetTrafficController()Get the traffic controller instance associated with this connection memo.TurnoutManagergetTurnoutManager()Provide access to the TurnoutManager for this particular connection.voidsetLightManager(SerialLightManager l)voidsetSensorManager(SerialSensorManager s)voidsetTrafficController(SerialTrafficController tc)Set the traffic controller instance associated with this connection memo.voidsetTurnoutManager(SerialTurnoutManager t)-
Methods inherited from class jmri.jmrix.DefaultSystemConnectionMemo
deregister, get, getActionFactory, getConsistManager, getDefaultOutputInterval, getDisabled, getOutputInterval, getSystemPrefix, getUserName, isDirty, isRestartRequired, provides, 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, provides, register, setDisabled, setOutputInterval, setSystemPrefix, setUserName
-
-
-
-
Constructor Detail
-
GrapevineSystemConnectionMemo
public GrapevineSystemConnectionMemo()
-
GrapevineSystemConnectionMemo
public GrapevineSystemConnectionMemo(@Nonnull java.lang.String prefix, @Nonnull java.lang.String name)
-
-
Method Detail
-
setTrafficController
public void setTrafficController(SerialTrafficController tc)
Set the traffic controller instance associated with this connection memo.- Parameters:
tc- jmri.jmrix.grapevine.SerialTrafficController object to use.
-
getTrafficController
public SerialTrafficController getTrafficController()
Get the traffic controller instance associated with this connection memo.- Returns:
- traffic controller, one is provided if null.
-
getActionModelResourceBundle
protected java.util.ResourceBundle getActionModelResourceBundle()
Provide Grapevine menu strings.- Specified by:
getActionModelResourceBundlein classDefaultSystemConnectionMemo- Returns:
- bundle file containing action - menuitem pairs
-
getNamedBeanComparator
public <B extends NamedBean> java.util.Comparator<B> getNamedBeanComparator(java.lang.Class<B> type)
Description copied from class:DefaultSystemConnectionMemoGet 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:
getNamedBeanComparatorin interfaceSystemConnectionMemo- Specified by:
getNamedBeanComparatorin classDefaultSystemConnectionMemo- Type Parameters:
B- the type of NamedBean- Parameters:
type- the class of NamedBean- Returns:
- the Comparator
-
configureManagers
public void configureManagers()
Configure the common managers for Grapevine connections. This puts the common manager config in one place.- Specified by:
configureManagersin interfaceConfiguringSystemConnectionMemo
-
getSensorManager
public SensorManager getSensorManager()
Provide access to the SensorManager for this particular connection.NOTE: SensorManager defaults to NULL
- Returns:
- sensor manager.
-
setSensorManager
public void setSensorManager(SerialSensorManager s)
-
getTurnoutManager
public TurnoutManager getTurnoutManager()
Provide access to the TurnoutManager for this particular connection.NOTE: TurnoutManager defaults to NULL
- Returns:
- turnout manager.
-
setTurnoutManager
public void setTurnoutManager(SerialTurnoutManager t)
-
getLightManager
public LightManager getLightManager()
Provide access to the LightManager for this particular connection.NOTE: LightManager defaults to NULL
- Returns:
- light manager.
-
setLightManager
public void setLightManager(SerialLightManager l)
-
dispose
public void dispose()
Description copied from class:DefaultSystemConnectionMemoDispose of System Connection.Removes objects from classObjectMap after calling dispose if Disposable. Removes these objects from InstanceManager.
- Specified by:
disposein interfaceDisposable- Specified by:
disposein interfaceSystemConnectionMemo- Overrides:
disposein classDefaultSystemConnectionMemo
-
-