add missing field to offers screen
This commit is contained in:
@@ -11,10 +11,7 @@ import ru.trader.core.SERVICE_TYPE;
|
|||||||
import ru.trader.model.*;
|
import ru.trader.model.*;
|
||||||
import ru.trader.model.support.BindingsHelper;
|
import ru.trader.model.support.BindingsHelper;
|
||||||
import ru.trader.model.support.ChangeMarketListener;
|
import ru.trader.model.support.ChangeMarketListener;
|
||||||
import ru.trader.view.support.FactionStringConverter;
|
import ru.trader.view.support.*;
|
||||||
import ru.trader.view.support.GovernmentStringConverter;
|
|
||||||
import ru.trader.view.support.Localization;
|
|
||||||
import ru.trader.view.support.ViewUtils;
|
|
||||||
import ru.trader.view.support.autocomplete.AutoCompletion;
|
import ru.trader.view.support.autocomplete.AutoCompletion;
|
||||||
import ru.trader.view.support.autocomplete.CachedSuggestionProvider;
|
import ru.trader.view.support.autocomplete.CachedSuggestionProvider;
|
||||||
import ru.trader.view.support.autocomplete.SystemsProvider;
|
import ru.trader.view.support.autocomplete.SystemsProvider;
|
||||||
@@ -38,12 +35,18 @@ public class OffersController {
|
|||||||
@FXML
|
@FXML
|
||||||
private TableView<OfferModel> tblBuy;
|
private TableView<OfferModel> tblBuy;
|
||||||
@FXML
|
@FXML
|
||||||
|
private Label type;
|
||||||
|
@FXML
|
||||||
private Label faction;
|
private Label faction;
|
||||||
@FXML
|
@FXML
|
||||||
private Label government;
|
private Label government;
|
||||||
@FXML
|
@FXML
|
||||||
private Label distance;
|
private Label distance;
|
||||||
@FXML
|
@FXML
|
||||||
|
private Label economic;
|
||||||
|
@FXML
|
||||||
|
private Label subeconomic;
|
||||||
|
@FXML
|
||||||
private CheckBox cbMarket;
|
private CheckBox cbMarket;
|
||||||
@FXML
|
@FXML
|
||||||
private CheckBox cbBlackMarket;
|
private CheckBox cbBlackMarket;
|
||||||
@@ -134,9 +137,12 @@ public class OffersController {
|
|||||||
sells.clear();
|
sells.clear();
|
||||||
buys.clear();
|
buys.clear();
|
||||||
stationPane.setText(station.getName());
|
stationPane.setText(station.getName());
|
||||||
|
type.setText("");
|
||||||
distance.setText("");
|
distance.setText("");
|
||||||
government.setText("");
|
government.setText("");
|
||||||
faction.setText("");
|
faction.setText("");
|
||||||
|
economic.setText("");
|
||||||
|
subeconomic.setText("");
|
||||||
cbMarket.setSelected(false);
|
cbMarket.setSelected(false);
|
||||||
cbBlackMarket.setSelected(false);
|
cbBlackMarket.setSelected(false);
|
||||||
cbRefuel.setSelected(false);
|
cbRefuel.setSelected(false);
|
||||||
@@ -147,9 +153,12 @@ public class OffersController {
|
|||||||
cbMediumLandpad.setSelected(false);
|
cbMediumLandpad.setSelected(false);
|
||||||
cbLargeLandpad.setSelected(false);
|
cbLargeLandpad.setSelected(false);
|
||||||
if (!ModelFabric.isFake(station)){
|
if (!ModelFabric.isFake(station)){
|
||||||
|
type.setText(StationTypeStringConverter.toLocalizationString(station.getType()));
|
||||||
faction.setText(FactionStringConverter.toLocalizationString(station.getFaction()));
|
faction.setText(FactionStringConverter.toLocalizationString(station.getFaction()));
|
||||||
government.setText(GovernmentStringConverter.toLocalizationString(station.getGovernment()));
|
government.setText(GovernmentStringConverter.toLocalizationString(station.getGovernment()));
|
||||||
distance.setText(String.valueOf(station.getDistance()));
|
distance.setText(String.valueOf(station.getDistance()));
|
||||||
|
economic.setText(EconomicTypeStringConverter.toLocalizationString(station.getEconomic()));
|
||||||
|
subeconomic.setText(EconomicTypeStringConverter.toLocalizationString(station.getSubEconomic()));
|
||||||
cbMarket.setSelected(station.hasService(SERVICE_TYPE.MARKET));
|
cbMarket.setSelected(station.hasService(SERVICE_TYPE.MARKET));
|
||||||
cbBlackMarket.setSelected(station.hasService(SERVICE_TYPE.BLACK_MARKET));
|
cbBlackMarket.setSelected(station.hasService(SERVICE_TYPE.BLACK_MARKET));
|
||||||
cbRefuel.setSelected(station.hasService(SERVICE_TYPE.REFUEL));
|
cbRefuel.setSelected(station.hasService(SERVICE_TYPE.REFUEL));
|
||||||
@@ -196,6 +205,14 @@ public class OffersController {
|
|||||||
system.setValue(profile.getSystem());
|
system.setValue(profile.getSystem());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@FXML
|
||||||
|
private void editSystem() {
|
||||||
|
SystemModel s = getSystem();
|
||||||
|
if (!ModelFabric.isFake(s)){
|
||||||
|
Screeners.showSystemsEditor(s);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
@FXML
|
@FXML
|
||||||
private void addStation() {
|
private void addStation() {
|
||||||
SystemModel s = getSystem();
|
SystemModel s = getSystem();
|
||||||
|
|||||||
@@ -130,8 +130,6 @@ itemDesc.sellers=Sellers:
|
|||||||
itemDesc.buyers=Buyers:
|
itemDesc.buyers=Buyers:
|
||||||
|
|
||||||
# offers.fxml
|
# offers.fxml
|
||||||
offers.text.distance=Distance:
|
|
||||||
offers.text.services=Services:
|
|
||||||
offers.pane.sell=Selling commodities
|
offers.pane.sell=Selling commodities
|
||||||
offers.pane.buy=Buying commodities
|
offers.pane.buy=Buying commodities
|
||||||
|
|
||||||
@@ -267,4 +265,15 @@ helper.items=Commodities:
|
|||||||
|
|
||||||
#messages
|
#messages
|
||||||
message.wrongNumber=Wrong number
|
message.wrongNumber=Wrong number
|
||||||
message.wrongDuration=Wrong duration format, use like 1w1d1h1m1s
|
message.wrongDuration=Wrong duration format, use like 1w1d1h1m1s
|
||||||
|
|
||||||
|
#labels
|
||||||
|
label.allegiance=${market.allegiance}:
|
||||||
|
label.government=${market.government}:
|
||||||
|
label.economic=${market.economic}:
|
||||||
|
label.power=${market.power}:
|
||||||
|
label.powerState=${market.powerState}:
|
||||||
|
label.station.name=${market.station.name}:
|
||||||
|
label.station.distance=${market.station.distance}:
|
||||||
|
label.station.services=${market.station.services}:
|
||||||
|
label.station.type=${market.station.type}:
|
||||||
@@ -131,8 +131,6 @@ itemDesc.sellers=\u041F\u0440\u043E\u0434\u0430\u0432\u0446\u044B:
|
|||||||
itemDesc.buyers=\u041F\u043E\u043A\u0443\u043F\u0430\u0442\u0435\u043B\u0438:
|
itemDesc.buyers=\u041F\u043E\u043A\u0443\u043F\u0430\u0442\u0435\u043B\u0438:
|
||||||
|
|
||||||
# offers.fxml
|
# offers.fxml
|
||||||
offers.text.distance=\u0414\u0438\u0441\u0442\u0430\u043D\u0446\u0438\u044F:
|
|
||||||
offers.text.services=\u0421\u0435\u0440\u0432\u0438\u0441\u044B:
|
|
||||||
offers.pane.sell=\u041F\u0440\u043E\u0434\u0430\u0432\u0430\u0435\u043C\u044B\u0435 \u0442\u043E\u0432\u0430\u0440\u044B
|
offers.pane.sell=\u041F\u0440\u043E\u0434\u0430\u0432\u0430\u0435\u043C\u044B\u0435 \u0442\u043E\u0432\u0430\u0440\u044B
|
||||||
offers.pane.buy=\u041F\u043E\u043A\u0443\u043F\u0430\u0435\u043C\u044B\u0435 \u0442\u043E\u0432\u0430\u0440\u044B
|
offers.pane.buy=\u041F\u043E\u043A\u0443\u043F\u0430\u0435\u043C\u044B\u0435 \u0442\u043E\u0432\u0430\u0440\u044B
|
||||||
|
|
||||||
@@ -268,4 +266,15 @@ helper.items=\u0422\u043E\u0432\u0430\u0440\u044B:
|
|||||||
|
|
||||||
#messages
|
#messages
|
||||||
message.wrongNumber=\u0414\u043E\u0441\u0442\u0443\u043F\u043D\u044B \u0442\u043E\u043B\u044C\u043A\u043E \u0446\u0438\u0444\u0440\u044B
|
message.wrongNumber=\u0414\u043E\u0441\u0442\u0443\u043F\u043D\u044B \u0442\u043E\u043B\u044C\u043A\u043E \u0446\u0438\u0444\u0440\u044B
|
||||||
message.wrongDuration=\u041D\u0435\u0432\u0435\u0440\u043D\u044B\u0439 \u0444\u043E\u0440\u043C\u0430\u0442 \u043F\u0435\u0440\u0438\u043E\u0434\u0430, \u0438\u0441\u043F\u043E\u043B\u044C\u0437\u0443\u0439\u0442\u0435 \u0444\u043E\u0440\u043C\u0430\u0442 1w1d1h1m1s
|
message.wrongDuration=\u041D\u0435\u0432\u0435\u0440\u043D\u044B\u0439 \u0444\u043E\u0440\u043C\u0430\u0442 \u043F\u0435\u0440\u0438\u043E\u0434\u0430, \u0438\u0441\u043F\u043E\u043B\u044C\u0437\u0443\u0439\u0442\u0435 \u0444\u043E\u0440\u043C\u0430\u0442 1w1d1h1m1s
|
||||||
|
|
||||||
|
#labels
|
||||||
|
label.allegiance=${market.allegiance}:
|
||||||
|
label.government=${market.government}:
|
||||||
|
label.economic=${market.economic}:
|
||||||
|
label.power=${market.power}:
|
||||||
|
label.powerState=${market.powerState}:
|
||||||
|
label.station.name=${market.station.name}:
|
||||||
|
label.station.distance=${market.station.distance}:
|
||||||
|
label.station.services=${market.station.services}:
|
||||||
|
label.station.type=${market.station.type}:
|
||||||
@@ -27,6 +27,8 @@
|
|||||||
<contextMenu>
|
<contextMenu>
|
||||||
<ContextMenu>
|
<ContextMenu>
|
||||||
<items>
|
<items>
|
||||||
|
<MenuItem text="%main.menu.edit.editSystem" onAction="#editSystem" />
|
||||||
|
<SeparatorMenuItem />
|
||||||
<MenuItem text="%main.menu.edit.addStation" onAction="#addStation" />
|
<MenuItem text="%main.menu.edit.addStation" onAction="#addStation" />
|
||||||
<MenuItem text="%main.menu.edit.editStation" onAction="#editStation" />
|
<MenuItem text="%main.menu.edit.editStation" onAction="#editStation" />
|
||||||
<MenuItem text="%main.menu.edit.removeStation" onAction="#removeStation" />
|
<MenuItem text="%main.menu.edit.removeStation" onAction="#removeStation" />
|
||||||
@@ -36,32 +38,43 @@
|
|||||||
</ListView>
|
</ListView>
|
||||||
</TitledPane>
|
</TitledPane>
|
||||||
</VBox>
|
</VBox>
|
||||||
<TitledPane fx:id="stationPane" GridPane.columnIndex="1" maxHeight="60" collapsible="false">
|
<TitledPane fx:id="stationPane" GridPane.columnIndex="1"
|
||||||
<VBox>
|
minHeight="120" maxHeight="120" collapsible="false">
|
||||||
<HBox spacing="4">
|
<GridPane hgap="4" vgap="4">
|
||||||
<Label text="%offers.text.distance"/>
|
<columnConstraints>
|
||||||
<Label fx:id="distance" minWidth="60"/>
|
<ColumnConstraints minWidth="80"/>
|
||||||
<Label text="%market.allegiance"/>
|
<ColumnConstraints minWidth="140" />
|
||||||
<Label fx:id="faction" minWidth="60"/>
|
<ColumnConstraints minWidth="100" />
|
||||||
<Label text="%market.government"/>
|
<ColumnConstraints minWidth="140" />
|
||||||
<Label fx:id="government" minWidth="60"/>
|
<ColumnConstraints minWidth="110" />
|
||||||
</HBox>
|
<ColumnConstraints minWidth="140" hgrow="ALWAYS" />
|
||||||
<HBox spacing="4">
|
</columnConstraints>
|
||||||
<Label text="%offers.text.services"/>
|
<Label text="%label.station.type" />
|
||||||
<TilePane hgap="5" vgap="5" prefColumns="5" tileAlignment="BASELINE_LEFT">
|
<Label fx:id="type" GridPane.columnIndex="1"/>
|
||||||
<CheckBox fx:id="cbMarket" text="%services.MARKET"/>
|
<Label text="%label.allegiance" GridPane.columnIndex="2"/>
|
||||||
<CheckBox fx:id="cbBlackMarket" text="%services.BLACK_MARKET"/>
|
<Label fx:id="faction" GridPane.columnIndex="3" />
|
||||||
<CheckBox fx:id="cbRefuel" text="%services.REFUEL"/>
|
<Label text="%label.government" GridPane.columnIndex="4" />
|
||||||
<CheckBox fx:id="cbRepair" text="%services.REPAIR"/>
|
<Label fx:id="government" GridPane.columnIndex="5" />
|
||||||
<CheckBox fx:id="cbMunition" text="%services.MUNITION"/>
|
<Label text="%label.station.distance" GridPane.rowIndex="1" />
|
||||||
<CheckBox fx:id="cbOutfit" text="%services.OUTFIT"/>
|
<Label fx:id="distance" GridPane.rowIndex="1" GridPane.columnIndex="1" />
|
||||||
<CheckBox fx:id="cbShipyard" text="%services.SHIPYARD"/>
|
<Label text="%label.economic" GridPane.rowIndex="1" GridPane.columnIndex="2" />
|
||||||
<CheckBox fx:id="cbMediumLandpad" text="%services.MEDIUM_LANDPAD"/>
|
<Label fx:id="economic" GridPane.rowIndex="1" GridPane.columnIndex="3" />
|
||||||
<CheckBox fx:id="cbLargeLandpad" text="%services.LARGE_LANDPAD"/>
|
<Label fx:id="subeconomic" GridPane.rowIndex="1" GridPane.columnIndex="4" GridPane.columnSpan="2"/>
|
||||||
</TilePane>
|
|
||||||
</HBox>
|
|
||||||
</VBox>
|
|
||||||
|
|
||||||
|
<Label text="%label.station.services" GridPane.rowIndex="2"/>
|
||||||
|
<TilePane GridPane.rowIndex="2" GridPane.columnIndex="1" GridPane.columnSpan="5" GridPane.hgrow="ALWAYS"
|
||||||
|
hgap="5" vgap="5" prefColumns="5" tileAlignment="BASELINE_LEFT">
|
||||||
|
<CheckBox fx:id="cbMarket" text="%services.MARKET"/>
|
||||||
|
<CheckBox fx:id="cbBlackMarket" text="%services.BLACK_MARKET"/>
|
||||||
|
<CheckBox fx:id="cbRefuel" text="%services.REFUEL"/>
|
||||||
|
<CheckBox fx:id="cbRepair" text="%services.REPAIR"/>
|
||||||
|
<CheckBox fx:id="cbMunition" text="%services.MUNITION"/>
|
||||||
|
<CheckBox fx:id="cbOutfit" text="%services.OUTFIT"/>
|
||||||
|
<CheckBox fx:id="cbShipyard" text="%services.SHIPYARD"/>
|
||||||
|
<CheckBox fx:id="cbMediumLandpad" text="%services.MEDIUM_LANDPAD"/>
|
||||||
|
<CheckBox fx:id="cbLargeLandpad" text="%services.LARGE_LANDPAD"/>
|
||||||
|
</TilePane>
|
||||||
|
</GridPane>
|
||||||
</TitledPane>
|
</TitledPane>
|
||||||
<Accordion GridPane.rowIndex="1" GridPane.columnIndex="1" GridPane.hgrow="ALWAYS" GridPane.vgrow="ALWAYS">
|
<Accordion GridPane.rowIndex="1" GridPane.columnIndex="1" GridPane.hgrow="ALWAYS" GridPane.vgrow="ALWAYS">
|
||||||
<panes>
|
<panes>
|
||||||
|
|||||||
Reference in New Issue
Block a user