Package jmri.implementation
Class QuadOutputSignalHead
- All Implemented Interfaces:
VetoableChangeListener,Comparable<NamedBean>,EventListener,PropertyChangeProvider,NamedBean,Signal,SignalHead
Drive a single signal head via four "Turnout" objects.
After much confusion, the user-level terminology was changed to call these "Triple Output"; the class name remains the same to reduce recoding.
The four Turnout objects are provided during construction, and each drives a specific color (RED, YELLOW, GREEN, and LUNAR). Normally, "THROWN" is on, and "CLOSED" is off.
This class doesn't currently listen to the Turnout's to see if they've been changed via some other mechanism.
-
Nested Class Summary
Nested classes/interfaces inherited from interface jmri.NamedBean
NamedBean.BadNameException, NamedBean.BadSystemNameException, NamedBean.BadUserNameException, NamedBean.DisplayOptions, NamedBean.DuplicateSystemNameException -
Field Summary
FieldsFields inherited from class jmri.implementation.TripleTurnoutSignalHead
mYellowFields inherited from class jmri.implementation.DoubleTurnoutSignalHead
mGreen, mGreenCommanded, mRed, mRedCommanded, readUpdateTimerFields inherited from class jmri.implementation.DefaultSignalHead
delay, masterDelay, mFlashOn, timerFields inherited from class jmri.implementation.AbstractSignalHead
mAppearance, mHeld, mLitFields inherited from class jmri.implementation.AbstractNamedBean
listenerRefs, mSystemName, registerFields inherited from interface jmri.NamedBean
DISPLAY_NAME_FORMAT, INCONSISTENT, PROPERTY_COMMENT, PROPERTY_ENABLED, PROPERTY_KNOWN_STATE, PROPERTY_STATE, PROPERTY_USERNAME, QUOTED_NAME_FORMAT, UNKNOWNFields inherited from interface jmri.Signal
PROPERTY_HELD, PROPERTY_LITFields inherited from interface jmri.SignalHead
DARK, FLASHGREEN, FLASHLUNAR, FLASHRED, FLASHYELLOW, GREEN, HELD, LUNAR, PROPERTY_APPEARANCE, RED, YELLOW -
Constructor Summary
ConstructorsConstructorDescriptionQuadOutputSignalHead(String sys, String user, NamedBeanHandle<Turnout> green, NamedBeanHandle<Turnout> yellow, NamedBeanHandle<Turnout> red, NamedBeanHandle<Turnout> lunar) QuadOutputSignalHead(String sys, NamedBeanHandle<Turnout> green, NamedBeanHandle<Turnout> yellow, NamedBeanHandle<Turnout> red, NamedBeanHandle<Turnout> lunar) -
Method Summary
Modifier and TypeMethodDescriptionvoiddispose()Remove references to and from this object, so that it can eventually be garbage-collected.getLunar()String[]Get an array of non-localized appearance keys valid for the mast type.String[]Get an array of localized appearance descriptions valid for the mast type.int[]Get an array of appearance indexes valid for the mast type.booleanCheck if a given turnout is used on this head.voidprotected voidType-specific routine to handle output to the layout hardware.Methods inherited from class jmri.implementation.TripleTurnoutSignalHead
getYellow, readOutput, setYellowMethods inherited from class jmri.implementation.DoubleTurnoutSignalHead
commandState, getGreen, getRed, setGreen, setRedMethods inherited from class jmri.implementation.DefaultSignalHead
appearanceSetsFlashTimer, getUsageReport, setAppearance, setHeld, setLit, startFlash, stopFlashMethods inherited from class jmri.implementation.AbstractSignalHead
describeState, getAppearance, getAppearanceKey, getAppearanceKey, getAppearanceName, getAppearanceName, getBeanType, getDefaultStateName, getDefaultValidStateNames, getDefaultValidStates, getHeld, getLit, getState, isAtStop, isCleared, isShowingRestricting, setState, vetoableChangeMethods inherited from class jmri.implementation.AbstractNamedBean
addPropertyChangeListener, addPropertyChangeListener, addPropertyChangeListener, addPropertyChangeListener, compareSystemNameSuffix, equals, firePropertyChange, getComment, getDisplayName, getDisplayName, getListenerRef, getListenerRefs, getNumPropertyChangeListeners, getProperty, getPropertyChangeListeners, getPropertyChangeListeners, getPropertyChangeListenersByReference, getPropertyKeys, getSystemName, getUserName, hashCode, removeProperty, removePropertyChangeListener, removePropertyChangeListener, setComment, setProperty, setUserName, toString, toStringSuffix, updateListenerRefMethods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, waitMethods inherited from interface jmri.NamedBean
addPropertyChangeListener, addPropertyChangeListener, compareSystemNameSuffix, compareTo, getComment, getDisplayName, getDisplayName, getListenerRef, getListenerRefs, getNumPropertyChangeListeners, getProperty, getPropertyChangeListenersByReference, getPropertyKeys, getRecommendedToolTip, getSystemName, getUserName, removeProperty, setComment, setProperty, setUserName, toString, updateListenerRefMethods inherited from interface jmri.beans.PropertyChangeProvider
addPropertyChangeListener, addPropertyChangeListener, getPropertyChangeListeners, getPropertyChangeListeners, removePropertyChangeListener, removePropertyChangeListener
-
Field Details
-
mLunar
-
-
Constructor Details
-
QuadOutputSignalHead
public QuadOutputSignalHead(String sys, String user, NamedBeanHandle<Turnout> green, NamedBeanHandle<Turnout> yellow, NamedBeanHandle<Turnout> red, NamedBeanHandle<Turnout> lunar) -
QuadOutputSignalHead
public QuadOutputSignalHead(String sys, NamedBeanHandle<Turnout> green, NamedBeanHandle<Turnout> yellow, NamedBeanHandle<Turnout> red, NamedBeanHandle<Turnout> lunar)
-
-
Method Details
-
updateOutput
Description copied from class:DefaultSignalHeadType-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
- Overrides:
updateOutputin classTripleTurnoutSignalHead
-
dispose
Remove references to and from this object, so that it can eventually be garbage-collected.- Specified by:
disposein interfaceNamedBean- Overrides:
disposein classTripleTurnoutSignalHead
-
getLunar
-
setLunar
-
getValidStates
Get an array of appearance indexes valid for the mast type.- Specified by:
getValidStatesin interfaceSignalHead- Overrides:
getValidStatesin classDefaultSignalHead- Returns:
- array of appearance state values available on this mast type
-
getValidStateKeys
Get an array of non-localized appearance keys valid for the mast type. For GUI application consider using (capitalized)SignalHead.getValidStateNames()- Specified by:
getValidStateKeysin interfaceSignalHead- Overrides:
getValidStateKeysin classDefaultSignalHead- Returns:
- array of translated appearance names available on this mast type
-
getValidStateNames
Get an array of localized appearance descriptions valid for the mast type. For persistance and comparison consider usingSignalHead.getValidStateKeys()- Specified by:
getValidStateNamesin interfaceSignalHead- Overrides:
getValidStateNamesin classDefaultSignalHead- Returns:
- array of translated appearance names
-
isTurnoutUsed
Description copied from class:AbstractSignalHeadCheck if a given turnout is used on this head.- Overrides:
isTurnoutUsedin classTripleTurnoutSignalHead- Parameters:
t- Turnout object to check- Returns:
- true if turnout is configured as output or driver of head
-