jmri
Class DoubleTurnoutSignalHead

java.lang.Object
  extended by jmri.AbstractNamedBean
      extended by jmri.AbstractSignalHead
          extended by jmri.DefaultSignalHead
              extended by jmri.DoubleTurnoutSignalHead
All Implemented Interfaces:
Serializable, NamedBean, SignalHead

public class DoubleTurnoutSignalHead
extends DefaultSignalHead

Drive a single signal head via two "Turnout" objects.

After much confusion, the user-level terminology was changed to call these "Double Output"; the class name remains the same to reduce recoding.

The two Turnout objects are provided during construction, and each drives a specific color (RED and GREEN). Normally, "THROWN" is on, and "CLOSED" is off. YELLOW is provided by turning both on ("THROWN")

This class doesn't currently listen to the Turnout's to see if they've been changed via some other mechanism.

Author:
Bob Jacobsen Copyright (C) 2003, 2008
See Also:
Serialized Form

Field Summary
 
Fields inherited from class jmri.DefaultSignalHead
mFlashOn
 
Fields inherited from class jmri.AbstractSignalHead
mAppearance, mHeld, mLit
 
Fields inherited from interface jmri.SignalHead
DARK, FLASHGREEN, FLASHRED, FLASHYELLOW, GREEN, RED, YELLOW
 
Fields inherited from interface jmri.NamedBean
INCONSISTENT, UNKNOWN
 
Constructor Summary
DoubleTurnoutSignalHead(String sys, String user, Turnout green, Turnout red)
           
DoubleTurnoutSignalHead(String sys, Turnout green, Turnout red)
           
 
Method Summary
 void dispose()
          Remove references to and from this object, so that it can eventually be garbage-collected.
 Turnout getGreen()
           
 Turnout getRed()
           
 void setGreen(Turnout t)
           
 void setRed(Turnout t)
           
protected  void updateOutput()
          Type-specific routine to handle output to the layout hardware.
 
Methods inherited from class jmri.DefaultSignalHead
setAppearance, setHeld, setLit, startFlash, stopFlash
 
Methods inherited from class jmri.AbstractSignalHead
getAppearance, getHeld, getLit, getState, setState
 
Methods inherited from class jmri.AbstractNamedBean
addPropertyChangeListener, firePropertyChange, getComment, getNumPropertyChangeListeners, getSystemName, getUserName, removePropertyChangeListener, setComment, setUserName
 
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, getComment, getNumPropertyChangeListeners, getSystemName, getUserName, removePropertyChangeListener, setComment, setUserName
 

Constructor Detail

DoubleTurnoutSignalHead

public DoubleTurnoutSignalHead(String sys,
                               String user,
                               Turnout green,
                               Turnout red)

DoubleTurnoutSignalHead

public DoubleTurnoutSignalHead(String sys,
                               Turnout green,
                               Turnout red)
Method Detail

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:

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

getRed

public Turnout getRed()

getGreen

public Turnout getGreen()

setRed

public void setRed(Turnout t)

setGreen

public void setGreen(Turnout t)


Copyright © 1997 - 2008 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: SourceForge_Logo