|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectjmri.jmrit.operations.rollingstock.RollingStock
jmri.jmrit.operations.rollingstock.engines.Engine
public class Engine
Represents an engine on the layout
| Field Summary |
|---|
| Fields inherited from class jmri.jmrit.operations.rollingstock.RollingStock |
|---|
_built, _color, _comment, _destination, _id, _length, _location, _locationUnknown, _moves, _number, _outOfService, _owner, _rfid, _road, _routeDestination, _routeId, _routeLocation, _trackDestination, _trackLocation, _train, _type, _value, _weight, _weightTons, COUPLER, DEFAULT_WEIGHT, DESTINATION_CHANGED_PROPERTY, DESTINATIONTRACK_CHANGED_PROPERTY, ERROR_TRACK, LENGTH_CHANGED_PROPERTY, LOCATION_CHANGED_PROPERTY, number, rb, TRACK_CHANGED_PROPERTY, TRAIN_CHANGED_PROPERTY, TYPE_CHANGED_PROPERTY |
| Constructor Summary | |
|---|---|
Engine(Element e)
Construct this Entry from XML. |
|
Engine(String road,
String number)
|
|
| Method Summary | |
|---|---|
void |
dispose()
Remove rolling stock. |
Consist |
getConsist()
Get the consist for this engine |
String |
getConsistName()
|
String |
getHp()
|
String |
getLength()
|
String |
getModel()
|
String |
getType()
|
String |
getWeightTons()
|
void |
moveRollingStock(RouteLocation old,
RouteLocation next)
|
void |
propertyChange(PropertyChangeEvent e)
|
void |
setConsist(Consist consist)
Place engine in a consist |
void |
setHp(String hp)
Set the engine horsepower rating for this engine's model |
void |
setLength(String length)
Set the engine length for this engine's model |
void |
setModel(String model)
Set the engine's model. |
void |
setType(String type)
Set the engine type for this engine's model |
void |
setWeightTons(String weight)
Set the engine weight for this engine's model |
Element |
store()
Create an XML element to represent this Entry. |
String |
testDestination(Location destination,
Track track)
Used to check destination track to see if it will accept engine |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
|---|
public Engine(String road,
String number)
public Engine(Element e)
e - Engine XML element| Method Detail |
|---|
public void setModel(String model)
model - public String getModel()
public void setType(String type)
setType in class RollingStocktype - Engine type: Steam, Diesel, Gas Turbine, etc.public String getType()
getType in class RollingStockpublic void setHp(String hp)
hp - engine horsepowerpublic String getHp()
public void setLength(String length)
setLength in class RollingStocklength - engine lengthpublic String getLength()
getLength in class RollingStockpublic void setWeightTons(String weight)
setWeightTons in class RollingStockweight - engine weightpublic String getWeightTons()
getWeightTons in class RollingStockpublic void setConsist(Consist consist)
consist - public Consist getConsist()
public String getConsistName()
public String testDestination(Location destination,
Track track)
testDestination in class RollingStock
public void moveRollingStock(RouteLocation old,
RouteLocation next)
moveRollingStock in class RollingStockpublic void dispose()
RollingStock
dispose in class RollingStockpublic Element store()
public void propertyChange(PropertyChangeEvent e)
propertyChange in interface PropertyChangeListenerpropertyChange in class RollingStock
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||