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.String
connectName
-
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) void
dispose()
Dispose of this ray track.double
getAngle()
Get the angle for this ray.TrackSegment
getConnect()
get the track segment connected to this rayint
getConnectionIndex()
Get the connection index for this ray.Turnout
getTurnout()
Get the turnout for this ray track.java.lang.String
getTurnoutName()
Get the turnout name for the ray track.int
getTurnoutState()
Get the state for the turnout for this ray track.boolean
isDisabled()
Is this ray track disabled?boolean
isDisabledWhenOccupied()
Is ray track disabled if occupied?boolean
isOccupied()
Is this ray occupied?void
setAngle(double an)
Set the angle for this ray.void
setConnect(TrackSegment ts)
Set the track segment connected to this ray.void
setDisabled(boolean boo)
Set ray track disabled.void
setDisabledWhenOccupied(boolean boo)
Set ray track disabled if occupied.void
setPosition()
Set the position for this ray track.void
setTurnout(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.
-
-