Interface SignalSystem
- All Superinterfaces:
Comparable<NamedBean>
,NamedBean
,PropertyChangeProvider
- All Known Implementing Classes:
DefaultSignalSystem
public interface SignalSystem extends NamedBean
At present, the signal aspects are enumerated by Strings, not by specific objects; this table exists to attach properties to those Strings.
Setting or getting the "state" of one of these will throw an error.
You'll have one of these objects for each signaling _system_ on your
railroad. In turn, these will be used by 1 to N specific mappings to
appearances, see e.g. SignalAppearanceMap
.
Insertion order is preserved when retrieving keys.
This file is part of JMRI.
JMRI is free software; you can redistribute it and/or modify it under the terms of version 2 of the GNU General Public License as published by the Free Software Foundation. See the "COPYING" file for a copy of this license.
JMRI is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
-
Nested Class Summary
Nested classes/interfaces inherited from interface jmri.NamedBean
NamedBean.BadNameException, NamedBean.BadSystemNameException, NamedBean.BadUserNameException, NamedBean.DisplayOptions, NamedBean.DuplicateSystemNameException
-
Field Summary
Fields inherited from interface jmri.NamedBean
DISPLAY_NAME_FORMAT, INCONSISTENT, PROPERTY_STATE, QUOTED_NAME_FORMAT, UNKNOWN
-
Method Summary
Modifier and Type Method Description boolean
checkAspect(String aspect)
Is this aspect known?String
getAspect(Object obj, String key)
Enumeration<String>
getAspects()
Get all aspects currently defined.Enumeration<String>
getImageTypeList()
Returns a list of the image/icon sets available for use with this signaling system.Enumeration<String>
getKeys()
Get all keys currently defined on any aspect.float
getMaximumLineSpeed()
Object
getProperty(String aspect, String key)
void
setImageType(String type)
Add an image or icon type available for use with this signaling system.void
setProperty(String aspect, String key, Object value)
String
summary()
Provide a multi-line summary of the signal system content, typically for printing.Methods inherited from interface jmri.NamedBean
addPropertyChangeListener, addPropertyChangeListener, compareSystemNameSuffix, compareTo, describeState, dispose, getBeanType, getComment, getDisplayName, getDisplayName, getFullyFormattedDisplayName, getFullyFormattedDisplayName, getListenerRef, getListenerRefs, getNumPropertyChangeListeners, getProperty, getPropertyChangeListenersByReference, getPropertyKeys, getState, getSystemName, getUsageReport, getUserName, removeProperty, setComment, setProperty, setState, setUserName, toString, updateListenerRef, vetoableChange
Methods inherited from interface jmri.beans.PropertyChangeProvider
addPropertyChangeListener, addPropertyChangeListener, getPropertyChangeListeners, getPropertyChangeListeners, removePropertyChangeListener, removePropertyChangeListener
-
Method Details
-
setProperty
-
getProperty
-
setImageType
Add an image or icon type available for use with this signaling system.- Parameters:
type
- the image type
-
getImageTypeList
Returns a list of the image/icon sets available for use with this signaling system.- Returns:
- all image types or an empty list
-
getAspects
Get all aspects currently defined.- Returns:
- all aspects or an empty list
-
getKeys
Get 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.
- Returns:
- all keys or an empty list
-
checkAspect
Is this aspect known?- Parameters:
aspect
- the aspect to check- Returns:
- true if known; false otherwise
-
getAspect
-
getMaximumLineSpeed
float getMaximumLineSpeed() -
summary
Provide 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.
- Returns:
- summary string.
-