Class LayoutTurntable.RayTrack

    • Field Summary

      Fields 
      Modifier and Type Field Description
      java.lang.String connectName  
    • Constructor Summary

      Constructors 
      Constructor Description
      RayTrack​(double angle, int index)
      constructor for RayTracks
    • Constructor Detail

      • RayTrack

        public RayTrack​(double angle,
                        int index)
        constructor for RayTracks
        Parameters:
        angle - its angle
        index - its index
    • Method Detail

      • setDisabled

        public void setDisabled​(boolean boo)
        Set ray track disabled.
        Parameters:
        boo - set true to disable
      • isDisabled

        public boolean isDisabled()
        Is this ray track disabled?
        Returns:
        true if so
      • setDisabledWhenOccupied

        public void setDisabledWhenOccupied​(boolean boo)
        Set ray track disabled if occupied.
        Parameters:
        boo - set true to disable if occupied
      • isDisabledWhenOccupied

        public boolean isDisabledWhenOccupied()
        Is ray track disabled if occupied?
        Returns:
        true if so
      • getConnect

        public TrackSegment getConnect()
        get the track segment connected to this ray
        Returns:
        the track segment connected to this ray
      • setConnect

        public void setConnect​(TrackSegment ts)
        Set the track segment connected to this ray.
        Parameters:
        ts - the track segment to connect to this ray
      • getAngle

        public double getAngle()
        Get the angle for this ray.
        Returns:
        the angle for this ray
      • setAngle

        public void setAngle​(double an)
        Set the angle for this ray.
        Parameters:
        an - the angle for this ray
      • getConnectionIndex

        public int getConnectionIndex()
        Get the connection index for this ray.
        Returns:
        the connection index for this ray
      • isOccupied

        public boolean isOccupied()
        Is this ray occupied?
        Returns:
        true if occupied
      • setTurnout

        public void setTurnout​(@Nonnull
                               java.lang.String turnoutName,
                               int state)
        Set the turnout and state for this ray track.
        Parameters:
        turnoutName - the turnout name
        state - its state
      • setPosition

        public void setPosition()
        Set the position for this ray track.
      • getTurnout

        public Turnout getTurnout()
        Get the turnout for this ray track.
        Returns:
        the turnout or null
      • getTurnoutName

        @CheckForNull
        public java.lang.String getTurnoutName()
        Get the turnout name for the ray track.
        Returns:
        the turnout name
      • getTurnoutState

        public int getTurnoutState()
        Get the state for the turnout for this ray track.
        Returns:
        the state
      • dispose

        void dispose()
        Dispose of this ray track.