Package jmri
Interface SignalAppearanceMap
-
- All Known Implementing Classes:
DefaultSignalAppearanceMap
public interface SignalAppearanceMap
Access to signal appearance information.Maps to an appearance file in a signal system. This interface does not provide any methods to change the map.
-
-
Field Summary
Fields Modifier and Type Field Description static int
DANGER
Constant representing the "danger" aspect for a signalstatic int
DARK
Constant representing the "dark" aspect for a signalstatic int
HELD
Constant representing the "held" aspect for a signalstatic int
PERMISSIVE
Constant representing the "permissive" aspect for a signal
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description boolean
checkAspect(java.lang.String aspect)
Check if an aspect can be displayed.java.util.Enumeration<java.lang.String>
getAspects()
Get all available aspect names.java.lang.String
getImageLink(java.lang.String aspect, java.lang.String key)
Get an Image Link associated with a specific aspect and typejava.util.Vector<java.lang.String>
getImageTypes(java.lang.String aspect)
Get a list of valid icon sets.java.lang.String
getProperty(java.lang.String aspect, java.lang.String key)
Get a property associated with a specific aspectSignalSystem
getSignalSystem()
Get the associated signal system and the common information it contains.java.lang.String
getSpecificAppearance(int appearance)
Return the aspect for a specific appearance.java.lang.String[]
getValidAspectsForAdvancedAspect(java.lang.String advancedAspect)
Get a list of potential aspects that we could set the SignalMast to, given the state of the advanced signal mast.java.lang.String
summary()
Provide a multi-line summary of the signal system content, typically for printing.
-
-
-
Field Detail
-
HELD
static final int HELD
Constant representing the "held" aspect for a signal- See Also:
- Constant Field Values
-
PERMISSIVE
static final int PERMISSIVE
Constant representing the "permissive" aspect for a signal- See Also:
- Constant Field Values
-
DANGER
static final int DANGER
Constant representing the "danger" aspect for a signal- See Also:
- Constant Field Values
-
DARK
static final int DARK
Constant representing the "dark" aspect for a signal- See Also:
- Constant Field Values
-
-
Method Detail
-
checkAspect
boolean checkAspect(java.lang.String aspect)
Check if an aspect can be displayed.- Parameters:
aspect
- the aspect to check- Returns:
- true if the aspect can be displayed; false otherwise
-
getAspects
java.util.Enumeration<java.lang.String> getAspects()
Get all available aspect names.- Returns:
- an enumeration of available aspects
-
getSignalSystem
SignalSystem getSignalSystem()
Get the associated signal system and the common information it contains.- Returns:
- the signal system
-
getProperty
java.lang.String getProperty(java.lang.String aspect, java.lang.String key)
Get a property associated with a specific aspect- Parameters:
aspect
- the aspect containing the propertykey
- the property key- Returns:
- the property value or null if none is defined for key
-
getImageLink
java.lang.String getImageLink(java.lang.String aspect, java.lang.String key)
Get an Image Link associated with a specific aspect and type- Parameters:
aspect
- the aspectkey
- the image link key- Returns:
- the image link or an empty String if none is defined
-
getImageTypes
java.util.Vector<java.lang.String> getImageTypes(java.lang.String aspect)
Get a list of valid icon sets.- Parameters:
aspect
- the aspect to get icon sets for- Returns:
- a list of sets or an empty list if none are defined
-
getSpecificAppearance
java.lang.String getSpecificAppearance(int appearance)
Return the aspect for a specific appearance.- Parameters:
appearance
- the appearance- Returns:
- the aspect
-
getValidAspectsForAdvancedAspect
java.lang.String[] getValidAspectsForAdvancedAspect(java.lang.String advancedAspect)
Get a list of potential aspects that we could set the SignalMast to, given the state of the advanced signal mast.- Parameters:
advancedAspect
- the aspect- Returns:
- a string array of potential aspects or null if none defined
-
summary
java.lang.String summary()
Provide a multi-line summary of the signal system content, typically for printing.Not intended for further parsing, i.e. for persistence, as format likely to differ from type to type, and to change often.
- Returns:
- summary string.
-
-