Class SlipTurnoutIcon

  • All Implemented Interfaces:
    java.awt.image.ImageObserver, java.awt.MenuContainer, java.beans.PropertyChangeListener,, java.lang.Cloneable, java.util.EventListener, javax.accessibility.Accessible, javax.swing.SwingConstants, Positionable, InlineLogixNG

    public class SlipTurnoutIcon
    extends PositionableLabel
    implements java.beans.PropertyChangeListener
    An icon to display a status of a Slip, either Single or Double.

    This responds to only KnownState, leaving CommandedState to some other graphic representation later.

    A click on the icon will command a state change. Specifically, it will set the CommandedState to the opposite (THROWN vs CLOSED) of the current KnownState.

    Note: lower west to lower east icon is used for storing the slip icon, in a single slip, even if the slip is set for upper west to upper east.

    With a 3-Way point we use the following translations

    • lower west to upper east - to upper exit
    • upper west to lower east - to middle exit
    • lower west to lower east - to lower exit
    • west Turnout - First Turnout
    • east Turnout - Second Turnout
    • singleSlipRoute - translates to which exit the first turnout goes to
    • true if upper, or false if lower

    Based upon the TurnoutIcon by Bob Jacobsen

    See Also:
    Serialized Form