Class DefaultSignalSystem
- All Implemented Interfaces:
Comparable<NamedBean>,PropertyChangeProvider,NamedBean,SignalSystem
The default contents are taken from the NamedBeanBundle properties file. This makes creation a little more heavy-weight, but speeds operation.
-
Nested Class Summary
Nested classes/interfaces inherited from interface jmri.NamedBean
NamedBean.BadNameException, NamedBean.BadSystemNameException, NamedBean.BadUserNameException, NamedBean.DisplayOptions, NamedBean.DuplicateSystemNameException -
Field Summary
FieldsModifier and TypeFieldDescription(package private) floatFields inherited from class jmri.implementation.AbstractNamedBean
listenerRefs, mSystemName, registerFields inherited from interface jmri.NamedBean
DISPLAY_NAME_FORMAT, INCONSISTENT, PROPERTY_COMMENT, PROPERTY_ENABLED, PROPERTY_KNOWN_STATE, PROPERTY_STATE, PROPERTY_USERNAME, QUOTED_NAME_FORMAT, UNKNOWN -
Constructor Summary
ConstructorsConstructorDescriptionDefaultSignalSystem(String systemName) DefaultSignalSystem(String systemName, String userName) -
Method Summary
Modifier and TypeMethodDescriptionbooleancheckAspect(String aspect) Is this aspect known?Get all aspects currently defined.For instances in the code where we are dealing with just a bean and a message needs to be passed to the user or in a log.Returns a list of the image/icon sets available for use with this signaling system.getKeys()Get all keys currently defined on any aspect.floatgetProperty(String aspect, String key) intgetState()Provide generic access to internal state.voidvoidsetImageType(String type) Add an image or icon type available for use with this signaling system.voidsetProperty(String aspect, String key, Object value) voidsetState(int s) Provide generic access to internal state.summary()Provide a multi-line summary of the signal system content, typically for printing.Methods inherited from class jmri.implementation.AbstractNamedBean
addPropertyChangeListener, addPropertyChangeListener, addPropertyChangeListener, addPropertyChangeListener, compareSystemNameSuffix, describeState, dispose, equals, firePropertyChange, getComment, getDisplayName, getDisplayName, getListenerRef, getListenerRefs, getNumPropertyChangeListeners, getProperty, getPropertyChangeListeners, getPropertyChangeListeners, getPropertyChangeListenersByReference, getPropertyKeys, getSystemName, getUserName, hashCode, removeProperty, removePropertyChangeListener, removePropertyChangeListener, setComment, setProperty, setUserName, toString, toStringSuffix, updateListenerRef, vetoableChangeMethods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, waitMethods inherited from interface jmri.NamedBean
addPropertyChangeListener, addPropertyChangeListener, compareSystemNameSuffix, compareTo, describeState, dispose, getComment, getDisplayName, getDisplayName, getListenerRef, getListenerRefs, getNumPropertyChangeListeners, getProperty, getPropertyChangeListenersByReference, getPropertyKeys, getRecommendedToolTip, getSystemName, getUsageReport, getUserName, removeProperty, setComment, setProperty, setUserName, toString, updateListenerRef, vetoableChangeMethods inherited from interface jmri.beans.PropertyChangeProvider
addPropertyChangeListener, addPropertyChangeListener, getPropertyChangeListeners, getPropertyChangeListeners, removePropertyChangeListener, removePropertyChangeListener
-
Field Details
-
maximumLineSpeed
float maximumLineSpeed -
aspects
-
keys
-
imageTypes
-
-
Constructor Details
-
DefaultSignalSystem
-
DefaultSignalSystem
-
-
Method Details
-
setProperty
- Specified by:
setPropertyin interfaceSignalSystem
-
getProperty
- Specified by:
getPropertyin interfaceSignalSystem
-
setImageType
Description copied from interface:SignalSystemAdd an image or icon type available for use with this signaling system.- Specified by:
setImageTypein interfaceSignalSystem- Parameters:
type- the image type
-
getImageTypeList
Description copied from interface:SignalSystemReturns a list of the image/icon sets available for use with this signaling system.- Specified by:
getImageTypeListin interfaceSignalSystem- Returns:
- all image types or an empty list
-
getAspect
- Specified by:
getAspectin interfaceSignalSystem
-
getTable
-
getAspects
Description copied from interface:SignalSystemGet all aspects currently defined.- Specified by:
getAspectsin interfaceSignalSystem- Returns:
- all aspects or an empty list
-
getKeys
Description copied from interface:SignalSystemGet all keys currently defined on any aspect.Each key only appears once, even if used on more than one aspect.
Note that a given key may or may not appear on a given aspect.
- Specified by:
getKeysin interfaceSignalSystem- Returns:
- all keys or an empty list
-
checkAspect
Description copied from interface:SignalSystemIs this aspect known?- Specified by:
checkAspectin interfaceSignalSystem- Parameters:
aspect- the aspect to check- Returns:
- true if known; false otherwise
-
loadDefaults
-
getState
Provide generic access to internal state.This generally shouldn't be used by Java code; use the class-specific form instead (e.g. getCommandedState in Turnout). This is provided to make scripts easier to read. This method returns a constant result on the DefaultSignalSystem.
- Specified by:
getStatein interfaceNamedBean- Returns:
NamedBean.INCONSISTENT
-
setState
Provide generic access to internal state.This generally shouldn't be used by Java code; use the class-specific form instead (e.g. setCommandedState in Turnout). This is provided to make scripts access easier to read. This method has no effect on the DefaultSignalSystem.
-
getMaximumLineSpeed
- Specified by:
getMaximumLineSpeedin interfaceSignalSystem
-
getBeanType
Description copied from interface:NamedBeanFor instances in the code where we are dealing with just a bean and a message needs to be passed to the user or in a log.- Specified by:
getBeanTypein interfaceNamedBean- Returns:
- a string of the bean type, eg Turnout, Sensor etc
-
summary
Description copied from interface:SignalSystemProvide a multi-line summary of the signal system content, typically for printing.Not intended for further parsing, i.e. for persistance, as format likely to differ from type to type, and to change often.
- Specified by:
summaryin interfaceSignalSystem- Returns:
- summary string.
-