Package jmri.jmrit.operations.routes
Class RouteLocation
java.lang.Object
jmri.beans.PropertyChangeSupport
jmri.jmrit.operations.routes.RouteLocation
- All Implemented Interfaces:
PropertyChangeListener,EventListener,PropertyChangeFirer,PropertyChangeProvider
Represents a location in a route, a location can appear more than once in a
route.
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected intprotected intprotected Stringprotected Colorprotected Stringprotected booleanprotected doubleprotected Stringprotected booleanprotected Locationprotected Stringprotected intprotected intprotected booleanprotected Stringprotected intprotected intprotected intprotected intprotected intprotected intprotected intstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final intstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final intstatic final Stringstatic final Stringstatic final intstatic final Stringstatic final Stringstatic final intstatic final StringFields inherited from class jmri.beans.PropertyChangeSupport
propertyChangeSupport -
Constructor Summary
ConstructorsConstructorDescriptionRouteLocation(String id, Location location) RouteLocation(org.jdom2.Element e) Construct this Entry from XML. -
Method Summary
Modifier and TypeMethodDescriptionvoiddispose()intintdoublegetGrade()getId()intGet the maximum number of moves for this locationintgetName()intintGets the binary representation of the train's direction at this locationGets the String representation of the train's direction at this locationintGets the X range for detecting the manual movement of a train icon.intGets the Y range for detecting the manual movement of a train icon.intintintintintgetWait()booleanbooleanbooleanvoidvoidsetBlockingOrder(int order) voidsetCarMoves(int moves) Set the number of moves completed when building a trainvoidsetComment(String comment) voidsetCommentColor(Color color) Sets the text color for the route commentvoidsetCommentTextColor(String color) voidsetDepartureTime(String time) Sets the formated departure time from this locationvoidsetDepartureTime(String hour, String minute) protected voidsetDirtyAndFirePropertyChange(String p, Object old, Object n) voidsetDropAllowed(boolean drops) When true allow car drops at this locationvoidsetGrade(double grade) voidsetLocalMovesAllowed(boolean local) When true allow local car moves at this locationvoidsetMaxCarMoves(int moves) voidsetMaxTrainLength(int length) voidsetPickUpAllowed(boolean pickups) When true allow car pick ups at this locationvoidsetRandomControl(String value) voidsetSequenceNumber(int sequence) voidsetTrainDirection(int direction) voidSet the train icon panel coordinates to the location defaults.voidsetTrainIconX(int x) voidsetTrainIconY(int y) voidsetTrainLength(int length) Set the train length departing this location when building a trainvoidsetTrainWeight(int weight) Set the train weight departing this location when building a trainvoidsetWait(int time) org.jdom2.Elementstore()Create an XML element to represent this Entry.toString()Methods inherited from class jmri.beans.PropertyChangeSupport
addPropertyChangeListener, addPropertyChangeListener, fireIndexedPropertyChange, fireIndexedPropertyChange, fireIndexedPropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, getPropertyChangeListeners, getPropertyChangeListeners, removePropertyChangeListener, removePropertyChangeListener
-
Field Details
-
NONE
- See Also:
-
_id
-
_location
-
_locationId
-
_trainDir
-
_maxTrainLength
-
_maxCarMoves
-
_randomControl
-
_drops
-
_pickups
-
_localMoves
-
_sequenceNum
-
_grade
-
_wait
-
_departureTime
-
_trainIconX
-
_trainIconY
-
_blockingOrder
-
_comment
-
_commentColor
-
_carMoves
-
_trainWeight
-
_trainLength
-
EAST
- See Also:
-
WEST
- See Also:
-
NORTH
- See Also:
-
SOUTH
- See Also:
-
EAST_DIR
-
WEST_DIR
-
NORTH_DIR
-
SOUTH_DIR
-
DISPOSE
- See Also:
-
DELETED
-
DROP_CHANGED_PROPERTY
- See Also:
-
PICKUP_CHANGED_PROPERTY
- See Also:
-
LOCAL_MOVES_CHANGED_PROPERTY
- See Also:
-
MAX_MOVES_CHANGED_PROPERTY
- See Also:
-
TRAIN_DIRECTION_CHANGED_PROPERTY
- See Also:
-
DEPARTURE_TIME_CHANGED_PROPERTY
- See Also:
-
MAX_LENGTH_CHANGED_PROPERTY
- See Also:
-
DISABLED
- See Also:
-
-
Constructor Details
-
RouteLocation
-
RouteLocation
Construct this Entry from XML. This member has to remain synchronized with the detailed DTD in operations-config.xml- Parameters:
e- Consist XML element
-
-
Method Details
-
toString
-
getId
-
getName
-
getSplitName
-
getLocation
-
getSequenceNumber
-
setSequenceNumber
-
getBlockingOrder
-
setBlockingOrder
-
setComment
-
getComment
-
setCommentColor
Sets the text color for the route comment- Parameters:
color- The color of the text
-
getCommentColor
-
getCommentWithColor
-
setCommentTextColor
-
getCommentTextColor
-
setTrainDirection
-
getTrainDirection
Gets the binary representation of the train's direction at this location- Returns:
- int representing train direction EAST WEST NORTH SOUTH
-
getTrainDirectionString
Gets the String representation of the train's direction at this location- Returns:
- String representing train direction at this location
-
setMaxTrainLength
-
getMaxTrainLength
-
setTrainLength
Set the train length departing this location when building a train- Parameters:
length- The train's current length.
-
getTrainLength
-
setTrainWeight
Set the train weight departing this location when building a train- Parameters:
weight- The train's current weight.
-
getTrainWeight
-
setMaxCarMoves
-
getMaxCarMoves
Get the maximum number of moves for this location- Returns:
- maximum number of moves
-
setRandomControl
-
getRandomControl
-
setDropAllowed
When true allow car drops at this location- Parameters:
drops- when true drops allowed at this location
-
isDropAllowed
-
setPickUpAllowed
When true allow car pick ups at this location- Parameters:
pickups- when true pick ups allowed at this location
-
isPickUpAllowed
-
setLocalMovesAllowed
When true allow local car moves at this location- Parameters:
local- when true local moves allowed at this location
-
isLocalMovesAllowed
-
setCarMoves
Set the number of moves completed when building a train- Parameters:
moves- An integer representing the amount of moves completed.
-
getCarMoves
-
setWait
-
getWait
-
setDepartureTime
Sets the formated departure time from this location- Parameters:
time- format hours:minutes
-
setDepartureTime
-
getDepartureTime
-
getDepartureTimeHour
-
getDepartureTimeMinute
-
getFormatedDepartureTime
-
setGrade
-
getGrade
-
setTrainIconX
-
getTrainIconX
-
setTrainIconY
-
getTrainIconY
-
getTrainIconRangeX
Gets the X range for detecting the manual movement of a train icon.- Returns:
- the range for detection
-
getTrainIconRangeY
Gets the Y range for detecting the manual movement of a train icon.- Returns:
- the range for detection
-
setTrainIconCoordinates
Set the train icon panel coordinates to the location defaults. Coordinates are dependent on the train's departure direction. -
getTrainIconCoordinates
-
dispose
-
store
Create an XML element to represent this Entry. This member has to remain synchronized with the detailed DTD in operations-config.xml.- Returns:
- Contents in a JDOM Element
-
propertyChange
- Specified by:
propertyChangein interfacePropertyChangeListener
-
setDirtyAndFirePropertyChange
-