|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectjmri.jmrit.display.layoutEditor.TrackNode
public class TrackNode
TrackNode is a temporary object specifying and returning track node information
Used in conjunction with ConnectivityUtil.java to return information about track nodes following a search of layout connectivity.
Track nodes are nodes in the layout connectivity diagram. They may be: positionable points - either anchor points that define a block boundary or end bumpers (end of a track), turnouts, -OR_ level crossings
The components of a TrackNode are: Node Object - the object reached by searching connectivity Node Type - connection types defined in Layout Editor, for example, TURNOUT_A, indicates a turnout connected at A (the throat of a RH, LH, or WYE turnout) Track Segment - the track segment connected at the connection point specified in Node Type Reached End Bumper - 'true' if the connectivity search has reached an end bumper (the end of the search track) before reaching a Node Object. 'false' otherwise. Node State - if the Node Object can have multiple states, for example, a turnout, this gives the state it was when finding this track node.
Actually you could think of an End Bumper as a 'Node', but End Bumpers are treated differently here. When an End Bumper is reached during a connectivity search, Track Segment is returned, Reached End Bumper is set true, and Node Object and Node Type, are not returned.
| Constructor Summary | |
|---|---|
TrackNode(Object node,
int nodeType,
TrackSegment segment,
boolean endBumper,
int nodeState)
|
|
| Method Summary | |
|---|---|
Object |
getNode()
|
Block |
getNodeBlock()
Returns the Block of the node Object at the nodeType position |
int |
getNodeState()
|
int |
getNodeType()
|
TrackSegment |
getTrackSegment()
|
boolean |
reachedEndOfTrack()
|
void |
setNode(Object node)
Access methods |
void |
setNodeType(int type)
|
void |
setReachedEndBumper(boolean end)
|
void |
setTrackSegment(TrackSegment s)
|
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public TrackNode(Object node,
int nodeType,
TrackSegment segment,
boolean endBumper,
int nodeState)
| Method Detail |
|---|
public void setNode(Object node)
public Object getNode()
public void setNodeType(int type)
public int getNodeType()
public void setTrackSegment(TrackSegment s)
public TrackSegment getTrackSegment()
public void setReachedEndBumper(boolean end)
public boolean reachedEndOfTrack()
public int getNodeState()
public Block getNodeBlock()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||