diff --git a/client/src/main/java/ru/trader/Main.java b/client/src/main/java/ru/trader/Main.java index b4eac08..3af4df9 100644 --- a/client/src/main/java/ru/trader/Main.java +++ b/client/src/main/java/ru/trader/Main.java @@ -92,6 +92,7 @@ public class Main extends Application { Screeners.loadTopOrdersStage(getUrl(("topOrders.fxml"))); Screeners.loadPathsStage(getUrl(("paths.fxml"))); Screeners.loadSettingsStage(getUrl(("settings.fxml"))); + Screeners.loadSEditorStage(getUrl(("sEditor.fxml"))); } private static URL getUrl(String filename) throws MalformedURLException { diff --git a/client/src/main/java/ru/trader/controllers/MainController.java b/client/src/main/java/ru/trader/controllers/MainController.java index 02b8e5b..ec05a06 100644 --- a/client/src/main/java/ru/trader/controllers/MainController.java +++ b/client/src/main/java/ru/trader/controllers/MainController.java @@ -17,6 +17,7 @@ import ru.trader.World; import ru.trader.model.ItemModel; import ru.trader.model.MarketModel; import ru.trader.model.StationModel; +import ru.trader.model.SystemModel; import ru.trader.view.support.Localization; import javax.xml.stream.XMLStreamException; @@ -141,11 +142,12 @@ public class MainController { public void addSystem(ActionEvent actionEvent){ - //TODO: implement + Screeners.showSystemsEditor(null); } public void editSystem(ActionEvent actionEvent){ - //TODO: implement + SystemModel system = offersController.getSystem(); + Screeners.showSystemsEditor(system); } public void removeSystem(ActionEvent actionEvent){ @@ -153,7 +155,10 @@ public class MainController { } public void addStation(ActionEvent actionEvent) { - Screeners.showAddStation(offersController.getSystem()); + SystemModel system = offersController.getSystem(); + if (system != null){ + Screeners.showAddStation(offersController.getSystem()); + } } public void editStation(ActionEvent actionEvent) { diff --git a/client/src/main/java/ru/trader/controllers/OffersController.java b/client/src/main/java/ru/trader/controllers/OffersController.java index a91f710..94dbf4f 100644 --- a/client/src/main/java/ru/trader/controllers/OffersController.java +++ b/client/src/main/java/ru/trader/controllers/OffersController.java @@ -14,9 +14,11 @@ import org.controlsfx.control.SegmentedButton; import org.slf4j.Logger; import org.slf4j.LoggerFactory; import javafx.fxml.FXML; +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.NumberField; import java.util.List; @@ -29,18 +31,28 @@ public class OffersController { @FXML private Insets stationsMargin; - @FXML private ListView systems; - @FXML private SegmentedButton stationsBar; - @FXML private TableView tblSell; - @FXML private TableView tblBuy; + @FXML + private Label distance; + @FXML + private CheckBox cbMarket; + @FXML + private CheckBox cbBlackMarket; + @FXML + private CheckBox cbRepair; + @FXML + private CheckBox cbMunition; + @FXML + private CheckBox cbOutfit; + @FXML + private CheckBox cbShipyard; private final List sells = FXCollections.observableArrayList(); private final List buys = FXCollections.observableArrayList(); @@ -106,7 +118,6 @@ public class OffersController { } station = stations.isEmpty() ? null : stations.get(0); - LOG.info("Change station to {}", station); fillTables(station); } @@ -117,9 +128,24 @@ public class OffersController { } private void fillTables(StationModel station){ + LOG.info("Change station to {}", station); sells.clear(); buys.clear(); + distance.setText(""); + cbMarket.setSelected(false); + cbBlackMarket.setSelected(false); + cbMunition.setSelected(false); + cbRepair.setSelected(false); + cbOutfit.setSelected(false); + cbShipyard.setSelected(false); if (station != null){ + distance.setText(String.valueOf(station.getDistance())); + cbMarket.setSelected(station.hasService(SERVICE_TYPE.MARKET)); + cbBlackMarket.setSelected(station.hasService(SERVICE_TYPE.BLACK_MARKET)); + cbMunition.setSelected(station.hasService(SERVICE_TYPE.MUNITION)); + cbRepair.setSelected(station.hasService(SERVICE_TYPE.REPAIR)); + cbOutfit.setSelected(station.hasService(SERVICE_TYPE.OUTFIT)); + cbShipyard.setSelected(station.hasService(SERVICE_TYPE.SHIPYARD)); sells.addAll(station.getSells()); buys.addAll(station.getBuys()); } @@ -202,6 +228,7 @@ public class OffersController { @Override public void add(StationModel station) { + stationsBar.getButtons().add(buildStationNode(station)); refresh(); sort(); } diff --git a/client/src/main/java/ru/trader/controllers/Screeners.java b/client/src/main/java/ru/trader/controllers/Screeners.java index 8c79f25..538aec8 100644 --- a/client/src/main/java/ru/trader/controllers/Screeners.java +++ b/client/src/main/java/ru/trader/controllers/Screeners.java @@ -28,6 +28,7 @@ public class Screeners { private static Parent topOrdersScreen; private static Parent pathsScreen; private static Parent settingsScreen; + private static Parent sEditorScreen; private static MainController mainController; private static ItemDescController itemDescController; @@ -37,6 +38,7 @@ public class Screeners { private static TopOrdersController topOrdersController; private static PathsController pathsController; private static SettingsController settingsController; + private static SystemsEditorController systemsEditorController; private static FXMLLoader initLoader(URL url){ FXMLLoader loader = new FXMLLoader(url, Localization.getResources()); @@ -118,6 +120,14 @@ public class Screeners { stage.setScene(new Scene(settingsScreen)); } + public static void loadSEditorStage(URL fxml) throws IOException { + FXMLLoader loader = initLoader(fxml); + sEditorScreen = loader.load(); + addStylesheet(sEditorScreen); + systemsEditorController = loader.getController(); + } + + public static void show(Node node){ mainController.getMainPane().setCenter(node); } @@ -131,6 +141,10 @@ public class Screeners { return Dialogs.create().owner(mainScreen).message(text).showConfirm(); } + public static void showSystemsEditor(SystemModel system){ + systemsEditorController.showDialog(mainScreen, sEditorScreen, system); + } + public static void showAddStation(SystemModel system){ vEditorController.showDialog(mainScreen, vEditorScreen, system, null); } diff --git a/client/src/main/java/ru/trader/controllers/StationEditorController.java b/client/src/main/java/ru/trader/controllers/StationEditorController.java index 1f396e4..c48fea7 100644 --- a/client/src/main/java/ru/trader/controllers/StationEditorController.java +++ b/client/src/main/java/ru/trader/controllers/StationEditorController.java @@ -2,9 +2,11 @@ package ru.trader.controllers; import javafx.fxml.FXML; import javafx.scene.Parent; +import javafx.scene.control.CheckBox; import javafx.scene.control.TableColumn; import javafx.scene.control.TableView; import javafx.scene.control.TextField; +import javafx.util.converter.LongStringConverter; import org.controlsfx.control.ButtonBar; import org.controlsfx.control.action.Action; import org.controlsfx.dialog.Dialog; @@ -12,6 +14,7 @@ import org.controlsfx.dialog.DialogAction; import org.slf4j.Logger; import org.slf4j.LoggerFactory; import ru.trader.EMDNUpdater; +import ru.trader.core.SERVICE_TYPE; import ru.trader.model.*; import ru.trader.model.support.StationUpdater; import ru.trader.view.support.Localization; @@ -19,6 +22,7 @@ import ru.trader.view.support.NumberField; import ru.trader.view.support.PriceStringConverter; import ru.trader.view.support.ViewUtils; import ru.trader.view.support.cells.EditOfferCell; +import ru.trader.view.support.cells.TextFieldCell; import java.util.Optional; @@ -35,13 +39,25 @@ public class StationEditorController { private TableColumn buy; @FXML private TableColumn sell; + @FXML + private TableColumn supply; + @FXML + private TableColumn demand; @FXML - private NumberField x; + private NumberField distance; @FXML - private NumberField y; + private CheckBox cbMarket; @FXML - private NumberField z; + private CheckBox cbBlackMarket; + @FXML + private CheckBox cbRepair; + @FXML + private CheckBox cbMunition; + @FXML + private CheckBox cbOutfit; + @FXML + private CheckBox cbShipyard; private StationUpdater updater; @@ -61,11 +77,11 @@ public class StationEditorController { items.getSelectionModel().setCellSelectionEnabled(true); buy.setCellFactory(EditOfferCell.forTable(new PriceStringConverter(), false)); sell.setCellFactory(EditOfferCell.forTable(new PriceStringConverter(), true)); - actSave.disabledProperty().bind(x.wrongProperty().or(y.wrongProperty().or(z.wrongProperty()))); - name.setOnAction((v)->x.requestFocus()); - x.setOnAction((v) -> z.requestFocus()); - z.setOnAction((v) -> y.requestFocus()); - y.setOnAction((v) -> { + demand.setCellFactory(TextFieldCell.forTableColumn(new LongStringConverter())); + supply.setCellFactory(TextFieldCell.forTableColumn(new LongStringConverter())); + actSave.disabledProperty().bind(distance.wrongProperty()); + name.setOnAction((v)->distance.requestFocus()); + distance.setOnAction((v) -> { items.requestFocus(); items.getSelectionModel().select(0, buy); }); @@ -73,11 +89,19 @@ public class StationEditorController { } private void init(){ + if (updater != null){ + name.textProperty().unbindBidirectional(updater.nameProperty()); + distance.numberProperty().unbindBidirectional(updater.distanceProperty()); + } updater = new StationUpdater(MainController.getMarket()); name.textProperty().bindBidirectional(updater.nameProperty()); - x.numberProperty().bindBidirectional(updater.xProperty()); - y.numberProperty().bindBidirectional(updater.yProperty()); - z.numberProperty().bindBidirectional(updater.zProperty()); + distance.numberProperty().bindBidirectional(updater.distanceProperty()); + cbMarket.selectedProperty().bindBidirectional(updater.serviceProperty(SERVICE_TYPE.MARKET)); + cbBlackMarket.selectedProperty().bindBidirectional(updater.serviceProperty(SERVICE_TYPE.BLACK_MARKET)); + cbMunition.selectedProperty().bindBidirectional(updater.serviceProperty(SERVICE_TYPE.MUNITION)); + cbRepair.selectedProperty().bindBidirectional(updater.serviceProperty(SERVICE_TYPE.REPAIR)); + cbOutfit.selectedProperty().bindBidirectional(updater.serviceProperty(SERVICE_TYPE.OUTFIT)); + cbShipyard.selectedProperty().bindBidirectional(updater.serviceProperty(SERVICE_TYPE.SHIPYARD)); items.setItems(updater.getOffers()); } diff --git a/client/src/main/java/ru/trader/controllers/SystemsEditorController.java b/client/src/main/java/ru/trader/controllers/SystemsEditorController.java new file mode 100644 index 0000000..e12cd1e --- /dev/null +++ b/client/src/main/java/ru/trader/controllers/SystemsEditorController.java @@ -0,0 +1,212 @@ +package ru.trader.controllers; + +import javafx.beans.property.DoubleProperty; +import javafx.beans.property.SimpleDoubleProperty; +import javafx.beans.property.SimpleStringProperty; +import javafx.beans.property.StringProperty; +import javafx.collections.FXCollections; +import javafx.fxml.FXML; +import javafx.scene.Parent; +import javafx.scene.control.ComboBox; +import javafx.scene.control.TableColumn; +import javafx.scene.control.TableView; +import javafx.util.converter.DefaultStringConverter; +import javafx.util.converter.DoubleStringConverter; +import org.controlsfx.control.ButtonBar; +import org.controlsfx.control.action.Action; +import org.controlsfx.dialog.Dialog; +import org.controlsfx.dialog.DialogAction; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; +import ru.trader.model.MarketModel; +import ru.trader.model.SystemModel; +import ru.trader.view.support.Localization; +import ru.trader.view.support.cells.TextFieldCell; + +public class SystemsEditorController { + private final static Logger LOG = LoggerFactory.getLogger(SystemsEditorController.class); + + + @FXML + private TableView tblSystems; + @FXML + private TableColumn clnName; + @FXML + private TableColumn clnX; + @FXML + private TableColumn clnY; + @FXML + private TableColumn clnZ; + @FXML + private TableColumn clnS1; + @FXML + private TableColumn clnS2; + @FXML + private TableColumn clnS3; + @FXML + private TableColumn clnS4; + @FXML + private TableColumn clnS5; + @FXML + private TableColumn clnS6; + @FXML + private ComboBox system1; + @FXML + private ComboBox system2; + @FXML + private ComboBox system3; + @FXML + private ComboBox system4; + @FXML + private ComboBox system5; + @FXML + private ComboBox system6; + + private MarketModel market; + + private final Action actSave = new DialogAction(Localization.getString("dialog.button.save"), ButtonBar.ButtonType.OK_DONE, false, true, false, (e) -> { + tblSystems.getSelectionModel().selectFirst(); + commit(); + }); + + @FXML + private void initialize() { + clnName.setCellFactory(TextFieldCell.forTableColumn(new DefaultStringConverter())); + clnX.setCellFactory(TextFieldCell.forTableColumn(new DoubleStringConverter())); + clnY.setCellFactory(TextFieldCell.forTableColumn(new DoubleStringConverter())); + clnZ.setCellFactory(TextFieldCell.forTableColumn(new DoubleStringConverter())); + clnS1.setCellFactory(TextFieldCell.forTableColumn(new DoubleStringConverter())); + clnS2.setCellFactory(TextFieldCell.forTableColumn(new DoubleStringConverter())); + clnS3.setCellFactory(TextFieldCell.forTableColumn(new DoubleStringConverter())); + clnS4.setCellFactory(TextFieldCell.forTableColumn(new DoubleStringConverter())); + clnS5.setCellFactory(TextFieldCell.forTableColumn(new DoubleStringConverter())); + clnS6.setCellFactory(TextFieldCell.forTableColumn(new DoubleStringConverter())); + tblSystems.setItems(FXCollections.observableArrayList()); + tblSystems.getSelectionModel().setCellSelectionEnabled(true); + init(); + } + + private void init(){ + market = MainController.getMarket(); + system1.setItems(market.systemsProperty()); + system2.setItems(market.systemsProperty()); + system3.setItems(market.systemsProperty()); + system4.setItems(market.systemsProperty()); + system5.setItems(market.systemsProperty()); + system6.setItems(market.systemsProperty()); + } + + public void showDialog(Parent parent, Parent content, SystemModel system){ + Dialog dlg = new Dialog(parent, Localization.getString("sEditor.title")); + dlg.setContent(content); + dlg.getActions().addAll(actSave, Dialog.ACTION_CANCEL); + dlg.setResizable(false); + if (system != null){ + tblSystems.getItems().add(new SystemData(system)); + } + for (int i = 0; i < 10; i++) { + add(); + } + dlg.show(); + reset(); + } + + public void add() { + tblSystems.getItems().add(new SystemData()); + } + + + private void commit(){ + for (SystemData systemData : tblSystems.getItems()) { + systemData.commit(); + } + } + + private void reset(){ + tblSystems.getItems().clear(); + } + + public class SystemData { + private final StringProperty name; + private final DoubleProperty x; + private final DoubleProperty y; + private final DoubleProperty z; + + private final DoubleProperty s1 = new SimpleDoubleProperty(); + private final DoubleProperty s2 = new SimpleDoubleProperty(); + private final DoubleProperty s3 = new SimpleDoubleProperty(); + private final DoubleProperty s4 = new SimpleDoubleProperty(); + private final DoubleProperty s5 = new SimpleDoubleProperty(); + private final DoubleProperty s6 = new SimpleDoubleProperty(); + private final SystemModel system; + + private SystemData() { + system = null; + name = new SimpleStringProperty(""); + x = new SimpleDoubleProperty(Double.NaN); + y = new SimpleDoubleProperty(Double.NaN); + z = new SimpleDoubleProperty(Double.NaN); + } + + private SystemData(SystemModel system) { + this.system = system; + name = new SimpleStringProperty(system.getName()); + x = new SimpleDoubleProperty(system.getX()); + y = new SimpleDoubleProperty(system.getY()); + z = new SimpleDoubleProperty(system.getZ()); + } + + public StringProperty nameProperty() { + return name; + } + + public DoubleProperty xProperty() { + return x; + } + + public DoubleProperty yProperty() { + return y; + } + + public DoubleProperty zProperty() { + return z; + } + + public DoubleProperty s1Property() { + return s1; + } + + public DoubleProperty s2Property() { + return s2; + } + + public DoubleProperty s3Property() { + return s3; + } + + public DoubleProperty s4Property() { + return s4; + } + + public DoubleProperty s5Property() { + return s5; + } + + public DoubleProperty s6Property() { + return s6; + } + + private void commit(){ + if (!name.get().isEmpty() && !Double.isNaN(x.get()) && !Double.isNaN(y.get()) && !Double.isNaN(z.get())){ + if (system != null){ + system.setName(name.get()); + system.setPosition(x.get(), y.get(), z.get()); + } else { + market.add(name.get(), x.get(), y.get(), z.get()); + } + } + } + + } + +} diff --git a/client/src/main/java/ru/trader/model/StationModel.java b/client/src/main/java/ru/trader/model/StationModel.java index 35eb59d..8ab4281 100644 --- a/client/src/main/java/ru/trader/model/StationModel.java +++ b/client/src/main/java/ru/trader/model/StationModel.java @@ -4,6 +4,7 @@ import org.slf4j.Logger; import org.slf4j.LoggerFactory; import ru.trader.core.OFFER_TYPE; import ru.trader.core.Offer; +import ru.trader.core.SERVICE_TYPE; import ru.trader.core.Vendor; import java.util.*; @@ -49,6 +50,26 @@ public class StationModel { station.setDistance(value); } + public boolean hasService(SERVICE_TYPE service){ + return station.has(service); + } + + public Collection getServices(){ + return station.getServices(); + } + + public void addService(SERVICE_TYPE service){ + if (station.has(service)) return; + LOG.info("Add service {} to station {}", service, station); + station.add(service); + } + + public void removeService(SERVICE_TYPE service){ + if (!station.has(service)) return; + LOG.info("Remove service {} from station {}", service, station); + station.remove(service); + } + public SystemModel getSystem(){ return market.getModeler().get(station.getPlace()); } diff --git a/client/src/main/java/ru/trader/model/SystemModel.java b/client/src/main/java/ru/trader/model/SystemModel.java index 316eb11..6671f3e 100644 --- a/client/src/main/java/ru/trader/model/SystemModel.java +++ b/client/src/main/java/ru/trader/model/SystemModel.java @@ -72,6 +72,10 @@ public class SystemModel { return system.getDistance(other.getSystem()); } + public double getDistance(double x, double y, double z){ + return system.getDistance(x, y, z); + } + public List getStations() { return system.get().stream().map(this::asModel).collect(Collectors.toList()); } diff --git a/client/src/main/java/ru/trader/model/support/StationUpdater.java b/client/src/main/java/ru/trader/model/support/StationUpdater.java index 0e4cc93..e62c3bf 100644 --- a/client/src/main/java/ru/trader/model/support/StationUpdater.java +++ b/client/src/main/java/ru/trader/model/support/StationUpdater.java @@ -6,17 +6,19 @@ import org.slf4j.Logger; import org.slf4j.LoggerFactory; import ru.trader.controllers.MainController; import ru.trader.core.OFFER_TYPE; +import ru.trader.core.SERVICE_TYPE; import ru.trader.model.*; public class StationUpdater { private final static Logger LOG = LoggerFactory.getLogger(StationUpdater.class); + private final static SERVICE_TYPE[] SERVICE_TYPES = SERVICE_TYPE.values(); private final ObservableList offers; private final StringProperty name; - private final DoubleProperty x; - private final DoubleProperty y; - private final DoubleProperty z; + private final DoubleProperty distance; + private final BooleanProperty[] services; private final MarketModel market; + private SystemModel system; private StationModel station; private boolean updateOnly; @@ -25,9 +27,11 @@ public class StationUpdater { this.market = market; this.offers = BindingsHelper.observableList(MainController.getMarket().itemsProperty(), FakeOffer::new); this.name = new SimpleStringProperty(); - this.x = new SimpleDoubleProperty(0); - this.y = new SimpleDoubleProperty(0); - this.z = new SimpleDoubleProperty(0); + this.distance = new SimpleDoubleProperty(0); + this.services = new BooleanProperty[SERVICE_TYPES.length]; + for (int i = 0; i < services.length; i++) { + services[i] = new SimpleBooleanProperty(); + } this.updateOnly = false; } @@ -35,18 +39,20 @@ public class StationUpdater { LOG.debug("Init update of {}", station); this.station = station; this.system = system; + for (BooleanProperty service : services) { + service.set(false); + } if (station != null){ name.setValue(station.getName()); - x.setValue(system.getX()); - y.setValue(system.getY()); - z.setValue(system.getZ()); + distance.setValue(station.getDistance()); + for (SERVICE_TYPE service : station.getServices()) { + serviceProperty(service).set(true); + } station.getSells().forEach(this::fillOffer); station.getBuys().forEach(this::fillOffer); } else { name.setValue(""); - x.setValue(0); - y.setValue(0); - z.setValue(0); + distance.setValue(0); } } @@ -82,28 +88,16 @@ public class StationUpdater { return name; } - public double getX() { - return x.get(); + public double getDistance() { + return distance.get(); } - public DoubleProperty xProperty() { - return x; + public DoubleProperty distanceProperty() { + return distance; } - public double getY() { - return y.get(); - } - - public DoubleProperty yProperty() { - return y; - } - - public double getZ() { - return z.get(); - } - - public DoubleProperty zProperty() { - return z; + public BooleanProperty serviceProperty(SERVICE_TYPE service){ + return services[service.ordinal()]; } public void add(int index, ItemModel item){ @@ -112,16 +106,29 @@ public class StationUpdater { public void commit(){ LOG.debug("Save changes of {}", station); - system.setPosition(x.get(), y.get(), z.get()); if (isNew()) { Notificator notificator = market.getNotificator(); notificator.setAlert(false); station = system.add(name.get()); + station.setDistance(distance.get()); + for (int i = 0; i < services.length; i++) { + if (services[i].get()){ + station.addService(SERVICE_TYPES[i]); + } + } offers.forEach(FakeOffer::commit); notificator.setAlert(true); notificator.sendAdd(station); } else { station.setName(name.get()); + station.setDistance(distance.get()); + for (int i = 0; i < services.length; i++) { + if (services[i].get()){ + station.addService(SERVICE_TYPES[i]); + } else { + station.removeService(SERVICE_TYPES[i]); + } + } offers.forEach(FakeOffer::commit); } } @@ -268,11 +275,13 @@ public class StationUpdater { public void setSell(OfferModel sell) { this.sell = sell; sprice.set(sell.getPrice()); + supply.set(sell.getCount()); } public void setBuy(OfferModel buy) { this.buy = buy; bprice.set(buy.getPrice()); + demand.set(buy.getCount()); } public void reset(){ diff --git a/client/src/main/java/ru/trader/view/support/ViewUtils.java b/client/src/main/java/ru/trader/view/support/ViewUtils.java index 02b288d..b0ac561 100644 --- a/client/src/main/java/ru/trader/view/support/ViewUtils.java +++ b/client/src/main/java/ru/trader/view/support/ViewUtils.java @@ -19,6 +19,7 @@ public class ViewUtils { // Edit next cell public static void editNext(TableView tableView){ TableView.TableViewSelectionModel sm = tableView.getSelectionModel(); + if (!sm.isCellSelectionEnabled()) return; sm.selectNext(); ObservableList pos = sm.getSelectedCells(); for (TablePosition p : pos) { diff --git a/client/src/main/resources/lang/locale.properties b/client/src/main/resources/lang/locale.properties index de4baa0..5ad9346 100644 --- a/client/src/main/resources/lang/locale.properties +++ b/client/src/main/resources/lang/locale.properties @@ -1,3 +1,9 @@ +services.MARKET=Commodities +services.BLACK_MARKET=Black Market +services.REPAIR=Repair +services.MUNITION=Munition +services.OUTFIT=Outfit +services.SHIPYARD=Shipyard item.explosives=Explosives item.hydrogenfuel=Hydrogen Fuels item.mineraloil=Mineral Oil diff --git a/client/src/main/resources/lang/locale_en_US.properties b/client/src/main/resources/lang/locale_en_US.properties index b392f75..1b69a4e 100644 --- a/client/src/main/resources/lang/locale_en_US.properties +++ b/client/src/main/resources/lang/locale_en_US.properties @@ -72,6 +72,8 @@ oEditor.sell=Sell: oEditor.buy=Buy: # offers.fxml +offers.text.distance=Distance: +offers.text.services=Services: offers.pane.sell=Selling commodities offers.pane.buy=Buying commodities @@ -84,6 +86,9 @@ topOrders.title=TOP orders # vEditor.fxml vEditor.title.add=Add Station vEditor.title.edit=Edit Station +vEditor.text.distance=Distance (Ls) +vEditor.text.services=Services + # paths.fxml paths.title=Available routes @@ -112,3 +117,8 @@ settings.emdn.auto=Auto update (sec.): settings.performance=Performance settings.performance.segmentSize=Segment size (0 - auto): settings.performance.limit=Routes count: + +# sEditor.fxml +sEditor.title=Star systems editor +sEditor.text.orientates=Landmarks: +sEditor.table.distance=Distance (LY) diff --git a/client/src/main/resources/lang/locale_ru_RU.properties b/client/src/main/resources/lang/locale_ru_RU.properties index 160c5cd..a486b79 100644 --- a/client/src/main/resources/lang/locale_ru_RU.properties +++ b/client/src/main/resources/lang/locale_ru_RU.properties @@ -74,6 +74,8 @@ oEditor.sell=\u041F\u0440\u043E\u0434\u0430\u0436\u0430: oEditor.buy=\u041F\u043E\u043A\u0443\u043F\u043A\u0430: # 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 @@ -86,6 +88,8 @@ topOrders.title=TOP \u0437\u0430\u043A\u0430\u0437\u043E\u0432 # vEditor.fxml vEditor.title.add=\u0414\u043E\u0431\u0430\u0432\u043B\u0435\u043D\u0438\u0435 \u0441\u0442\u0430\u043D\u0446\u0438\u0438 vEditor.title.edit=\u0420\u0435\u0434\u0430\u043A\u0442\u0438\u0440\u043E\u0432\u0430\u043D\u0438\u0435 \u0441\u0442\u0430\u043D\u0446\u0438\u0438 +vEditor.text.distance=\u0414\u0438\u0441\u0442\u0430\u043D\u0446\u0438\u044F (Ls) +vEditor.text.services=\u0421\u0435\u0440\u0432\u0438\u0441\u044B # paths.fxml paths.title=\u0414\u043E\u0441\u0442\u0443\u043F\u043D\u044B\u0435 \u043C\u0430\u0440\u0448\u0440\u0443\u0442\u044B @@ -115,3 +119,7 @@ settings.performance=\u041F\u0440\u043E\u0438\u0437\u0432\u043E\u0434\u0438\u044 settings.performance.segmentSize=\u041C\u0430\u0440\u0448\u0440\u0443\u0442\u043E\u0432 \u0432 \u0441\u0435\u0433\u043C\u0435\u043D\u0442\u0435 (0 - \u0430\u0432\u0442\u043E): settings.performance.limit=\u041A\u043E\u043B-\u0432\u043E \u043C\u0430\u0440\u0448\u0440\u0443\u0442\u043E\u0432 \u043D\u0430 \u0432\u044B\u0432\u043E\u0434: +# sEditor.fxml +sEditor.title=\u0420\u0435\u0434\u0430\u043A\u0442\u043E\u0440 \u0437\u0432\u0435\u0437\u0434\u043D\u044B\u0445 \u0441\u0438\u0441\u0442\u0435\u043C +sEditor.text.orientates=\u041E\u0440\u0438\u0435\u043D\u0442\u0438\u0440\u044B: +sEditor.table.distance=\u0414\u0438\u0441\u0442\u0430\u043D\u0446\u0438\u044F (LY) diff --git a/client/src/main/resources/view/offers.fxml b/client/src/main/resources/view/offers.fxml index 19835bf..3ff2b03 100644 --- a/client/src/main/resources/view/offers.fxml +++ b/client/src/main/resources/view/offers.fxml @@ -22,7 +22,7 @@ - + @@ -38,7 +38,23 @@ - + + + + + + diff --git a/client/src/main/resources/view/sEditor.fxml b/client/src/main/resources/view/sEditor.fxml new file mode 100644 index 0000000..c27279e --- /dev/null +++ b/client/src/main/resources/view/sEditor.fxml @@ -0,0 +1,75 @@ + + + + + + + + + + + + + + + + + + + + + + + diff --git a/client/src/main/resources/view/vEditor.fxml b/client/src/main/resources/view/vEditor.fxml index f3101e3..cfc23be 100644 --- a/client/src/main/resources/view/vEditor.fxml +++ b/client/src/main/resources/view/vEditor.fxml @@ -14,13 +14,22 @@ vgap="10" hgap="4"> - -