slight improvement in car and loco manager

This commit is contained in:
Stephan Richter
2020-11-14 14:54:34 +01:00
parent a9e7512e3d
commit f8ebe97cce
4 changed files with 10 additions and 4 deletions

View File

@@ -41,7 +41,7 @@ public class Car extends BaseClass {
private int id;
private String name;
public int length;
private String stockId = "";
protected String stockId = "";
private Train train;
protected Plan plan;
@@ -84,7 +84,9 @@ public class Car extends BaseClass {
Tag list = new Tag("ul");
for (Car car : cars.values()) {
if (!(car instanceof Locomotive)) {
car.link("li").addTo(list);
Tag tag = car.link("li");
if (isSet(car.stockId) && !car.stockId.isEmpty()) tag.content(NBSP+t("(id: {}, length: {})",car.stockId,car.length));
tag.addTo(list);
}
}
list.addTo(win);