Class LayoutTraverser.SlotTrack

java.lang.Object
jmri.jmrit.display.layoutEditor.LayoutTraverser.SlotTrack
Enclosing class:
LayoutTraverser

public class LayoutTraverser.SlotTrack extends Object
  • Field Details

  • Constructor Details

    • SlotTrack

      public SlotTrack(double offset, int index)
      constructor for SlotTracks
      Parameters:
      offset - its offset
      index - its index
  • Method Details

    • setDisabled

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

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

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

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

      get the track segment connected to this slot
      Returns:
      the track segment connected to this slot
    • setConnect

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

      public double getOffset()
      Get the offset for this slot.
      Returns:
      the offset for this slot
    • setOffset

      public void setOffset(double o)
      Set the offset for this slot.
      Parameters:
      o - the offset for this slot
    • getConnectionIndex

      public int getConnectionIndex()
      Get the connection index for this slot.
      Returns:
      the connection index for this slot
    • getApproachMast

      Get the approach signal mast for this slot.
      Returns:
      The signal mast, or null.
    • getApproachMastName

    • setApproachMast

      public void setApproachMast(String name)
      Set the approach signal mast for this slot by name.
      Parameters:
      name - The name of the signal mast.
    • isOccupied

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

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

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

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

      Get the turnout name for the slot track.
      Returns:
      the turnout name
    • getTurnoutState

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

      void dispose()
      Dispose of this slot track.