|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectjmri.jmrit.operations.locations.Track
public class Track
Represents a location (track) on the layout Can be a spur, yard, staging, or interchange track.
| Constructor Summary | |
|---|---|
Track(Element e,
Location location)
|
|
Track(String id,
String name,
String type,
Location location)
|
|
| Method Summary | |
|---|---|
String |
accepts(RollingStock rs)
|
boolean |
acceptsDropRoute(Route route)
|
boolean |
acceptsDropTrain(Train train)
Determine if train can set out cars to this track. |
boolean |
acceptsLoadName(String load)
Determine if track will service a specific load name. |
boolean |
acceptsPickupRoute(Route route)
|
boolean |
acceptsPickupTrain(Train train)
Determine if train can pick up cars from this track. |
boolean |
acceptsRoadName(String road)
|
boolean |
acceptsTypeName(String type)
|
void |
addDropId(String id)
|
void |
addDropRS(RollingStock rs)
|
boolean |
addLoadName(String load)
Add a load that the track will either service or exclude. |
void |
addPickupId(String id)
Add train or route id to this track. |
void |
addPickupRS(RollingStock rs)
Increments the number of cars and or engines that will be picked up by a train from this track. |
void |
addPropertyChangeListener(PropertyChangeListener l)
|
void |
addReservedInRoute(Car car)
|
void |
addRoadName(String road)
|
void |
addRS(RollingStock rs)
Adds rolling stock to a specific track. |
void |
addTypeName(String type)
|
void |
bumpSchedule()
|
String |
checkScheduleValid()
Check to see if schedule is valid for the track at this location. |
boolean |
containsDropId(String id)
|
boolean |
containsPickupId(String id)
|
boolean |
containsRoadName(String road)
|
void |
deleteDropId(String id)
|
void |
deleteDropRS(RollingStock rs)
|
boolean |
deleteLoadName(String load)
Delete a load name that the track will either service or exclude. |
void |
deletePickupId(String id)
|
void |
deletePickupRS(RollingStock rs)
|
void |
deleteReservedInRoute(Car car)
|
void |
deleteRoadName(String road)
|
void |
deleteRS(RollingStock rs)
|
void |
deleteTypeName(String type)
|
void |
dispose()
|
void |
enableAddLoads(boolean enable)
When enabled, add Scheduled car loads if there's a demand. |
void |
enableAddLoadsAnySiding(boolean enable)
When enabled, add Scheduled car loads if there's a demand. |
void |
enableLoadSwaps(boolean enable)
Enable changing the car generic load state when car arrives at this track. |
void |
enableRemoveLoads(boolean enable)
When enabled, remove Scheduled car loads. |
void |
enableSetLoadEmpty(boolean enable)
Enable setting the car generic load state to empty when car arrives at this track. |
protected void |
firePropertyChange(String p,
Object old,
Object n)
|
Track |
getAlternativeTrack()
|
String |
getComment()
|
ScheduleItem |
getCurrentScheduleItem()
Get's the current schedule item for this track Protects against user deleting an item in a shared schedule. |
String[] |
getDropIds()
|
String |
getDropOption()
|
int |
getDropRS()
|
String |
getId()
|
int |
getLength()
|
String[] |
getLoadNames()
Provides a list of loads that the track will either service or exclude. |
String |
getLoadOption()
Gets the car load option for this track. |
Location |
getLocation()
|
String |
getLocType()
|
int |
getMinimumLength()
|
int |
getMoves()
|
String |
getName()
|
ScheduleItem |
getNextScheduleItem()
|
int |
getNumberCars()
|
int |
getNumberEngines()
|
int |
getNumberOfCarsInRoute()
|
int |
getNumberRS()
|
String[] |
getPickupIds()
|
String |
getPickupOption()
|
int |
getPickupRS()
|
Pool |
getPool()
|
String |
getPoolName()
|
int |
getReservationFactor()
|
int |
getReserved()
|
int |
getReservedInRoute()
Used to determine how much track space is going to be consumed by cars in route to this track. |
String[] |
getRoadNames()
|
String |
getRoadOption()
|
Schedule |
getSchedule()
|
int |
getScheduleCount()
|
String |
getScheduleId()
|
String |
getScheduleItemId()
Recommend getCurrentScheduleItem() to get the current schedule item for this track. |
int |
getScheduleMode()
Gets the mode of operation for the schedule assigned to this track. |
String |
getScheduleName()
Returns the name of the schedule. |
String |
getServiceOrder()
Get the service order for this track. |
int |
getTrainDirections()
|
String[] |
getTypeNames()
|
int |
getUsedLength()
|
boolean |
isAddLoadsEnabled()
|
boolean |
isAddLoadsEnabledAnySiding()
|
boolean |
isLoadSwapEnabled()
|
boolean |
isRemoveLoadsEnabled()
|
boolean |
isSetLoadEmptyEnabled()
|
boolean |
isSpaceAvailable(Car car)
Used to determine if there's space available at this track for the car. |
void |
removePropertyChangeListener(PropertyChangeListener l)
|
void |
setAlternativeTrack(Track track)
|
void |
setComment(String comment)
|
void |
setDropOption(String option)
Set the car drop option for this track. |
void |
setLength(int length)
|
void |
setLoadOption(String option)
Set how this track deals with car loads |
void |
setLocType(String type)
|
void |
setMinimumLength(int length)
|
void |
setMoves(int moves)
|
void |
setName(String name)
|
void |
setPickupOption(String option)
Set the car pick up option for this track. |
void |
setPool(Pool pool)
|
void |
setReservationFactor(int factor)
Set the reservation factor. |
void |
setReserved(int reserved)
|
void |
setRoadOption(String option)
Set the road option for this track. |
void |
setScheduleCount(int count)
|
void |
setScheduleId(String id)
|
void |
setScheduleItemId(String id)
|
void |
setScheduleMode(int mode)
Sets the mode of operation for the schedule assigned to this track. |
void |
setServiceOrder(String order)
|
void |
setTrainDirections(int direction)
Sets the train directions that can service this track |
void |
setUsedLength(int length)
|
Element |
store()
Create an XML element to represent this Entry. |
String |
toString()
|
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Field Detail |
|---|
protected String _id
protected String _name
protected String _locType
protected Location _location
protected String _alternativeTrackId
protected String _roadOption
protected int _trainDir
protected int _numberRS
protected int _numberCars
protected int _numberEngines
protected int _pickupRS
protected int _dropRS
protected int _length
protected int _reserved
protected int _numberCarsInRoute
protected int _usedLength
protected int _moves
protected String _comment
protected String _loadOption
protected String _scheduleName
protected String _scheduleId
protected String _scheduleItemId
protected int _scheduleCount
protected int _reservedInRoute
protected int _reservationFactor
protected int _mode
protected String _dropOption
protected String _pickupOption
public static final String ANY
public static final String TRAINS
public static final String ROUTES
protected int _loadOptions
protected String _order
public static final String NORMAL
public static final String FIFO
public static final String LIFO
public static final String STAGING
public static final String INTERCHANGE
public static final String YARD
public static final String SIDING
public static final int EAST
public static final int WEST
public static final int NORTH
public static final int SOUTH
public static final String ALLROADS
public static final String INCLUDEROADS
public static final String EXCLUDEROADS
public static final String ALLLOADS
public static final String INCLUDELOADS
public static final String EXCLUDELOADS
public static final int SEQUENTIAL
public static final int MATCH
protected Pool _pool
protected int _minimumLength
public static final String OKAY
public static final String LENGTH
public static final String TYPE
public static final String ROAD
public static final String LOAD
public static final String TYPES_CHANGED_PROPERTY
public static final String ROADS_CHANGED_PROPERTY
public static final String NAME_CHANGED_PROPERTY
public static final String LENGTH_CHANGED_PROPERTY
public static final String MIN_LENGTH_CHANGED_PROPERTY
public static final String SCHEDULE_CHANGED_PROPERTY
public static final String DISPOSE_CHANGED_PROPERTY
public static final String TRAINDIRECTION_CHANGED_PROPERTY
public static final String DROP_CHANGED_PROPERTY
public static final String PICKUP_CHANGED_PROPERTY
public static final String TRACK_TYPE_CHANGED_PROPERTY
public static final String LOADS_CHANGED_PROPERTY
public static final String POOL_CHANGED_PROPERTY
| Constructor Detail |
|---|
public Track(String id,
String name,
String type,
Location location)
public Track(Element e,
Location location)
| Method Detail |
|---|
public String toString()
toString in class Objectpublic String getId()
public Location getLocation()
public void setName(String name)
public String getName()
public String getLocType()
public void setLocType(String type)
public void setLength(int length)
public int getLength()
public void setMinimumLength(int length)
public int getMinimumLength()
public void setReserved(int reserved)
public int getReserved()
public void addReservedInRoute(Car car)
public void deleteReservedInRoute(Car car)
public int getReservedInRoute()
public int getNumberOfCarsInRoute()
public void setReservationFactor(int factor)
factor - A number from 0 to 10000.public int getReservationFactor()
public void setScheduleMode(int mode)
mode - Track.SEQUENTIAL or Track.MATCHpublic int getScheduleMode()
public void setAlternativeTrack(Track track)
public Track getAlternativeTrack()
public boolean isSpaceAvailable(Car car)
car - The car to be set out.
public void setUsedLength(int length)
public int getUsedLength()
public int getNumberRS()
public int getNumberCars()
public int getNumberEngines()
public void addRS(RollingStock rs)
rs - public void deleteRS(RollingStock rs)
public void addPickupRS(RollingStock rs)
public void deletePickupRS(RollingStock rs)
public int getPickupRS()
public int getDropRS()
public void addDropRS(RollingStock rs)
public void deleteDropRS(RollingStock rs)
public void setComment(String comment)
public String getComment()
public String[] getTypeNames()
public void addTypeName(String type)
public void deleteTypeName(String type)
public boolean acceptsTypeName(String type)
public String getRoadOption()
public void setRoadOption(String option)
option - ALLROADS, INCLUDEROADS, or EXCLUDEROADSpublic void setTrainDirections(int direction)
direction - EAST, WEST, NORTH, SOUTHpublic int getTrainDirections()
public String[] getRoadNames()
public void addRoadName(String road)
public void deleteRoadName(String road)
public boolean acceptsRoadName(String road)
public boolean containsRoadName(String road)
public String getLoadOption()
public void setLoadOption(String option)
option - ALLLOADS INCLUDELOADS EXCLUDELOADSpublic String[] getLoadNames()
public boolean addLoadName(String load)
public boolean deleteLoadName(String load)
public boolean acceptsLoadName(String load)
load - the load name to check.
public String getDropOption()
public void setDropOption(String option)
option - ANY, TRAINS, or ROUTESpublic String getPickupOption()
public void setPickupOption(String option)
option - ANY, TRAINS, or ROUTESpublic String[] getDropIds()
public void addDropId(String id)
public void deleteDropId(String id)
public boolean acceptsDropTrain(Train train)
train -
public boolean acceptsDropRoute(Route route)
public boolean containsDropId(String id)
public String[] getPickupIds()
public void addPickupId(String id)
id - public void deletePickupId(String id)
public boolean acceptsPickupTrain(Train train)
train -
public boolean acceptsPickupRoute(Route route)
public boolean containsPickupId(String id)
public String accepts(RollingStock rs)
public int getMoves()
public void setMoves(int moves)
public String getServiceOrder()
public void setServiceOrder(String order)
public String getScheduleName()
public Schedule getSchedule()
public String getScheduleId()
public void setScheduleId(String id)
public String getScheduleItemId()
public void setScheduleItemId(String id)
public ScheduleItem getCurrentScheduleItem()
public void bumpSchedule()
public ScheduleItem getNextScheduleItem()
public int getScheduleCount()
public void setScheduleCount(int count)
public String checkScheduleValid()
public void enableLoadSwaps(boolean enable)
enable - when true, swap generic car load statepublic boolean isLoadSwapEnabled()
public void enableSetLoadEmpty(boolean enable)
enable - when true, set generic car load to emptypublic boolean isSetLoadEmptyEnabled()
public void enableRemoveLoads(boolean enable)
enable - when true, remove Scheduled loads from carspublic boolean isRemoveLoadsEnabled()
public void enableAddLoads(boolean enable)
enable - when true, add Scheduled loads from carspublic boolean isAddLoadsEnabled()
public void enableAddLoadsAnySiding(boolean enable)
enable - when true, add Scheduled loads from carspublic boolean isAddLoadsEnabledAnySiding()
public void setPool(Pool pool)
public Pool getPool()
public String getPoolName()
public void dispose()
public Element store()
public void addPropertyChangeListener(PropertyChangeListener l)
public void removePropertyChangeListener(PropertyChangeListener l)
protected void firePropertyChange(String p,
Object old,
Object n)
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||