jmri.implementation
Class SingleTurnoutSignalHead
java.lang.Object
jmri.implementation.AbstractNamedBean
jmri.implementation.AbstractSignalHead
jmri.implementation.DefaultSignalHead
jmri.implementation.SingleTurnoutSignalHead
- All Implemented Interfaces:
- Serializable, NamedBean, SignalHead
public class SingleTurnoutSignalHead
- extends DefaultSignalHead
Drive a single signal head via one "Turnout" objects.
After much confusion, the user-level terminology
was changed to call these "Single Output"; the class
name remains the same to reduce recoding.
One Turnout object is provided during construction,
and drives the aspect to be either ON or OFF.
Normally, "THROWN" is on, and "CLOSED" is off.
The facility to set the aspect via any of the four
aspect colors is provided, however they all do the same.
This class doesn't currently listen to the Turnout's to see if they've
been changed via some other mechanism.
Based Upon DoubleTurnoutSignalHead by Bob Jacobsen
- Author:
- Kevin Dickerson Copyright (C) 2010
- See Also:
- Serialized Form
| Methods inherited from class jmri.implementation.AbstractNamedBean |
addPropertyChangeListener, addPropertyChangeListener, firePropertyChange, getComment, getDisplayName, getListenerRef, getListenerRefs, getNumPropertyChangeListeners, getProperty, getPropertyChangeListeners, getPropertyChangeListeners, getPropertyKeys, getSystemName, getUserName, removePropertyChangeListener, setComment, setProperty, setUserName, updateListenerRef |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Methods inherited from interface jmri.NamedBean |
addPropertyChangeListener, addPropertyChangeListener, getComment, getDisplayName, getListenerRef, getListenerRefs, getNumPropertyChangeListeners, getProperty, getPropertyChangeListeners, getPropertyKeys, getSystemName, getUserName, removePropertyChangeListener, setComment, setProperty, setUserName, updateListenerRef |
SingleTurnoutSignalHead
public SingleTurnoutSignalHead(String sys,
String user,
NamedBeanHandle<Turnout> lit,
int on,
int off)
- Parameters:
on - Appearance constant from SignalHead for the output on (Turnout thrown) appearanceoff - Appearance constant from SignalHead for the signal off (Turnout closed) appearance
SingleTurnoutSignalHead
public SingleTurnoutSignalHead(String sys,
NamedBeanHandle<Turnout> lit,
int on,
int off)
- Parameters:
on - Appearance constant from SignalHead for the output on (Turnout thrown) appearanceoff - Appearance constant from SignalHead for the signal off (Turnout closed) appearance
updateOutput
protected void updateOutput()
- Description copied from class:
DefaultSignalHead
- Type-specific routine to handle output to the layout hardware.
Does not notify listeners of changes; that's done elsewhere.
Should use the following variables to determine what to send:
- mAppearance
- mLit
- mFlashOn
- Specified by:
updateOutput in class DefaultSignalHead
dispose
public void dispose()
- Remove references to and from this object, so that it can
eventually be garbage-collected.
- Specified by:
dispose in interface NamedBean- Overrides:
dispose in class AbstractNamedBean
getOnAppearance
public int getOnAppearance()
getOffAppearance
public int getOffAppearance()
setOnAppearance
public void setOnAppearance(int on)
setOffAppearance
public void setOffAppearance(int off)
getOutput
public NamedBeanHandle<Turnout> getOutput()
setOutput
public void setOutput(NamedBeanHandle<Turnout> t)
getValidStates
public int[] getValidStates()
- Specified by:
getValidStates in interface SignalHead- Overrides:
getValidStates in class DefaultSignalHead
getValidStateNames
public String[] getValidStateNames()
- Specified by:
getValidStateNames in interface SignalHead- Overrides:
getValidStateNames in class DefaultSignalHead
Copyright © 1997 - 2011 JMRI Community.
JMRI, DecoderPro, PanelPro, SoundPro, DispatcherPro and associated logos are our trademarks.
Additional information on copyright, trademarks and licenses is linked here.
Site hosted by: