Package jmri.jmrix.sprog
Class SprogSystemConnectionMemo
java.lang.Object
jmri.beans.UnboundBean
jmri.beans.Bean
jmri.jmrix.DefaultSystemConnectionMemo
jmri.jmrix.sprog.SprogSystemConnectionMemo
- All Implemented Interfaces:
BeanInterface,PropertyChangeFirer,PropertyChangeProvider,Disposable,ConfiguringSystemConnectionMemo,SystemConnectionMemo
public class SprogSystemConnectionMemo
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.
-
Field Summary
FieldsFields inherited from class jmri.jmrix.DefaultSystemConnectionMemo
classObjectMapFields inherited from class jmri.beans.Bean
propertyChangeSupportFields inherited from interface jmri.SystemConnectionMemo
DEREGISTER, DISABLED, INTERVAL, STORE, SYSTEM_PREFIX, USER_NAME -
Constructor Summary
ConstructorsConstructorDescription -
Method Summary
Modifier and TypeMethodDescriptionvoidvoidconfigureCommandStation(boolean powerOption) Configure the programming manager and "command station" objects.voidconfigureCommandStation(int slots) Configure the programming manager and "command station" objects.voidconfigureCommandStation(int slots, String powerOption) Configure the programming manager and "command station" objects.voidConfigure the common managers for Sprog connections.voiddispose()Dispose of System Connection.protected ResourceBundleGet the command station object associated with this connection.<B extends NamedBean>
Comparator<B>getNamedBeanComparator(Class<B> type) Get the Comparator to be used for two NamedBeans.intGet the number of command station slotsReturn the SPROG mode for this connection.Provide access to the TrafficController for this particular connection.Return the type of SPROG connected.Return the SPROG version object for this connection.booleanCheck if this connection provides a specific manager type.voidvoidSet the SPROG mode for this connection.voidvoidsetSprogVersion(SprogVersion version) Set the SPROG version object for this connection.Methods inherited from class jmri.jmrix.DefaultSystemConnectionMemo
deregister, get, getActionFactory, getConsistManager, getDefaultOutputInterval, getDisabled, getOutputInterval, getSystemPrefix, getUserName, isDirty, isRestartRequired, register, setConsistManager, setDisabled, setOutputInterval, setSystemPrefix, setUserName, storeMethods inherited from class jmri.beans.Bean
addPropertyChangeListener, addPropertyChangeListener, fireIndexedPropertyChange, fireIndexedPropertyChange, fireIndexedPropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, getPropertyChangeListeners, getPropertyChangeListeners, isNotifyOnEDT, removePropertyChangeListener, removePropertyChangeListenerMethods inherited from class jmri.beans.UnboundBean
getIndexedProperty, getProperty, getPropertyNames, hasIndexedProperty, hasProperty, setIndexedProperty, setPropertyMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface jmri.beans.PropertyChangeProvider
addPropertyChangeListener, addPropertyChangeListener, getPropertyChangeListeners, getPropertyChangeListeners, removePropertyChangeListener, removePropertyChangeListenerMethods inherited from interface jmri.SystemConnectionMemo
get, getActionFactory, getDefaultOutputInterval, getDisabled, getOutputInterval, getSystemPrefix, getUserName, isDirty, isRestartRequired, register, setDisabled, setOutputInterval, setSystemPrefix, setUserName
-
Field Details
-
cf
-
-
Constructor Details
-
SprogSystemConnectionMemo
-
SprogSystemConnectionMemo
-
SprogSystemConnectionMemo
-
SprogSystemConnectionMemo
public SprogSystemConnectionMemo()
-
-
Method Details
-
setSprogMode
Set the SPROG mode for this connection.- Parameters:
mode- selected mode
-
getSprogMode
Return the SPROG mode for this connection.- Returns:
- SprogMode
-
getSprogVersion
Return the SPROG version object for this connection.- Returns:
- SprogVersion
-
setSprogVersion
Set the SPROG version object for this connection.- Parameters:
version- type and version class
-
getSprogType
Return the type of SPROG connected.- Returns:
- SprogType set
-
getSprogTrafficController
Provide access to the TrafficController for this particular connection.- Returns:
- current tc for this connection
-
setSprogTrafficController
-
getSlotThread
-
getNumSlots
Get the number of command station slots- Returns:
- The number fo slots
-
configureCommandStation
Configure the programming manager and "command station" objects.- Parameters:
powerOption- true if track power at startup is ON
-
configureCommandStation
-
configureCommandStation
Configure the programming manager and "command station" objects.- Parameters:
slots- number of command station slots
-
configureCommandStation
Configure the programming manager and "command station" objects.- Parameters:
slots- number of command station slotspowerOption- true if track power at startup is ON
-
getCommandStation
Get the command station object associated with this connection.- Returns:
- the command station
-
provides
Description copied from class:DefaultSystemConnectionMemoCheck 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:
providesin interfaceSystemConnectionMemo- Overrides:
providesin classDefaultSystemConnectionMemo- Parameters:
type- The class type for the manager to be provided- Returns:
- true if the specified manager is provided
- See Also:
-
configureManagers
Configure the common managers for Sprog connections.- Specified by:
configureManagersin interfaceConfiguringSystemConnectionMemo
-
getProgrammerManager
-
setProgrammerManager
-
getPowerManager
-
getThrottleManager
-
getTurnoutManager
-
getActionModelResourceBundle
- Specified by:
getActionModelResourceBundlein classDefaultSystemConnectionMemo
-
getNamedBeanComparator
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
-
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
-
getSprogVersionQuery
- Returns:
- a SprogVersionQuery object for this connection
-