|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectjmri.implementation.AbstractNamedBean
jmri.implementation.DefaultSignalSystem
public class DefaultSignalSystem
Default implementation of a basic signal system definition.
The default contents are taken from the NamedBeanBundle properties file. This makes creation a little more heavy-weight, but speeds operation.
| Field Summary | |
|---|---|
protected Hashtable<String,Hashtable<String,Object>> |
aspects
|
protected Vector<String> |
imageTypes
|
protected Vector<String> |
keys
|
(package private) static org.slf4j.Logger |
log
|
(package private) float |
maximumLineSpeed
|
| Fields inherited from class jmri.implementation.AbstractNamedBean |
|---|
listenerRefs, mSystemName, mUserName, parameters, pcs, register |
| Fields inherited from interface jmri.NamedBean |
|---|
INCONSISTENT, UNKNOWN |
| Constructor Summary | |
|---|---|
DefaultSignalSystem(String systemName)
|
|
DefaultSignalSystem(String systemName,
String userName)
|
|
| Method Summary | |
|---|---|
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 signalling system. |
Enumeration<String> |
getKeys()
Get all keys currently defined on any aspect. |
float |
getMaximumLineSpeed()
|
Object |
getProperty(String aspect,
String key)
|
int |
getState()
Provide generic access to internal state. |
protected Hashtable<String,Object> |
getTable(String aspect)
|
void |
loadDefaults()
|
void |
setImageType(String type)
Add an image or icon type available for use with this signalling system |
void |
setProperty(String aspect,
String key,
Object value)
|
void |
setState(int s)
Provide generic access to internal state. |
String |
toString()
|
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Field Detail |
|---|
float maximumLineSpeed
protected Hashtable<String,Hashtable<String,Object>> aspects
protected Vector<String> keys
protected Vector<String> imageTypes
static org.slf4j.Logger log
| Constructor Detail |
|---|
public DefaultSignalSystem(String systemName,
String userName)
public DefaultSignalSystem(String systemName)
| Method Detail |
|---|
public void setProperty(String aspect,
String key,
Object value)
setProperty in interface SignalSystem
public Object getProperty(String aspect,
String key)
getProperty in interface SignalSystempublic void setImageType(String type)
SignalSystem
setImageType in interface SignalSystempublic Enumeration<String> getImageTypeList()
SignalSystem
getImageTypeList in interface SignalSystem
public String getAspect(Object obj,
String key)
getAspect in interface SignalSystemprotected Hashtable<String,Object> getTable(String aspect)
public Enumeration<String> getAspects()
SignalSystem
getAspects in interface SignalSystempublic Enumeration<String> getKeys()
SignalSystemEach 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.
getKeys in interface SignalSystempublic boolean checkAspect(String aspect)
SignalSystem
checkAspect in interface SignalSystempublic void loadDefaults()
public int getState()
NamedBeanThis generally shouldn't be used by Java code; use the class-specific form instead. (E.g. getCommandedState in Turnout) This provided to make Jython script access easier to read.
getState in interface NamedBeanpublic void setState(int s)
NamedBeanThis generally shouldn't be used by Java code; use the class-specific form instead. (E.g. setCommandedState in Turnout) This provided to make Jython script access easier to read.
setState in interface NamedBeanpublic float getMaximumLineSpeed()
getMaximumLineSpeed in interface SignalSystempublic String toString()
toString in class Object
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||