print station name in offers and orders desc
This commit is contained in:
@@ -199,11 +199,11 @@ public class OfferModel {
|
||||
return diffProperty().get();
|
||||
}
|
||||
|
||||
public String toPString(){
|
||||
public String toStationString(){
|
||||
return offer.toPString();
|
||||
}
|
||||
|
||||
public String toIString(){
|
||||
public String toItemString(){
|
||||
return offer.toIString();
|
||||
}
|
||||
|
||||
|
||||
@@ -94,6 +94,9 @@ public class OrderModel {
|
||||
this.max.setValue(max);
|
||||
}
|
||||
|
||||
public SystemModel getSystem() {
|
||||
return offer.getSystem();
|
||||
}
|
||||
|
||||
public StationModel getStation() {
|
||||
return offer.getStation();
|
||||
|
||||
@@ -17,11 +17,11 @@ public class ModelBindings {
|
||||
|
||||
|
||||
public static StringBinding asString(final OfferModel offer){
|
||||
return Bindings.createStringBinding(offer::toPString, offer.priceProperty(), offer.getSystem().nameProperty());
|
||||
return Bindings.createStringBinding(offer::toStationString, offer.priceProperty(), offer.getSystem().nameProperty());
|
||||
}
|
||||
|
||||
public static StringBinding asItemString(final OfferModel offer){
|
||||
return Bindings.createStringBinding(offer::toIString, offer.priceProperty(), offer.nameProperty());
|
||||
return Bindings.createStringBinding(offer::toItemString, offer.priceProperty(), offer.nameProperty());
|
||||
}
|
||||
|
||||
public static DoubleBinding price(final ObservableValue<OfferModel> offer){
|
||||
@@ -56,7 +56,7 @@ public class ModelBindings {
|
||||
private static StringBinding asItemString(final ObservableValue<OfferModel> offer, final Observable... dependencies){
|
||||
return Bindings.createStringBinding(() -> {
|
||||
OfferModel o = offer.getValue();
|
||||
return o != null ? o.toIString(): "";
|
||||
return o != null ? o.toItemString(): "";
|
||||
}, dependencies);
|
||||
}
|
||||
|
||||
@@ -64,7 +64,7 @@ public class ModelBindings {
|
||||
private static StringBinding asString(final ObservableValue<OfferModel> offer, final Observable... dependencies){
|
||||
return Bindings.createStringBinding(() -> {
|
||||
OfferModel o = offer.getValue();
|
||||
return o != null ? o.toPString() : "";
|
||||
return o != null ? o.toStationString() : "";
|
||||
}, dependencies);
|
||||
}
|
||||
|
||||
|
||||
@@ -4,6 +4,7 @@ market.stations=Stations
|
||||
market.items=Commods
|
||||
market.offers=Offers
|
||||
market.item.name=Commodity
|
||||
market.system.name=System
|
||||
market.station.name=Station
|
||||
|
||||
# Offer
|
||||
|
||||
@@ -4,6 +4,7 @@ market.stations=\u0421\u0442\u0430\u043D\u0446\u0438\u0438
|
||||
market.items=\u0422\u043E\u0432\u0430\u0440\u044B
|
||||
market.offers=\u0417\u0430\u043A\u0430\u0437\u044B
|
||||
market.item.name=\u0422\u043E\u0432\u0430\u0440
|
||||
market.system.name=\u0421\u0438\u0441\u0442\u0435\u043C\u0430
|
||||
market.station.name=\u0421\u0442\u0430\u043D\u0446\u0438\u044F
|
||||
|
||||
# Offer
|
||||
|
||||
@@ -10,35 +10,35 @@
|
||||
|
||||
<VBox xmlns="http://javafx.com/javafx/8" xmlns:fx="http://javafx.com/fxml/1"
|
||||
fx:controller="ru.trader.controllers.ItemsController">
|
||||
<TableView fx:id="tblItems" editable="true" VBox.vgrow="ALWAYS" prefWidth="1095.0">
|
||||
<TableView fx:id="tblItems" editable="true" VBox.vgrow="ALWAYS" prefWidth="1175.0">
|
||||
<columns>
|
||||
<TableColumn editable="true" minWidth="200.0" text="%market.item.name">
|
||||
<cellValueFactory><PropertyValueFactory property="name"/></cellValueFactory>
|
||||
</TableColumn>
|
||||
<TableColumn editable="true" resizable="false" text="%market.offer.buy">
|
||||
<columns>
|
||||
<TableColumn minWidth="120.0" text="%market.offer.min">
|
||||
<TableColumn minWidth="140.0" text="%market.offer.min">
|
||||
<cellValueFactory><OfferCellValueImpl property="minSell"/></cellValueFactory>
|
||||
</TableColumn>
|
||||
<TableColumn minWidth="80.0" text="%market.offer.avg">
|
||||
<cellFactory><DoubleCell/></cellFactory>
|
||||
<cellValueFactory><PropertyValueFactory property="avgSell"/></cellValueFactory>
|
||||
</TableColumn>
|
||||
<TableColumn minWidth="120.0" text="%market.offer.max">
|
||||
<TableColumn minWidth="140.0" text="%market.offer.max">
|
||||
<cellValueFactory><OfferCellValueImpl property="maxSell"/></cellValueFactory>
|
||||
</TableColumn>
|
||||
</columns>
|
||||
</TableColumn>
|
||||
<TableColumn editable="true" resizable="false" text="%market.offer.sell">
|
||||
<columns>
|
||||
<TableColumn minWidth="120.0" text="%market.offer.min">
|
||||
<TableColumn minWidth="140.0" text="%market.offer.min">
|
||||
<cellValueFactory><OfferCellValueImpl property="minBuy"/></cellValueFactory>
|
||||
</TableColumn>
|
||||
<TableColumn minWidth="80.0" text="%market.offer.avg">
|
||||
<cellFactory><DoubleCell/></cellFactory>
|
||||
<cellValueFactory><PropertyValueFactory property="avgBuy"/></cellValueFactory>
|
||||
</TableColumn>
|
||||
<TableColumn minWidth="120.0" text="%market.offer.max">
|
||||
<TableColumn minWidth="140.0" text="%market.offer.max">
|
||||
<cellValueFactory><OfferCellValueImpl property="maxBuy"/></cellValueFactory>
|
||||
</TableColumn>
|
||||
</columns>
|
||||
|
||||
@@ -79,10 +79,13 @@
|
||||
<VBox HBox.hgrow="ALWAYS">
|
||||
<TableView fx:id="tblOrders" VBox.vgrow="ALWAYS">
|
||||
<columns>
|
||||
<TableColumn minWidth="210.0" text="%market.order.seller">
|
||||
<TableColumn minWidth="140.0" text="%market.system.name">
|
||||
<cellValueFactory><PropertyValueFactory property="system"/></cellValueFactory>
|
||||
</TableColumn>
|
||||
<TableColumn minWidth="150.0" text="%market.order.seller">
|
||||
<cellValueFactory><PropertyValueFactory property="station"/></cellValueFactory>
|
||||
</TableColumn>
|
||||
<TableColumn minWidth="180.0" text="%market.item.name">
|
||||
<TableColumn minWidth="140.0" text="%market.item.name">
|
||||
<cellValueFactory><PropertyValueFactory property="name"/></cellValueFactory>
|
||||
</TableColumn>
|
||||
<TableColumn minWidth="80.0" text="%market.offer.price">
|
||||
@@ -92,7 +95,7 @@
|
||||
<TableColumn minWidth="80.0" text="%market.order.count">
|
||||
<cellValueFactory><PropertyValueFactory property="count"/></cellValueFactory>
|
||||
</TableColumn>
|
||||
<TableColumn minWidth="120.0" text="%market.order.buyer">
|
||||
<TableColumn minWidth="160.0" text="%market.order.buyer">
|
||||
<cellValueFactory><OfferCellValueImpl property="buyOffer"/></cellValueFactory>
|
||||
</TableColumn>
|
||||
<TableColumn minWidth="80.0" text="%market.order.distance">
|
||||
|
||||
Reference in New Issue
Block a user