|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectjmri.implementation.AbstractNamedBean
jmri.implementation.AbstractSignalMast
public abstract class AbstractSignalMast
Abstract class providing the basic logic of the SignalMast interface.
| Field Summary |
|---|
| Fields inherited from class jmri.implementation.AbstractNamedBean |
|---|
mSystemName, mUserName |
| Fields inherited from interface jmri.NamedBean |
|---|
INCONSISTENT, UNKNOWN |
| Constructor Summary | |
|---|---|
AbstractSignalMast(String systemName)
|
|
AbstractSignalMast(String systemName,
String userName)
|
|
| Method Summary | |
|---|---|
String |
getAspect()
Get current aspect name. |
boolean |
getHeld()
"Held" parameter is just tracked and notified. |
boolean |
getLit()
Default behavior for "lit" parameter is to track value and return it. |
String |
getSpeed()
|
int |
getState()
The state is the index of the current aspect in the list of possible aspects. |
void |
setAspect(String aspect)
Set aspect to a valid name in the current signal system definition. |
void |
setHeld(boolean newHeld)
Set the held parameter. |
void |
setLit(boolean newLit)
Set the lit parameter. |
void |
setState(int i)
Provide generic access to internal state. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Methods inherited from interface jmri.SignalMast |
|---|
getAppearanceMap, getSignalSystem, getValidAspects |
| Constructor Detail |
|---|
public AbstractSignalMast(String systemName,
String userName)
public AbstractSignalMast(String systemName)
| Method Detail |
|---|
@OverrideMustInvoke public void setAspect(String aspect)
SignalMast
setAspect in interface SignalMastpublic String getAspect()
SignalMast
getAspect in interface SignalMastpublic String getSpeed()
public int getState()
getState in interface NamedBeanpublic void setState(int i)
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 boolean getLit()
getLit in interface SignalMastpublic boolean getHeld()
getHeld in interface SignalMast@OverrideMustInvoke public void setLit(boolean newLit)
setLit in interface SignalMast@OverrideMustInvoke public void setHeld(boolean newHeld)
Note that this does not directly effect the output on the layout; the held parameter is a local variable which effects the aspect only via higher-level logic.
setHeld in interface SignalMast
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||