print distance to the station in route and offer
This commit is contained in:
@@ -59,7 +59,6 @@ public class RouteNode {
|
|||||||
Text t = new Text(DistanceCell.distanceToString(p.getDistance()));
|
Text t = new Text(DistanceCell.distanceToString(p.getDistance()));
|
||||||
t.getStyleClass().add(CSS_TRACK_TEXT);
|
t.getStyleClass().add(CSS_TRACK_TEXT);
|
||||||
|
|
||||||
|
|
||||||
track.getChildren().addAll(t, Glyph.create("FontAwesome|LONG_ARROW_RIGHT"));
|
track.getChildren().addAll(t, Glyph.create("FontAwesome|LONG_ARROW_RIGHT"));
|
||||||
|
|
||||||
node.getChildren().addAll(track);
|
node.getChildren().addAll(track);
|
||||||
@@ -98,7 +97,9 @@ public class RouteNode {
|
|||||||
if (!vendor.getName().isEmpty()) {
|
if (!vendor.getName().isEmpty()) {
|
||||||
Text stationText = new Text(vendor.getName());
|
Text stationText = new Text(vendor.getName());
|
||||||
stationText.getStyleClass().add(CSS_STATION_TEXT);
|
stationText.getStyleClass().add(CSS_STATION_TEXT);
|
||||||
text.getChildren().addAll(stationText);
|
Text distanceText = new Text(String.format("%.0f Ls", vendor.getDistance()));
|
||||||
|
distanceText.getStyleClass().add(CSS_STATION_TEXT);
|
||||||
|
text.getChildren().addAll(stationText, distanceText);
|
||||||
}
|
}
|
||||||
|
|
||||||
return text;
|
return text;
|
||||||
|
|||||||
@@ -38,7 +38,7 @@ public interface Offer extends Comparable<Offer> {
|
|||||||
}
|
}
|
||||||
|
|
||||||
default String toPString(){
|
default String toPString(){
|
||||||
return String.format("%.0f (%s - %s)", getPrice(), getVendor().getPlace().getName(), getVendor().getName());
|
return String.format("%.0f (%s - %s (%.0f Ls))", getPrice(), getVendor().getPlace().getName(), getVendor().getName(), getVendor().getDistance());
|
||||||
}
|
}
|
||||||
|
|
||||||
default String toIString(){
|
default String toIString(){
|
||||||
|
|||||||
Reference in New Issue
Block a user