Class RollingStock
- java.lang.Object
-
- jmri.beans.PropertyChangeSupport
-
- jmri.jmrit.operations.rollingstock.RollingStock
-
- All Implemented Interfaces:
java.beans.PropertyChangeListener,java.util.EventListener,Identifiable,PropertyChangeFirer,PropertyChangeProvider
public abstract class RollingStock extends PropertyChangeSupport implements Identifiable, java.beans.PropertyChangeListener
Represents rolling stock, both powered (locomotives) and not powered (cars) on the layout.
-
-
Field Summary
Fields Modifier and Type Field Description protected int_blockingprotected java.lang.String_builtprotected boolean_cloneprotected int_cloneOrderprotected java.lang.String_colorprotected java.lang.String_commentprotected Location_destinationprotected Division_divisionprotected java.lang.String_idprotected java.util.Date_lastDateprotected java.lang.String_lastLocationIdprotected java.lang.String_lastTrackIdprotected Train_lastTrainprotected java.lang.String_lengthprotected boolean_lengthChangeprotected Location_locationprotected boolean_locationUnknownprotected int_movesprotected java.lang.String_numberprotected boolean_outOfServiceprotected java.lang.String_ownerprotected java.lang.String_pickupTimeprotected java.lang.String_rfidprotected java.lang.String_roadprotected RouteLocation_routeDestinationprotected java.lang.String_routeIdprotected RouteLocation_routeLocationprotected boolean_selectedprotected java.lang.String_setoutTimeprotected IdTag_tagprotected java.beans.PropertyChangeListener_tagListenerprotected Track_trackprotected Track_trackDestinationprotected Train_trainprotected java.lang.String_typeprotected java.lang.String_valueprotected java.lang.String_weightprotected java.lang.String_weightTonsprotected java.util.Date_whenLastSeenprotected Location_whereLastSeenstatic java.lang.StringCOMMENT_CHANGED_PROPERTYstatic intCOUPLERSstatic intDEFAULT_BLOCKING_ORDERprotected static java.lang.StringDEFAULT_WEIGHTstatic java.lang.StringDESTINATION_TRACK_CHANGED_PROPERTYstatic java.lang.StringERROR_TRACKstatic booleanFORCEstatic java.lang.StringLENGTH_CHANGED_PROPERTYstatic java.lang.StringLOCATION_UNKNOWN(package private) LocationManagerlocationManagerstatic intMAX_BLOCKING_ORDERstatic java.lang.StringNONEprotected intnumberstatic java.lang.StringROUTE_DESTINATION_CHANGED_PROPERTYstatic java.lang.StringROUTE_LOCATION_CHANGED_PROPERTYstatic java.lang.StringTRACK_CHANGED_PROPERTYstatic java.lang.StringTRAIN_CHANGED_PROPERTYstatic java.lang.StringTYPE_CHANGED_PROPERTY-
Fields inherited from class jmri.beans.PropertyChangeSupport
propertyChangeSupport
-
-
Constructor Summary
Constructors Constructor Description RollingStock()RollingStock(java.lang.String road, java.lang.String number)RollingStock(org.jdom2.Element e)Construct this Entry from XML.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description java.lang.StringcheckDestination(Location destination, Track track)Used to check destination track to see if it will accept rolling stockstatic java.lang.StringcreateId(java.lang.String road, java.lang.String number)voiddispose()Remove rolling stock.intgetAdjustedWeightTons()intgetBlocking()java.lang.StringgetBuilt()intgetCloneOrder()java.lang.StringgetColor()java.lang.StringgetComment()LocationgetDestination()java.lang.StringgetDestinationId()java.lang.StringgetDestinationName()TrackgetDestinationTrack()java.lang.StringgetDestinationTrackId()java.lang.StringgetDestinationTrackName()DivisiongetDivision()java.lang.StringgetDivisionId()java.lang.StringgetDivisionName()java.lang.StringgetId()Get the identity of the object.IdTaggetIdTag()java.lang.StringgetLastDate()Provides the last date when this rolling stock was movedjava.lang.StringgetLastLocationId()java.lang.StringgetLastLocationName()java.util.DategetLastMoveDate()Provides the last date when this rolling stock was movedjava.lang.StringgetLastRouteId()Used to determine which train delivered a car to an interchange track.java.lang.StringgetLastTrackId()java.lang.StringgetLastTrackName()TraingetLastTrain()java.lang.StringgetLastTrainName()java.lang.StringgetLength()gets the body length of the rolling stockintgetLengthInteger()LocationgetLocation()java.lang.StringgetLocationId()Get rolling stock's location idjava.lang.StringgetLocationName()Get rolling stock's location nameintgetMoves()java.lang.StringgetNumber()java.lang.StringgetOwnerName()java.lang.StringgetPickupTime()java.lang.StringgetRfid()java.lang.StringgetRoadName()RouteLocationgetRouteDestination()java.lang.StringgetRouteDestinationId()RouteLocationgetRouteLocation()Where in a train's route this car residesjava.lang.StringgetRouteLocationId()java.lang.StringgetSetoutTime()java.lang.StringgetSortDate()Provides the last date when this rolling stock was movedjava.lang.StringgetSplitDestinationName()java.lang.StringgetSplitDestinationTrackName()java.lang.StringgetSplitLocationName()java.lang.StringgetSplitTrackName()java.lang.StringgetStatus()intgetTotalLength()Returns the length of the rolling stock including the couplersTrackgetTrack()java.lang.StringgetTrackId()Get rolling stock's track idTrackgetTrackLastSeen()java.lang.StringgetTrackLastSeenName()java.lang.StringgetTrackName()Get rolling stock's track namejava.lang.StringgetTrackType()TraingetTrain()java.lang.StringgetTrainName()java.lang.StringgetTypeName()java.lang.StringgetValue()java.lang.StringgetWeight()java.lang.StringgetWeightTons()java.util.DategetWhenLastSeen()java.lang.StringgetWhenLastSeenDate()Provides the last date when this rolling stock was moved, or was reset from a built train, as a string.LocationgetWhereLastSeen()java.lang.StringgetWhereLastSeenName()booleanisClone()booleanisLocationUnknown()booleanisOutOfService()booleanisSelected()protected voidmoveRollingStock(RouteLocation current, RouteLocation next)voidpropertyChange(java.beans.PropertyChangeEvent e)voidreset()voidsetBlocking(int number)voidsetBuilt(java.lang.String built)Set the date that the rolling stock was built.voidsetClone(boolean clone)voidsetCloneOrder(int number)voidsetColor(java.lang.String color)voidsetComment(java.lang.String comment)voidsetDestination(Location destination)Sets rolling stock destination without reserving destination track space or drop count.java.lang.StringsetDestination(Location destination, Track track)Sets rolling stock destination on the layoutjava.lang.StringsetDestination(Location destination, Track track, boolean force)Sets rolling stock destination on the layoutvoidsetDestinationTrack(Track track)Sets rolling stock destination track without reserving destination track space or drop count.protected voidsetDirtyAndFirePropertyChange(java.lang.String p, java.lang.Object old, java.lang.Object n)voidsetDivision(Division division)voidsetIdTag(IdTag tag)Sets the id tag for this rolling stock.voidsetLastDate(java.lang.String date)Sets the last date when this rolling stock was moved.voidsetLastDate(java.util.Date date)Sets the last date when this rolling stock was movedvoidsetLastLocationId(java.lang.String id)Used to block cars from stagingvoidsetLastRouteId(java.lang.String id)Sets the id of the route that was used to set out the rolling stock.voidsetLastTrackId(java.lang.String id)voidsetLastTrain(Train train)Sets the last train that serviced this rolling stock.voidsetLength(java.lang.String length)Sets the body length of the rolling stock.java.lang.StringsetLocation(Location location, Track track)Sets rolling stock location on the layoutjava.lang.StringsetLocation(Location location, Track track, boolean force)Sets rolling stock location on the layoutvoidsetLocationUnknown(boolean unknown)Set the rolling stock location as unknown.voidsetMoves(int moves)voidsetNumber(java.lang.String number)Set the rolling stock identification or road numbervoidsetOutOfService(boolean outOfService)Sets the rolling stock service state.voidsetOwnerName(java.lang.String owner)voidsetPickupTime(java.lang.String time)voidsetRfid(java.lang.String id)Sets the RFID for this rolling stock.voidsetRoadName(java.lang.String road)voidsetRouteDestination(RouteLocation routeDestination)Set where in a train's route this rolling stock will be set out.voidsetRouteLocation(RouteLocation routeLocation)Sets the location where the rolling stock will be picked up by the train.voidsetSelected(boolean selected)voidsetSetoutTime(java.lang.String time)voidsetTrack(Track track)Set the rolling stock's location and track.voidsetTrain(Train train)Sets the train that will service this rolling stock.voidsetTypeName(java.lang.String type)Sets the type of rolling stock.voidsetValue(java.lang.String value)Sets the value (cost, price) for this rolling stock.voidsetWeight(java.lang.String weight)voidsetWeightTons(java.lang.String weight)Sets the full scale weight in tons.protected org.jdom2.Elementstore(org.jdom2.Element e)Add XML elements to represent this Entry.java.lang.StringtestLocation(Location location, Track track)Used to confirm that a track is associated with a location, and that rolling stock can be placed on track.java.lang.StringtoString()For combobox and identification-
Methods inherited from class jmri.beans.PropertyChangeSupport
addPropertyChangeListener, addPropertyChangeListener, fireIndexedPropertyChange, fireIndexedPropertyChange, fireIndexedPropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, getPropertyChangeListeners, getPropertyChangeListeners, removePropertyChangeListener, removePropertyChangeListener
-
-
-
-
Field Detail
-
NONE
public static final java.lang.String NONE
- See Also:
- Constant Field Values
-
DEFAULT_BLOCKING_ORDER
public static final int DEFAULT_BLOCKING_ORDER
- See Also:
- Constant Field Values
-
MAX_BLOCKING_ORDER
public static final int MAX_BLOCKING_ORDER
- See Also:
- Constant Field Values
-
FORCE
public static final boolean FORCE
- See Also:
- Constant Field Values
-
DEFAULT_WEIGHT
protected static final java.lang.String DEFAULT_WEIGHT
- See Also:
- Constant Field Values
-
_id
protected java.lang.String _id
-
_number
protected java.lang.String _number
-
_road
protected java.lang.String _road
-
_type
protected java.lang.String _type
-
_length
protected java.lang.String _length
-
_color
protected java.lang.String _color
-
_weight
protected java.lang.String _weight
-
_weightTons
protected java.lang.String _weightTons
-
_built
protected java.lang.String _built
-
_owner
protected java.lang.String _owner
-
_comment
protected java.lang.String _comment
-
_routeId
protected java.lang.String _routeId
-
_rfid
protected java.lang.String _rfid
-
_value
protected java.lang.String _value
-
_lastDate
protected java.util.Date _lastDate
-
_locationUnknown
protected boolean _locationUnknown
-
_outOfService
protected boolean _outOfService
-
_selected
protected boolean _selected
-
_destination
protected Location _destination
-
_trackDestination
protected Track _trackDestination
-
_routeLocation
protected RouteLocation _routeLocation
-
_routeDestination
protected RouteLocation _routeDestination
-
_clone
protected boolean _clone
-
_cloneOrder
protected int _cloneOrder
-
_moves
protected int _moves
-
_lastLocationId
protected java.lang.String _lastLocationId
-
_lastTrackId
protected java.lang.String _lastTrackId
-
_lastTrain
protected Train _lastTrain
-
_blocking
protected int _blocking
-
_pickupTime
protected java.lang.String _pickupTime
-
_setoutTime
protected java.lang.String _setoutTime
-
_tagListener
protected java.beans.PropertyChangeListener _tagListener
-
_whereLastSeen
protected Location _whereLastSeen
-
_whenLastSeen
protected java.util.Date _whenLastSeen
-
LOCATION_UNKNOWN
public static final java.lang.String LOCATION_UNKNOWN
- See Also:
- Constant Field Values
-
number
protected int number
-
ERROR_TRACK
public static final java.lang.String ERROR_TRACK
- See Also:
- Constant Field Values
-
TRACK_CHANGED_PROPERTY
public static final java.lang.String TRACK_CHANGED_PROPERTY
- See Also:
- Constant Field Values
-
DESTINATION_TRACK_CHANGED_PROPERTY
public static final java.lang.String DESTINATION_TRACK_CHANGED_PROPERTY
- See Also:
- Constant Field Values
-
TRAIN_CHANGED_PROPERTY
public static final java.lang.String TRAIN_CHANGED_PROPERTY
- See Also:
- Constant Field Values
-
LENGTH_CHANGED_PROPERTY
public static final java.lang.String LENGTH_CHANGED_PROPERTY
- See Also:
- Constant Field Values
-
TYPE_CHANGED_PROPERTY
public static final java.lang.String TYPE_CHANGED_PROPERTY
- See Also:
- Constant Field Values
-
ROUTE_LOCATION_CHANGED_PROPERTY
public static final java.lang.String ROUTE_LOCATION_CHANGED_PROPERTY
- See Also:
- Constant Field Values
-
ROUTE_DESTINATION_CHANGED_PROPERTY
public static final java.lang.String ROUTE_DESTINATION_CHANGED_PROPERTY
- See Also:
- Constant Field Values
-
COMMENT_CHANGED_PROPERTY
public static final java.lang.String COMMENT_CHANGED_PROPERTY
- See Also:
- Constant Field Values
-
COUPLERS
public static final int COUPLERS
-
locationManager
LocationManager locationManager
-
_lengthChange
protected boolean _lengthChange
-
-
Constructor Detail
-
RollingStock
public RollingStock()
-
RollingStock
public RollingStock(java.lang.String road, java.lang.String number)
-
RollingStock
public RollingStock(org.jdom2.Element e)
Construct this Entry from XML.- Parameters:
e- RollingStock XML element
-
-
Method Detail
-
createId
public static java.lang.String createId(java.lang.String road, java.lang.String number)
-
getId
public java.lang.String getId()
Description copied from interface:IdentifiableGet the identity of the object.- Specified by:
getIdin interfaceIdentifiable- Returns:
- the identity
-
setNumber
public void setNumber(java.lang.String number)
Set the rolling stock identification or road number- Parameters:
number- The rolling stock road number.
-
getNumber
public java.lang.String getNumber()
-
setRoadName
public void setRoadName(java.lang.String road)
-
getRoadName
public java.lang.String getRoadName()
-
toString
public java.lang.String toString()
For combobox and identification- Overrides:
toStringin classjava.lang.Object
-
setTypeName
public void setTypeName(java.lang.String type)
Sets the type of rolling stock. "Boxcar" for example is a type of car.- Parameters:
type- The type of rolling stock.
-
getTypeName
public java.lang.String getTypeName()
-
setLength
public void setLength(java.lang.String length)
Sets the body length of the rolling stock. For example, a 40' boxcar would be entered as 40 feet. Coupler length is added by the program when determining if a car could fit on a track.- Parameters:
length- the body length in feet or meters- See Also:
getTotalLength()
-
getLength
public java.lang.String getLength()
gets the body length of the rolling stock- Returns:
- length in feet or meters
- See Also:
getTotalLength()
-
getLengthInteger
public int getLengthInteger()
-
getTotalLength
public int getTotalLength()
Returns the length of the rolling stock including the couplers- Returns:
- total length of the rolling stock in feet or meters
-
setColor
public void setColor(java.lang.String color)
-
getColor
public java.lang.String getColor()
-
setWeight
public void setWeight(java.lang.String weight)
- Parameters:
weight- rolling stock weight in ounces.
-
getWeight
public java.lang.String getWeight()
-
setWeightTons
public void setWeightTons(java.lang.String weight)
Sets the full scale weight in tons.- Parameters:
weight- full scale rolling stock weight in tons.
-
getWeightTons
public java.lang.String getWeightTons()
-
getAdjustedWeightTons
public int getAdjustedWeightTons()
-
setBuilt
public void setBuilt(java.lang.String built)
Set the date that the rolling stock was built. Use 4 digits for the year, or the format MM-YY where MM is the two digit month, and YY is the last two years if the rolling stock was built in the 1900s. Use MM-YYYY for units build after 1999.- Parameters:
built- The string built date.
-
getBuilt
public java.lang.String getBuilt()
-
getStatus
public java.lang.String getStatus()
- Returns:
- location unknown symbol, out of service symbol, or none if car okay
-
getLocation
public Location getLocation()
-
getLocationName
public java.lang.String getLocationName()
Get rolling stock's location name- Returns:
- empty string if rolling stock isn't on layout
-
getSplitLocationName
public java.lang.String getSplitLocationName()
-
getLocationId
public java.lang.String getLocationId()
Get rolling stock's location id- Returns:
- empty string if rolling stock isn't on the layout
-
setTrack
public void setTrack(Track track)
Set the rolling stock's location and track. Doesn't do any checking and does not fire a property change. Used exclusively by the Router code. Use setLocation(Location, Track) instead.- Parameters:
track- to place the rolling stock on.
-
getTrackName
public java.lang.String getTrackName()
Get rolling stock's track name- Returns:
- empty string if rolling stock isn't on a track
-
getSplitTrackName
public java.lang.String getSplitTrackName()
-
getTrackType
public java.lang.String getTrackType()
-
getTrackId
public java.lang.String getTrackId()
Get rolling stock's track id- Returns:
- empty string if rolling stock isn't on a track
-
setLocation
public java.lang.String setLocation(Location location, Track track)
Sets rolling stock location on the layout- Parameters:
location- The Location.track- (yard, spur, staging, or interchange track)- Returns:
- "okay" if successful, "type" if the rolling stock's type isn't acceptable, "road" if rolling stock road isn't acceptable, or "length" if the rolling stock length didn't fit.
-
setLocation
public java.lang.String setLocation(Location location, Track track, boolean force)
Sets rolling stock location on the layout- Parameters:
location- The Location.track- (yard, spur, staging, or interchange track)force- when true place rolling stock ignore track length, type, and road- Returns:
- "okay" if successful, "type" if the rolling stock's type isn't acceptable, "road" if rolling stock road isn't acceptable, or "length" if the rolling stock length didn't fit.
-
testLocation
public java.lang.String testLocation(Location location, Track track)
Used to confirm that a track is associated with a location, and that rolling stock can be placed on track.- Parameters:
location- The locationtrack- The track, can be null- Returns:
- OKAY if track exists at location and rolling stock can be placed on track, ERROR_TRACK if track isn't at location, other if rolling stock can't be placed on track.
-
setDestination
public java.lang.String setDestination(Location destination, Track track)
Sets rolling stock destination on the layout- Parameters:
destination- The Location.track- (yard, spur, staging, or interchange track)- Returns:
- "okay" if successful, "type" if the rolling stock's type isn't acceptable, or "length" if the rolling stock length didn't fit.
-
setDestination
public java.lang.String setDestination(Location destination, Track track, boolean force)
Sets rolling stock destination on the layout- Parameters:
destination- The Location.track- (yard, spur, staging, or interchange track)force- when true ignore track length, type, and road when setting destination- Returns:
- "okay" if successful, "type" if the rolling stock's type isn't acceptable, or "length" if the rolling stock length didn't fit.
-
checkDestination
public java.lang.String checkDestination(Location destination, Track track)
Used to check destination track to see if it will accept rolling stock- Parameters:
destination- The Location.track- The Track at destination.- Returns:
- status OKAY, TYPE, ROAD, LENGTH, ERROR_TRACK
-
getDestination
public Location getDestination()
-
setDestination
public void setDestination(Location destination)
Sets rolling stock destination without reserving destination track space or drop count. Does not fire a property change. Used by car router to test destinations. Use setDestination(Location, Track) instead.- Parameters:
destination- for the rolling stock
-
getDestinationName
public java.lang.String getDestinationName()
-
getSplitDestinationName
public java.lang.String getSplitDestinationName()
-
getDestinationId
public java.lang.String getDestinationId()
-
setDestinationTrack
public void setDestinationTrack(Track track)
Sets rolling stock destination track without reserving destination track space or drop count. Used by car router to test destinations. Does not fire a property change. Use setDestination(Location, Track) instead.- Parameters:
track- The Track for set out at destination.
-
getDestinationTrack
public Track getDestinationTrack()
-
getDestinationTrackName
public java.lang.String getDestinationTrackName()
-
getSplitDestinationTrackName
public java.lang.String getSplitDestinationTrackName()
-
getDestinationTrackId
public java.lang.String getDestinationTrackId()
-
setClone
public void setClone(boolean clone)
-
isClone
public boolean isClone()
-
setCloneOrder
public void setCloneOrder(int number)
-
getCloneOrder
public int getCloneOrder()
-
setDivision
public void setDivision(Division division)
-
getDivision
public Division getDivision()
-
getDivisionName
public java.lang.String getDivisionName()
-
getDivisionId
public java.lang.String getDivisionId()
-
setLastLocationId
public void setLastLocationId(java.lang.String id)
Used to block cars from staging- Parameters:
id- The location id from where the car came from before going into staging.
-
getLastLocationId
public java.lang.String getLastLocationId()
-
getLastLocationName
public java.lang.String getLastLocationName()
-
setLastTrackId
public void setLastTrackId(java.lang.String id)
-
getLastTrackId
public java.lang.String getLastTrackId()
-
getLastTrackName
public java.lang.String getLastTrackName()
-
setMoves
public void setMoves(int moves)
-
getMoves
public int getMoves()
-
setTrain
public void setTrain(Train train)
Sets the train that will service this rolling stock.- Parameters:
train- The Train.
-
getTrainName
public java.lang.String getTrainName()
-
setLastTrain
public void setLastTrain(Train train)
Sets the last train that serviced this rolling stock.- Parameters:
train- The last Train.
-
getLastTrain
public Train getLastTrain()
-
getLastTrainName
public java.lang.String getLastTrainName()
-
setRouteLocation
public void setRouteLocation(RouteLocation routeLocation)
Sets the location where the rolling stock will be picked up by the train.- Parameters:
routeLocation- the pick up location for this rolling stock.
-
getRouteLocation
public RouteLocation getRouteLocation()
Where in a train's route this car resides- Returns:
- the location in a train's route
-
getRouteLocationId
public java.lang.String getRouteLocationId()
-
getLastRouteId
public java.lang.String getLastRouteId()
Used to determine which train delivered a car to an interchange track.- Returns:
- the route id of the last train delivering this car.
-
setLastRouteId
public void setLastRouteId(java.lang.String id)
Sets the id of the route that was used to set out the rolling stock. Used to determine if the rolling stock can be pick ups from an interchange track.- Parameters:
id- The route id.
-
getValue
public java.lang.String getValue()
-
setValue
public void setValue(java.lang.String value)
Sets the value (cost, price) for this rolling stock. Currently has nothing to do with operations. But nice to have.- Parameters:
value- a string representing what this item is worth.
-
getRfid
public java.lang.String getRfid()
-
setRfid
public void setRfid(java.lang.String id)
Sets the RFID for this rolling stock.- Parameters:
id- 12 character RFID string.
-
setIdTag
public void setIdTag(IdTag tag)
Sets the id tag for this rolling stock. The id tag isn't saved, between session but the tag label is saved as _rfid.- Parameters:
tag- the id tag
-
getWhereLastSeenName
public java.lang.String getWhereLastSeenName()
-
getWhereLastSeen
public Location getWhereLastSeen()
-
getTrackLastSeen
public Track getTrackLastSeen()
-
getTrackLastSeenName
public java.lang.String getTrackLastSeenName()
-
getWhenLastSeen
public java.util.Date getWhenLastSeen()
-
getWhenLastSeenDate
public java.lang.String getWhenLastSeenDate()
Provides the last date when this rolling stock was moved, or was reset from a built train, as a string.- Returns:
- date
-
getSortDate
public java.lang.String getSortDate()
Provides the last date when this rolling stock was moved- Returns:
- String yyyy/MM/dd HH:mm:ss
-
getLastDate
public java.lang.String getLastDate()
Provides the last date when this rolling stock was moved- Returns:
- String MM/dd/yyyy HH:mm:ss
-
setLastDate
public void setLastDate(java.util.Date date)
Sets the last date when this rolling stock was moved- Parameters:
date- The Date when this rolling stock was last moved.
-
getLastMoveDate
public java.util.Date getLastMoveDate()
Provides the last date when this rolling stock was moved- Returns:
- date
-
setLastDate
public void setLastDate(java.lang.String date)
Sets the last date when this rolling stock was moved. This method is used only for loading data from a file. Use setLastDate(Date) instead.- Parameters:
date- yyyy/MM/dd HH:mm:ss, MM/dd/yyyy HH:mm:ss, MM/dd/yyyy hh:mmaa, or MM/dd/yyyy HH:mm
-
setBlocking
public void setBlocking(int number)
-
getBlocking
public int getBlocking()
-
setRouteDestination
public void setRouteDestination(RouteLocation routeDestination)
Set where in a train's route this rolling stock will be set out.- Parameters:
routeDestination- the location where the rolling stock is to leave the train.
-
getRouteDestination
public RouteLocation getRouteDestination()
-
getRouteDestinationId
public java.lang.String getRouteDestinationId()
-
setOwnerName
public void setOwnerName(java.lang.String owner)
-
getOwnerName
public java.lang.String getOwnerName()
-
setLocationUnknown
public void setLocationUnknown(boolean unknown)
Set the rolling stock location as unknown.- Parameters:
unknown- when true, the rolling stock location is unknown.
-
isLocationUnknown
public boolean isLocationUnknown()
- Returns:
- true when car's location is unknown
-
setOutOfService
public void setOutOfService(boolean outOfService)
Sets the rolling stock service state. When true, rolling stock is out of service. Normal state is false, the rolling stock is in service and available.- Parameters:
outOfService- when true, out of service
-
isOutOfService
public boolean isOutOfService()
- Returns:
- true when rolling stock is out of service
-
setSelected
public void setSelected(boolean selected)
-
isSelected
public boolean isSelected()
- Returns:
- true when rolling stock is selected
-
setComment
public void setComment(java.lang.String comment)
-
getComment
public java.lang.String getComment()
-
setPickupTime
public void setPickupTime(java.lang.String time)
-
getPickupTime
public java.lang.String getPickupTime()
-
setSetoutTime
public void setSetoutTime(java.lang.String time)
-
getSetoutTime
public java.lang.String getSetoutTime()
-
moveRollingStock
protected void moveRollingStock(RouteLocation current, RouteLocation next)
-
reset
public void reset()
-
dispose
public void dispose()
Remove rolling stock. Releases all listeners.
-
store
protected org.jdom2.Element store(org.jdom2.Element e)
Add XML elements to represent this Entry.- Parameters:
e- Element for car or engine store.- Returns:
- Contents in a JDOM Element
-
propertyChange
public void propertyChange(java.beans.PropertyChangeEvent e)
- Specified by:
propertyChangein interfacejava.beans.PropertyChangeListener
-
setDirtyAndFirePropertyChange
protected void setDirtyAndFirePropertyChange(java.lang.String p, java.lang.Object old, java.lang.Object n)
-
-