Package jmri.jmrit.display.layoutEditor
Class LayoutTurntable.RayTrack
- java.lang.Object
-
- jmri.jmrit.display.layoutEditor.LayoutTurntable.RayTrack
-
- Enclosing class:
- LayoutTurntable
public class LayoutTurntable.RayTrack extends java.lang.Object
-
-
Field Summary
Fields Modifier and Type Field Description java.lang.StringconnectName
-
Constructor Summary
Constructors Constructor Description RayTrack(double angle, int index)constructor for RayTracks
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description (package private) voiddispose()Dispose of this ray track.doublegetAngle()Get the angle for this ray.TrackSegmentgetConnect()get the track segment connected to this rayintgetConnectionIndex()Get the connection index for this ray.TurnoutgetTurnout()Get the turnout for this ray track.java.lang.StringgetTurnoutName()Get the turnout name for the ray track.intgetTurnoutState()Get the state for the turnout for this ray track.booleanisDisabled()Is this ray track disabled?booleanisDisabledWhenOccupied()Is ray track disabled if occupied?booleanisOccupied()Is this ray occupied?voidsetAngle(double an)Set the angle for this ray.voidsetConnect(TrackSegment ts)Set the track segment connected to this ray.voidsetDisabled(boolean boo)Set ray track disabled.voidsetDisabledWhenOccupied(boolean boo)Set ray track disabled if occupied.voidsetPosition()Set the position for this ray track.voidsetTurnout(java.lang.String turnoutName, int state)Set the turnout and state for this ray track.
-
-
-
Field Detail
-
connectName
public java.lang.String connectName
-
-
Constructor Detail
-
RayTrack
public RayTrack(double angle, int index)
constructor for RayTracks- Parameters:
angle- its angleindex- 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 namestate- 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.
-
-