Package jmri.web.servlet.operations
Class HtmlTrainCommon
- java.lang.Object
-
- jmri.jmrit.operations.trains.TrainCommon
-
- jmri.web.servlet.operations.HtmlTrainCommon
-
- Direct Known Subclasses:
HtmlConductor
,HtmlManifest
public class HtmlTrainCommon extends TrainCommon
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description protected static class
HtmlTrainCommon.ShowLocation
-
Field Summary
Fields Modifier and Type Field Description protected java.util.Locale
locale
protected java.lang.String
resourcePrefix
protected java.util.Properties
strings
protected Train
train
-
Fields inherited from class jmri.jmrit.operations.trains.TrainCommon
_dropCars, _pickupCars, BLANK_LINE, BUILD_REPORT_CHAR, ENGINE, HORIZONTAL_LINE_CHAR, HYPHEN, IS_MANIFEST, IS_TWO_COLUMN_TRACK, LOCAL, NEW_LINE, PAPER_MARGINS, PICKUP, SPACE, TAB, TEXT_COLOR_DONE, TEXT_COLOR_END, TEXT_COLOR_START, VERTICAL_LINE_CHAR
-
-
Constructor Summary
Constructors Constructor Description HtmlTrainCommon(java.util.Locale locale, Train train)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static java.lang.String
convertToHTMLColor(java.lang.String text)
protected java.lang.String
dropCar(Car car, int count, java.lang.String[] format, boolean isLocal)
protected java.lang.String
dropCar(Car car, java.lang.String[] format, boolean isLocal)
java.lang.String
dropEngine(Engine engine)
Returns the drop string for a loco.protected java.lang.String
dropEngines(java.util.List<Engine> engines, RouteLocation location)
protected java.lang.String
engineChange(RouteLocation rl, int legOptions)
protected java.lang.String
getCarAttribute(Car car, java.lang.String attribute, boolean isPickup, boolean isLocal)
protected java.lang.String
getEngineAttribute(Engine engine, java.lang.String attribute, boolean isPickup)
protected java.lang.String
getRollingStockAttribute(RollingStock rs, java.lang.String attribute, boolean isPickup, boolean isLocal)
protected java.lang.String
getTrackComments(RouteLocation location, java.util.List<Car> cars)
java.lang.String
getValidity()
protected java.lang.String
pickUpCar(Car car, int count, java.lang.String[] format)
protected java.lang.String
pickUpCar(Car car, java.lang.String[] format)
java.lang.String
pickupEngine(Engine engine)
Returns the pick up string for a loco.protected java.lang.String
pickupEngines(java.util.List<Engine> engines, RouteLocation location)
java.lang.String
pickupUtilityCars(java.util.List<Car> cars, Car car, boolean isManifest)
protected java.lang.String
setoutUtilityCars(java.util.List<Car> cars, Car car, boolean isManifest)
-
Methods inherited from class jmri.jmrit.operations.trains.TrainCommon
addCarsLocationUnknown, addLine, addLine, blockCarsByTrack, blockCarsByTrackNameTwoColumn, blockCarsTwoColumn, blockLocosTwoColumn, clearUtilityCarTypes, convertStringToDate, countPickupUtilityCars, countSetoutUtilityCars, countUtilityCars, createTabIfNeeded, dropCar, dropCar, dropEngines, formatColorString, formatStringToCommaSeparated, getDate, getDate, getDropCarHeader, getDropEngineHeader, getISO8601Date, getLineLength, getLocalMoveHeader, getManifestHeaderLineLength, getPageSize, getPickupCarHeader, getPickupEngineHeader, getTextColor, getTextColorName, getTextColorString, isNextCar, isNextCar, isThereWorkAtLocation, isThereWorkAtLocation, localMoveCar, newLine, newLine, padAndTruncate, padAndTruncateIfNeeded, padString, pickupCar, pickUpCar, pickUpCarTruncated, pickupEngines, pickupUtilityCars, pickupUtilityCars, printCarHeader, printDropCarHeader, printDropEngineHeader, printEngineHeader, printHorizontalLine, printHorizontalLine, printLocalCarMoveHeader, printPickupCarHeader, printPickupEngineHeader, printTrackComments, printTrackNameHeader, setoutUtilityCars, setoutUtilityCars, setoutUtilityCars, splitString, tabString, truncatedDropCar
-
-
-
-
Field Detail
-
strings
protected final java.util.Properties strings
-
locale
protected final java.util.Locale locale
-
resourcePrefix
protected java.lang.String resourcePrefix
-
-
Constructor Detail
-
HtmlTrainCommon
public HtmlTrainCommon(java.util.Locale locale, Train train) throws java.io.IOException
- Throws:
java.io.IOException
-
-
Method Detail
-
pickupUtilityCars
public java.lang.String pickupUtilityCars(java.util.List<Car> cars, Car car, boolean isManifest)
-
setoutUtilityCars
protected java.lang.String setoutUtilityCars(java.util.List<Car> cars, Car car, boolean isManifest)
-
dropCar
protected java.lang.String dropCar(Car car, int count, java.lang.String[] format, boolean isLocal)
-
engineChange
protected java.lang.String engineChange(RouteLocation rl, int legOptions)
-
dropEngines
protected java.lang.String dropEngines(java.util.List<Engine> engines, RouteLocation location)
-
dropEngine
public java.lang.String dropEngine(Engine engine)
Description copied from class:TrainCommon
Returns the drop string for a loco. Useful for frames like the train conductor and yardmaster.- Overrides:
dropEngine
in classTrainCommon
- Parameters:
engine
- The Engine.- Returns:
- engine drop string
-
pickupEngines
protected java.lang.String pickupEngines(java.util.List<Engine> engines, RouteLocation location)
-
pickupEngine
public java.lang.String pickupEngine(Engine engine)
Description copied from class:TrainCommon
Returns the pick up string for a loco. Useful for frames like the train conductor and yardmaster.- Overrides:
pickupEngine
in classTrainCommon
- Parameters:
engine
- The Engine.- Returns:
- engine pick up string
-
getCarAttribute
protected java.lang.String getCarAttribute(Car car, java.lang.String attribute, boolean isPickup, boolean isLocal)
-
getEngineAttribute
protected java.lang.String getEngineAttribute(Engine engine, java.lang.String attribute, boolean isPickup)
-
getRollingStockAttribute
protected java.lang.String getRollingStockAttribute(RollingStock rs, java.lang.String attribute, boolean isPickup, boolean isLocal)
-
getTrackComments
protected java.lang.String getTrackComments(RouteLocation location, java.util.List<Car> cars)
-
getValidity
public java.lang.String getValidity()
-
convertToHTMLColor
public static java.lang.String convertToHTMLColor(java.lang.String text)
- Parameters:
text
- Text with color tags needing conversion. See TrainCommon.formatColorString(String text, Color color) Also converts line feeds to HTLM- Returns:
- HTML text with style color option
-
-