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.support.BindingsHelper;
|
||||
import ru.trader.model.support.ChangeMarketListener;
|
||||
import ru.trader.view.support.FactionStringConverter;
|
||||
import ru.trader.view.support.GovernmentStringConverter;
|
||||
import ru.trader.view.support.Localization;
|
||||
import ru.trader.view.support.ViewUtils;
|
||||
import ru.trader.view.support.*;
|
||||
import ru.trader.view.support.autocomplete.AutoCompletion;
|
||||
import ru.trader.view.support.autocomplete.CachedSuggestionProvider;
|
||||
import ru.trader.view.support.autocomplete.SystemsProvider;
|
||||
@@ -38,12 +35,18 @@ public class OffersController {
|
||||
@FXML
|
||||
private TableView<OfferModel> tblBuy;
|
||||
@FXML
|
||||
private Label type;
|
||||
@FXML
|
||||
private Label faction;
|
||||
@FXML
|
||||
private Label government;
|
||||
@FXML
|
||||
private Label distance;
|
||||
@FXML
|
||||
private Label economic;
|
||||
@FXML
|
||||
private Label subeconomic;
|
||||
@FXML
|
||||
private CheckBox cbMarket;
|
||||
@FXML
|
||||
private CheckBox cbBlackMarket;
|
||||
@@ -134,9 +137,12 @@ public class OffersController {
|
||||
sells.clear();
|
||||
buys.clear();
|
||||
stationPane.setText(station.getName());
|
||||
type.setText("");
|
||||
distance.setText("");
|
||||
government.setText("");
|
||||
faction.setText("");
|
||||
economic.setText("");
|
||||
subeconomic.setText("");
|
||||
cbMarket.setSelected(false);
|
||||
cbBlackMarket.setSelected(false);
|
||||
cbRefuel.setSelected(false);
|
||||
@@ -147,9 +153,12 @@ public class OffersController {
|
||||
cbMediumLandpad.setSelected(false);
|
||||
cbLargeLandpad.setSelected(false);
|
||||
if (!ModelFabric.isFake(station)){
|
||||
type.setText(StationTypeStringConverter.toLocalizationString(station.getType()));
|
||||
faction.setText(FactionStringConverter.toLocalizationString(station.getFaction()));
|
||||
government.setText(GovernmentStringConverter.toLocalizationString(station.getGovernment()));
|
||||
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));
|
||||
cbBlackMarket.setSelected(station.hasService(SERVICE_TYPE.BLACK_MARKET));
|
||||
cbRefuel.setSelected(station.hasService(SERVICE_TYPE.REFUEL));
|
||||
@@ -196,6 +205,14 @@ public class OffersController {
|
||||
system.setValue(profile.getSystem());
|
||||
}
|
||||
|
||||
@FXML
|
||||
private void editSystem() {
|
||||
SystemModel s = getSystem();
|
||||
if (!ModelFabric.isFake(s)){
|
||||
Screeners.showSystemsEditor(s);
|
||||
}
|
||||
}
|
||||
|
||||
@FXML
|
||||
private void addStation() {
|
||||
SystemModel s = getSystem();
|
||||
|
||||
@@ -130,8 +130,6 @@ itemDesc.sellers=Sellers:
|
||||
itemDesc.buyers=Buyers:
|
||||
|
||||
# offers.fxml
|
||||
offers.text.distance=Distance:
|
||||
offers.text.services=Services:
|
||||
offers.pane.sell=Selling commodities
|
||||
offers.pane.buy=Buying commodities
|
||||
|
||||
@@ -268,3 +266,14 @@ helper.items=Commodities:
|
||||
#messages
|
||||
message.wrongNumber=Wrong number
|
||||
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:
|
||||
|
||||
# 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.buy=\u041F\u043E\u043A\u0443\u043F\u0430\u0435\u043C\u044B\u0435 \u0442\u043E\u0432\u0430\u0440\u044B
|
||||
|
||||
@@ -269,3 +267,14 @@ helper.items=\u0422\u043E\u0432\u0430\u0440\u044B:
|
||||
#messages
|
||||
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
|
||||
|
||||
#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>
|
||||
<items>
|
||||
<MenuItem text="%main.menu.edit.editSystem" onAction="#editSystem" />
|
||||
<SeparatorMenuItem />
|
||||
<MenuItem text="%main.menu.edit.addStation" onAction="#addStation" />
|
||||
<MenuItem text="%main.menu.edit.editStation" onAction="#editStation" />
|
||||
<MenuItem text="%main.menu.edit.removeStation" onAction="#removeStation" />
|
||||
@@ -36,32 +38,43 @@
|
||||
</ListView>
|
||||
</TitledPane>
|
||||
</VBox>
|
||||
<TitledPane fx:id="stationPane" GridPane.columnIndex="1" maxHeight="60" collapsible="false">
|
||||
<VBox>
|
||||
<HBox spacing="4">
|
||||
<Label text="%offers.text.distance"/>
|
||||
<Label fx:id="distance" minWidth="60"/>
|
||||
<Label text="%market.allegiance"/>
|
||||
<Label fx:id="faction" minWidth="60"/>
|
||||
<Label text="%market.government"/>
|
||||
<Label fx:id="government" minWidth="60"/>
|
||||
</HBox>
|
||||
<HBox spacing="4">
|
||||
<Label text="%offers.text.services"/>
|
||||
<TilePane 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>
|
||||
</HBox>
|
||||
</VBox>
|
||||
<TitledPane fx:id="stationPane" GridPane.columnIndex="1"
|
||||
minHeight="120" maxHeight="120" collapsible="false">
|
||||
<GridPane hgap="4" vgap="4">
|
||||
<columnConstraints>
|
||||
<ColumnConstraints minWidth="80"/>
|
||||
<ColumnConstraints minWidth="140" />
|
||||
<ColumnConstraints minWidth="100" />
|
||||
<ColumnConstraints minWidth="140" />
|
||||
<ColumnConstraints minWidth="110" />
|
||||
<ColumnConstraints minWidth="140" hgrow="ALWAYS" />
|
||||
</columnConstraints>
|
||||
<Label text="%label.station.type" />
|
||||
<Label fx:id="type" GridPane.columnIndex="1"/>
|
||||
<Label text="%label.allegiance" GridPane.columnIndex="2"/>
|
||||
<Label fx:id="faction" GridPane.columnIndex="3" />
|
||||
<Label text="%label.government" GridPane.columnIndex="4" />
|
||||
<Label fx:id="government" GridPane.columnIndex="5" />
|
||||
<Label text="%label.station.distance" GridPane.rowIndex="1" />
|
||||
<Label fx:id="distance" GridPane.rowIndex="1" GridPane.columnIndex="1" />
|
||||
<Label text="%label.economic" GridPane.rowIndex="1" GridPane.columnIndex="2" />
|
||||
<Label fx:id="economic" GridPane.rowIndex="1" GridPane.columnIndex="3" />
|
||||
<Label fx:id="subeconomic" GridPane.rowIndex="1" GridPane.columnIndex="4" GridPane.columnSpan="2"/>
|
||||
|
||||
<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>
|
||||
<Accordion GridPane.rowIndex="1" GridPane.columnIndex="1" GridPane.hgrow="ALWAYS" GridPane.vgrow="ALWAYS">
|
||||
<panes>
|
||||
|
||||
Reference in New Issue
Block a user