Package jmri.jmrix.rps
Class RpsSystemConnectionMemo
- java.lang.Object
-
- jmri.beans.UnboundBean
-
- jmri.beans.Bean
-
- jmri.jmrix.DefaultSystemConnectionMemo
-
- jmri.jmrix.rps.RpsSystemConnectionMemo
-
- All Implemented Interfaces:
BeanInterface
,PropertyChangeFirer
,PropertyChangeProvider
,Disposable
,ConfiguringSystemConnectionMemo
,SystemConnectionMemo
public class RpsSystemConnectionMemo extends DefaultSystemConnectionMemo implements ConfiguringSystemConnectionMemo
Minimal implementation of SystemConnectionMemo.
-
-
Field Summary
-
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 RpsSystemConnectionMemo()
RpsSystemConnectionMemo(java.lang.String prefix, java.lang.String name)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
configureManagers()
Configure the common managers associated with the System Connection memo.protected java.util.ResourceBundle
getActionModelResourceBundle()
<B extends NamedBean>
java.util.Comparator<B>getNamedBeanComparator(java.lang.Class<B> type)
Get the Comparator to be used for two NamedBeans.RpsReporterManager
getReporterManager()
RpsSensorManager
getSensorManager()
java.lang.String
validateSystemNameFormat(java.lang.String name, Manager<?> manager, java.util.Locale locale)
Validate RPS system name format.Manager.NameValidity
validSystemNameFormat(java.lang.String systemName, char type)
Validate RPS system name format.-
Methods inherited from class jmri.jmrix.DefaultSystemConnectionMemo
deregister, dispose, 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
dispose, get, getActionFactory, getDefaultOutputInterval, getDisabled, getOutputInterval, getSystemPrefix, getUserName, isDirty, isRestartRequired, provides, register, setDisabled, setOutputInterval, setSystemPrefix, setUserName
-
-
-
-
Constructor Detail
-
RpsSystemConnectionMemo
public RpsSystemConnectionMemo(@Nonnull java.lang.String prefix, @Nonnull java.lang.String name)
-
RpsSystemConnectionMemo
public RpsSystemConnectionMemo()
-
-
Method Detail
-
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
-
configureManagers
public void configureManagers()
Description copied from interface:ConfiguringSystemConnectionMemo
Configure the common managers associated with the System Connection memo.- Specified by:
configureManagers
in interfaceConfiguringSystemConnectionMemo
-
getSensorManager
public RpsSensorManager getSensorManager()
- Returns:
- The RpsSensorManager associated with this connection.
-
getReporterManager
public RpsReporterManager getReporterManager()
- Returns:
- The RpsReporterManager associated with this connection
-
validateSystemNameFormat
public java.lang.String validateSystemNameFormat(java.lang.String name, Manager<?> manager, java.util.Locale locale)
Validate RPS system name format.- Parameters:
name
- the name to validatemanager
- the manager requesting the validationlocale
- the locale for user messages- Returns:
- name, unchanged
-
validSystemNameFormat
public Manager.NameValidity validSystemNameFormat(@Nonnull java.lang.String systemName, char type)
Validate RPS system name format.- Parameters:
systemName
- system name.type
- e.g. S for Sensor, T for Turnout.- Returns:
- VALID if system name has a valid format, else return INVALID
-
-