Class DefaultSignalHead

    • Field Detail

      • mFlashOn

        protected boolean mFlashOn
        Should a flashing signal be on (lit) now?
      • timer

        javax.swing.Timer timer
      • delay

        public int delay
        On or off time of flashing signal. Public so that it can be overridden by scripting (before first use)
    • Constructor Detail

      • DefaultSignalHead

        public DefaultSignalHead​(java.lang.String systemName,
                                 java.lang.String userName)
    • Method Detail

      • setAppearance

        public void setAppearance​(int newAppearance)
        Description copied from interface: SignalHead
        Set the Signal Head Appearance.
        Parameters:
        newAppearance - integer representing a valid Appearance for this head
      • appearanceSetsFlashTimer

        protected void appearanceSetsFlashTimer​(int newAppearance)
        Call to set timer when updating the appearance.
        Parameters:
        newAppearance - the new appearance
      • setLit

        public void setLit​(boolean newLit)
        Description copied from interface: SignalHead
      • setHeld

        public void setHeld​(boolean newHeld)
        Set the held parameter.

        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.

        Parameters:
        newHeld - new Held state, true if Held, to be compared with current Held state
      • updateOutput

        protected abstract void updateOutput()
        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
      • startFlash

        protected void startFlash()
        Start the timer that controls flashing.
      • getUsageReport

        public java.util.List<NamedBeanUsageReportgetUsageReport​(NamedBean bean)
        Description copied from interface: NamedBean
        Get a list of references for the specified bean.
        Parameters:
        bean - The bean to be checked.
        Returns:
        a list of NamedBeanUsageReports or an empty ArrayList.