- add localization support
- add english language
This commit is contained in:
@@ -9,6 +9,7 @@ import org.controlsfx.dialog.*;
|
|||||||
import org.slf4j.Logger;
|
import org.slf4j.Logger;
|
||||||
import org.slf4j.LoggerFactory;
|
import org.slf4j.LoggerFactory;
|
||||||
import ru.trader.controllers.Screeners;
|
import ru.trader.controllers.Screeners;
|
||||||
|
import ru.trader.view.support.Localization;
|
||||||
|
|
||||||
import javax.xml.stream.XMLStreamException;
|
import javax.xml.stream.XMLStreamException;
|
||||||
import java.io.File;
|
import java.io.File;
|
||||||
@@ -17,28 +18,16 @@ import java.io.IOException;
|
|||||||
import java.io.UnsupportedEncodingException;
|
import java.io.UnsupportedEncodingException;
|
||||||
import java.net.MalformedURLException;
|
import java.net.MalformedURLException;
|
||||||
import java.net.URL;
|
import java.net.URL;
|
||||||
|
import java.util.Locale;
|
||||||
|
|
||||||
public class Main extends Application {
|
public class Main extends Application {
|
||||||
private final static Logger LOG = LoggerFactory.getLogger(Main.class);
|
private final static Logger LOG = LoggerFactory.getLogger(Main.class);
|
||||||
|
private static Stage primaryStage;
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void start(Stage primaryStage) throws Exception {
|
public void start(Stage primaryStage) throws Exception {
|
||||||
primaryStage.setTitle("Trader");
|
Main.primaryStage = primaryStage;
|
||||||
primaryStage.setMinHeight(590);
|
loadMainScene();
|
||||||
primaryStage.setScene(new Scene(Screeners.newScreeners(Main.class.getResource("/view/main.fxml"),getUrl("style.css").toExternalForm())));
|
|
||||||
primaryStage.setOnCloseRequest((we)->{
|
|
||||||
try {
|
|
||||||
if (World.getMarket().isChange()){
|
|
||||||
Action res = Screeners.showConfirm("Изменения не были сохранены, сохранить?");
|
|
||||||
if (res == Dialog.Actions.YES) World.save();
|
|
||||||
else if (res == Dialog.Actions.CANCEL) we.consume();
|
|
||||||
}
|
|
||||||
Screeners.closeAll();
|
|
||||||
} catch (FileNotFoundException | UnsupportedEncodingException | XMLStreamException e) {
|
|
||||||
LOG.error("Ошибка при сохранении",e);
|
|
||||||
Screeners.showException(e);
|
|
||||||
}
|
|
||||||
});
|
|
||||||
loadResources();
|
loadResources();
|
||||||
primaryStage.show();
|
primaryStage.show();
|
||||||
}
|
}
|
||||||
@@ -61,6 +50,34 @@ public class Main extends Application {
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
public static void changeLocale(Locale locale) throws IOException {
|
||||||
|
Localization.setLocale(locale);
|
||||||
|
primaryStage.hide();
|
||||||
|
loadMainScene();
|
||||||
|
loadResources();
|
||||||
|
primaryStage.show();
|
||||||
|
}
|
||||||
|
|
||||||
|
private static void loadMainScene() throws IOException {
|
||||||
|
primaryStage.setTitle(Localization.getString("main.title"));
|
||||||
|
primaryStage.setMinHeight(590);
|
||||||
|
primaryStage.setScene(new Scene(Screeners.newScreeners(Main.class.getResource("/view/main.fxml"),getUrl("style.css").toExternalForm())));
|
||||||
|
primaryStage.setOnCloseRequest((we)->{
|
||||||
|
try {
|
||||||
|
if (World.getMarket().isChange()){
|
||||||
|
Action res = Screeners.showConfirm(Localization.getString("dialogs.save"));
|
||||||
|
if (res == Dialog.Actions.YES) World.save();
|
||||||
|
else if (res == Dialog.Actions.CANCEL) we.consume();
|
||||||
|
}
|
||||||
|
Screeners.closeAll();
|
||||||
|
} catch (FileNotFoundException | UnsupportedEncodingException | XMLStreamException e) {
|
||||||
|
LOG.error("Ошибка при сохранении",e);
|
||||||
|
Screeners.showException(e);
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
private static void loadResources() throws IOException {
|
private static void loadResources() throws IOException {
|
||||||
Screeners.loadItemDescStage(getUrl(("itemDesc.fxml")));
|
Screeners.loadItemDescStage(getUrl(("itemDesc.fxml")));
|
||||||
Screeners.loadVEditorStage(getUrl(("vEditor.fxml")));
|
Screeners.loadVEditorStage(getUrl(("vEditor.fxml")));
|
||||||
|
|||||||
@@ -3,22 +3,29 @@ package ru.trader.controllers;
|
|||||||
|
|
||||||
import javafx.event.ActionEvent;
|
import javafx.event.ActionEvent;
|
||||||
import javafx.fxml.FXML;
|
import javafx.fxml.FXML;
|
||||||
|
import javafx.scene.control.Menu;
|
||||||
|
import javafx.scene.control.RadioMenuItem;
|
||||||
|
import javafx.scene.control.ToggleGroup;
|
||||||
import javafx.scene.layout.BorderPane;
|
import javafx.scene.layout.BorderPane;
|
||||||
import javafx.stage.FileChooser;
|
import javafx.stage.FileChooser;
|
||||||
import org.controlsfx.dialog.Dialogs;
|
import org.controlsfx.dialog.Dialogs;
|
||||||
import org.slf4j.Logger;
|
import org.slf4j.Logger;
|
||||||
import org.slf4j.LoggerFactory;
|
import org.slf4j.LoggerFactory;
|
||||||
import org.xml.sax.SAXException;
|
import org.xml.sax.SAXException;
|
||||||
|
import ru.trader.Main;
|
||||||
import ru.trader.World;
|
import ru.trader.World;
|
||||||
import ru.trader.model.ItemModel;
|
import ru.trader.model.ItemModel;
|
||||||
import ru.trader.model.MarketModel;
|
import ru.trader.model.MarketModel;
|
||||||
|
import ru.trader.view.support.Localization;
|
||||||
|
|
||||||
import javax.xml.stream.XMLStreamException;
|
import javax.xml.stream.XMLStreamException;
|
||||||
import java.io.File;
|
import java.io.File;
|
||||||
import java.io.FileNotFoundException;
|
import java.io.FileNotFoundException;
|
||||||
import java.io.IOException;
|
import java.io.IOException;
|
||||||
import java.io.UnsupportedEncodingException;
|
import java.io.UnsupportedEncodingException;
|
||||||
|
import java.util.Locale;
|
||||||
import java.util.Optional;
|
import java.util.Optional;
|
||||||
|
import java.util.ResourceBundle;
|
||||||
|
|
||||||
public class MainController {
|
public class MainController {
|
||||||
private final static Logger LOG = LoggerFactory.getLogger(MainController.class);
|
private final static Logger LOG = LoggerFactory.getLogger(MainController.class);
|
||||||
@@ -30,11 +37,43 @@ public class MainController {
|
|||||||
@FXML
|
@FXML
|
||||||
private BorderPane mainPane;
|
private BorderPane mainPane;
|
||||||
|
|
||||||
|
@FXML
|
||||||
|
private Menu langs;
|
||||||
|
|
||||||
@FXML
|
@FXML
|
||||||
private OffersController offersController;
|
private OffersController offersController;
|
||||||
@FXML
|
@FXML
|
||||||
private ItemsController itemsController;
|
private ItemsController itemsController;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
@FXML
|
||||||
|
private void initialize() {
|
||||||
|
fillLangs();
|
||||||
|
}
|
||||||
|
|
||||||
|
private void fillLangs() {
|
||||||
|
ToggleGroup toggleGroup = new ToggleGroup();
|
||||||
|
for (Locale locale : Localization.getLocales()) {
|
||||||
|
ResourceBundle rb = Localization.getResources(locale);
|
||||||
|
RadioMenuItem mi = new RadioMenuItem(rb.getString("main.menu.file.language.item"));
|
||||||
|
mi.setToggleGroup(toggleGroup);
|
||||||
|
mi.setUserData(locale);
|
||||||
|
if (locale.equals(Localization.getCurrentLocale())) mi.setSelected(true);
|
||||||
|
langs.getItems().add(mi);
|
||||||
|
}
|
||||||
|
toggleGroup.selectedToggleProperty().addListener((cb, o, n) -> {
|
||||||
|
try {
|
||||||
|
if (n!=null)
|
||||||
|
Main.changeLocale((Locale) n.getUserData());
|
||||||
|
} catch (IOException e) {
|
||||||
|
LOG.error("Error on change locale to {}", n.getUserData());
|
||||||
|
LOG.error("",e);
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
public OffersController getOffersController() {
|
public OffersController getOffersController() {
|
||||||
return offersController;
|
return offersController;
|
||||||
}
|
}
|
||||||
@@ -83,8 +122,8 @@ public class MainController {
|
|||||||
|
|
||||||
public Optional<ItemModel> addItem(){
|
public Optional<ItemModel> addItem(){
|
||||||
Optional<String> res = Dialogs.create()
|
Optional<String> res = Dialogs.create()
|
||||||
.title("Добавление нового товара")
|
.title(Localization.getString("dialogs.addItem.title"))
|
||||||
.message("Введите название товара")
|
.message(Localization.getString("dialogs.addItem.message"))
|
||||||
.showTextInput();
|
.showTextInput();
|
||||||
ItemModel item = null;
|
ItemModel item = null;
|
||||||
if (res.isPresent()){
|
if (res.isPresent()){
|
||||||
|
|||||||
@@ -17,6 +17,7 @@ import ru.trader.model.OfferDescModel;
|
|||||||
import ru.trader.model.OfferModel;
|
import ru.trader.model.OfferModel;
|
||||||
import ru.trader.model.OrderModel;
|
import ru.trader.model.OrderModel;
|
||||||
import ru.trader.model.support.BindingsHelper;
|
import ru.trader.model.support.BindingsHelper;
|
||||||
|
import ru.trader.view.support.Localization;
|
||||||
|
|
||||||
import java.util.Collection;
|
import java.util.Collection;
|
||||||
|
|
||||||
@@ -75,7 +76,7 @@ public class OrdersController {
|
|||||||
|
|
||||||
init(offers, balance, max);
|
init(offers, balance, max);
|
||||||
|
|
||||||
Dialog dlg = new Dialog(parent, "Создание заказов");
|
Dialog dlg = new Dialog(parent, Localization.getString("orders.title"));
|
||||||
dlg.setContent(content);
|
dlg.setContent(content);
|
||||||
dlg.getActions().addAll(OK, Dialog.Actions.CANCEL);
|
dlg.getActions().addAll(OK, Dialog.Actions.CANCEL);
|
||||||
dlg.setResizable(false);
|
dlg.setResizable(false);
|
||||||
|
|||||||
@@ -10,6 +10,7 @@ import org.controlsfx.control.action.AbstractAction;
|
|||||||
import org.controlsfx.control.action.Action;
|
import org.controlsfx.control.action.Action;
|
||||||
import org.controlsfx.dialog.Dialog;
|
import org.controlsfx.dialog.Dialog;
|
||||||
import ru.trader.model.PathRouteModel;
|
import ru.trader.model.PathRouteModel;
|
||||||
|
import ru.trader.view.support.Localization;
|
||||||
|
|
||||||
import java.util.Collection;
|
import java.util.Collection;
|
||||||
|
|
||||||
@@ -41,7 +42,7 @@ public class PathsController {
|
|||||||
|
|
||||||
init(paths);
|
init(paths);
|
||||||
|
|
||||||
Dialog dlg = new Dialog(parent, String.format("Доступные маршруты"));
|
Dialog dlg = new Dialog(parent, Localization.getString("paths.title"));
|
||||||
dlg.setContent(content);
|
dlg.setContent(content);
|
||||||
dlg.getActions().addAll(OK, Dialog.Actions.CANCEL);
|
dlg.getActions().addAll(OK, Dialog.Actions.CANCEL);
|
||||||
dlg.setResizable(false);
|
dlg.setResizable(false);
|
||||||
|
|||||||
@@ -14,7 +14,7 @@ import ru.trader.view.support.NumberField;
|
|||||||
import ru.trader.view.support.RouteNode;
|
import ru.trader.view.support.RouteNode;
|
||||||
|
|
||||||
|
|
||||||
public class RoutersController {
|
public class RouterController {
|
||||||
|
|
||||||
@FXML
|
@FXML
|
||||||
private NumberField balance;
|
private NumberField balance;
|
||||||
@@ -10,6 +10,7 @@ import org.controlsfx.control.action.Action;
|
|||||||
import org.controlsfx.dialog.Dialogs;
|
import org.controlsfx.dialog.Dialogs;
|
||||||
import ru.trader.model.*;
|
import ru.trader.model.*;
|
||||||
import ru.trader.view.support.CustomBuilderFactory;
|
import ru.trader.view.support.CustomBuilderFactory;
|
||||||
|
import ru.trader.view.support.Localization;
|
||||||
|
|
||||||
import java.io.IOException;
|
import java.io.IOException;
|
||||||
import java.net.URL;
|
import java.net.URL;
|
||||||
@@ -35,7 +36,7 @@ public class Screeners {
|
|||||||
private static PathsController pathsController;
|
private static PathsController pathsController;
|
||||||
|
|
||||||
private static FXMLLoader initLoader(URL url){
|
private static FXMLLoader initLoader(URL url){
|
||||||
FXMLLoader loader = new FXMLLoader(url);
|
FXMLLoader loader = new FXMLLoader(url, Localization.getResources());
|
||||||
loader.setBuilderFactory(new CustomBuilderFactory());
|
loader.setBuilderFactory(new CustomBuilderFactory());
|
||||||
return loader;
|
return loader;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -13,6 +13,7 @@ import org.controlsfx.control.action.AbstractAction;
|
|||||||
import org.controlsfx.control.action.Action;
|
import org.controlsfx.control.action.Action;
|
||||||
import org.controlsfx.dialog.Dialog;
|
import org.controlsfx.dialog.Dialog;
|
||||||
import ru.trader.model.OrderModel;
|
import ru.trader.model.OrderModel;
|
||||||
|
import ru.trader.view.support.Localization;
|
||||||
|
|
||||||
import java.util.Collection;
|
import java.util.Collection;
|
||||||
|
|
||||||
@@ -49,7 +50,7 @@ public class TopOrdersController {
|
|||||||
|
|
||||||
init(orders);
|
init(orders);
|
||||||
|
|
||||||
Dialog dlg = new Dialog(parent, "TOP заказов");
|
Dialog dlg = new Dialog(parent, Localization.getString("topOrders.title"));
|
||||||
dlg.setContent(content);
|
dlg.setContent(content);
|
||||||
dlg.getActions().addAll(OK, Dialog.Actions.CANCEL);
|
dlg.getActions().addAll(OK, Dialog.Actions.CANCEL);
|
||||||
dlg.setResizable(false);
|
dlg.setResizable(false);
|
||||||
|
|||||||
@@ -9,7 +9,6 @@ import javafx.scene.Parent;
|
|||||||
import javafx.scene.control.TableColumn;
|
import javafx.scene.control.TableColumn;
|
||||||
import javafx.scene.control.TableView;
|
import javafx.scene.control.TableView;
|
||||||
import javafx.scene.control.TextField;
|
import javafx.scene.control.TextField;
|
||||||
import javafx.util.converter.DoubleStringConverter;
|
|
||||||
import org.controlsfx.control.ButtonBar;
|
import org.controlsfx.control.ButtonBar;
|
||||||
import org.controlsfx.control.action.AbstractAction;
|
import org.controlsfx.control.action.AbstractAction;
|
||||||
import org.controlsfx.control.action.Action;
|
import org.controlsfx.control.action.Action;
|
||||||
@@ -19,6 +18,7 @@ import org.slf4j.LoggerFactory;
|
|||||||
import ru.trader.core.OFFER_TYPE;
|
import ru.trader.core.OFFER_TYPE;
|
||||||
import ru.trader.model.*;
|
import ru.trader.model.*;
|
||||||
import ru.trader.model.support.BindingsHelper;
|
import ru.trader.model.support.BindingsHelper;
|
||||||
|
import ru.trader.view.support.Localization;
|
||||||
import ru.trader.view.support.NumberField;
|
import ru.trader.view.support.NumberField;
|
||||||
import ru.trader.view.support.PriceStringConverter;
|
import ru.trader.view.support.PriceStringConverter;
|
||||||
import ru.trader.view.support.ViewUtils;
|
import ru.trader.view.support.ViewUtils;
|
||||||
@@ -32,7 +32,7 @@ public class VendorEditorController {
|
|||||||
|
|
||||||
private VendorModel vendor;
|
private VendorModel vendor;
|
||||||
|
|
||||||
private final Action actSave = new AbstractAction("Сохранить") {
|
private final Action actSave = new AbstractAction(Localization.getString("vEditor.save")) {
|
||||||
{
|
{
|
||||||
ButtonBar.setType(this, ButtonBar.ButtonType.OK_DONE);
|
ButtonBar.setType(this, ButtonBar.ButtonType.OK_DONE);
|
||||||
}
|
}
|
||||||
@@ -85,7 +85,7 @@ public class VendorEditorController {
|
|||||||
if (vendor != null) {
|
if (vendor != null) {
|
||||||
fill();
|
fill();
|
||||||
}
|
}
|
||||||
Dialog dlg = new Dialog(parent, vendor == null ? "Добавление станции" : "Редактирование станции");
|
Dialog dlg = new Dialog(parent, Localization.getString(vendor == null ? "vEditor.title.add" : "vEditor.title.edit"));
|
||||||
dlg.setContent(content);
|
dlg.setContent(content);
|
||||||
dlg.getActions().addAll(actSave, Dialog.Actions.CANCEL);
|
dlg.getActions().addAll(actSave, Dialog.Actions.CANCEL);
|
||||||
dlg.setResizable(false);
|
dlg.setResizable(false);
|
||||||
|
|||||||
@@ -0,0 +1,76 @@
|
|||||||
|
package ru.trader.view.support;
|
||||||
|
|
||||||
|
import ru.trader.Main;
|
||||||
|
|
||||||
|
import java.io.File;
|
||||||
|
import java.net.MalformedURLException;
|
||||||
|
import java.net.URL;
|
||||||
|
import java.net.URLClassLoader;
|
||||||
|
import java.util.Arrays;
|
||||||
|
import java.util.Collection;
|
||||||
|
import java.util.Locale;
|
||||||
|
import java.util.ResourceBundle;
|
||||||
|
|
||||||
|
public class Localization {
|
||||||
|
private static final Locale DEFAULT = new Locale("ru", "RU");
|
||||||
|
private static final ClassLoader loader = getLoader();
|
||||||
|
private static final Locale[] supportedLocales = {
|
||||||
|
DEFAULT,
|
||||||
|
new Locale("en", "US")
|
||||||
|
};
|
||||||
|
|
||||||
|
private static ResourceBundle rb = ResourceBundle.getBundle("locale", DEFAULT, loader);
|
||||||
|
private static Locale locale = DEFAULT;
|
||||||
|
|
||||||
|
|
||||||
|
static {
|
||||||
|
setLocale(Locale.getDefault());
|
||||||
|
}
|
||||||
|
|
||||||
|
private static Locale getSupported(Locale locale){
|
||||||
|
for (Locale l : supportedLocales) {
|
||||||
|
if (l.getLanguage().equals(locale.getLanguage()))
|
||||||
|
return l;
|
||||||
|
}
|
||||||
|
return DEFAULT;
|
||||||
|
}
|
||||||
|
|
||||||
|
private static ClassLoader getLoader() {
|
||||||
|
try {
|
||||||
|
URL url = Main.class.getResource("/lang/");
|
||||||
|
File file = new File("lang");
|
||||||
|
if (file.exists() && file.isDirectory())
|
||||||
|
url = file.toURI().toURL();
|
||||||
|
return new URLClassLoader(new URL[]{url});
|
||||||
|
} catch (MalformedURLException e) {
|
||||||
|
return ClassLoader.getSystemClassLoader();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
public static void setLocale(Locale locale){
|
||||||
|
Locale.setDefault(locale);
|
||||||
|
Localization.locale = locale;
|
||||||
|
rb = getResources(locale);
|
||||||
|
}
|
||||||
|
|
||||||
|
public static ResourceBundle getResources(Locale locale){
|
||||||
|
return ResourceBundle.getBundle("locale", getSupported(locale), loader);
|
||||||
|
}
|
||||||
|
|
||||||
|
public static ResourceBundle getResources(){
|
||||||
|
return rb;
|
||||||
|
}
|
||||||
|
|
||||||
|
public static Collection<Locale> getLocales(){
|
||||||
|
return Arrays.asList(supportedLocales);
|
||||||
|
}
|
||||||
|
|
||||||
|
public static String getString(String key){
|
||||||
|
return rb.getString(key);
|
||||||
|
}
|
||||||
|
|
||||||
|
public static Locale getCurrentLocale() {
|
||||||
|
return locale;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
94
client/src/main/resources/lang/locale_en_US.properties
Normal file
94
client/src/main/resources/lang/locale_en_US.properties
Normal file
@@ -0,0 +1,94 @@
|
|||||||
|
# Market
|
||||||
|
market.vendors=Stations
|
||||||
|
market.items=Commods
|
||||||
|
market.offers=Offers
|
||||||
|
market.item.name=Commodity
|
||||||
|
market.vendor.name=Station
|
||||||
|
|
||||||
|
# Offer
|
||||||
|
market.offer.buy=Buy
|
||||||
|
market.offer.sell=Sell
|
||||||
|
market.offer.price=Price
|
||||||
|
market.offer.min=Min
|
||||||
|
market.offer.avg=Avg
|
||||||
|
market.offer.max=Max
|
||||||
|
market.offer.max.full=Maximum
|
||||||
|
market.offer.best=Best
|
||||||
|
|
||||||
|
# Order
|
||||||
|
market.order.count=Count
|
||||||
|
market.order.profit=Profit
|
||||||
|
market.order.buyer=Buyer
|
||||||
|
market.order.seller=Seller
|
||||||
|
market.order.distance=Distance
|
||||||
|
|
||||||
|
# Route
|
||||||
|
routes=Routes
|
||||||
|
routes.path=Path
|
||||||
|
routes.jumps=Jumps
|
||||||
|
routes.refills=Refills
|
||||||
|
routes.lands=Landings
|
||||||
|
|
||||||
|
# main.fxml
|
||||||
|
main.title=Trader
|
||||||
|
main.menu.file=File
|
||||||
|
main.menu.file.save=Save
|
||||||
|
main.menu.file.import=Import...
|
||||||
|
main.menu.file.language=Language
|
||||||
|
main.menu.file.language.item=English
|
||||||
|
main.menu.edit=Edit
|
||||||
|
main.menu.edit.addStation=Add Station
|
||||||
|
main.menu.edit.addItem=Add Commodity
|
||||||
|
main.menu.edit.editStation=Edit Station
|
||||||
|
|
||||||
|
# save confirm dialog
|
||||||
|
dialogs.save=Changes were not saved, save changes?
|
||||||
|
|
||||||
|
# add item dialog
|
||||||
|
dialogs.addItem.title=Adding new commodity
|
||||||
|
dialogs.addItem.message=Enter commodity name
|
||||||
|
|
||||||
|
# items.fxml
|
||||||
|
|
||||||
|
# itemDesc.fxml
|
||||||
|
itemDesc.sellers=Sellers:
|
||||||
|
itemDesc.buyers=Buyers:
|
||||||
|
|
||||||
|
# oEditor.fxml
|
||||||
|
oEditor.sell=Sell:
|
||||||
|
oEditor.buy=Buy:
|
||||||
|
|
||||||
|
# offers.fxml
|
||||||
|
offers.pane.sell=Selling commodities
|
||||||
|
offers.pane.buy=Buying commodities
|
||||||
|
|
||||||
|
# orders.fxml
|
||||||
|
orders.title=Create orders
|
||||||
|
|
||||||
|
# topOrders.fxml
|
||||||
|
topOrders.title=TOP orders
|
||||||
|
|
||||||
|
# vEditor.fxml
|
||||||
|
vEditor.save=Save
|
||||||
|
vEditor.title.add=Add Station
|
||||||
|
vEditor.title.edit=Edit Station
|
||||||
|
|
||||||
|
# paths.fxml
|
||||||
|
paths.title=Available routes
|
||||||
|
|
||||||
|
# router.fxml
|
||||||
|
router.pane.ship=Ship parameters
|
||||||
|
router.pane.ship.balance=Balance:
|
||||||
|
router.pane.ship.cargo=Cargo:
|
||||||
|
router.pane.ship.fueltank=Fuel(LY):
|
||||||
|
router.pane.ship.distance=Distance(LY):
|
||||||
|
router.pane.route=Route parameters
|
||||||
|
router.pane.route.from=From:
|
||||||
|
router.pane.route.to=To:
|
||||||
|
router.pane.route.jumps=Jumps:
|
||||||
|
route.button.edit=Edit
|
||||||
|
route.button.remove=Remove
|
||||||
|
route.button.clear=Clear
|
||||||
|
route.button.top=TOP 100
|
||||||
|
router.pane.total=Total
|
||||||
|
router.pane.total.profit=Profit:
|
||||||
94
client/src/main/resources/lang/locale_ru_RU.properties
Normal file
94
client/src/main/resources/lang/locale_ru_RU.properties
Normal file
@@ -0,0 +1,94 @@
|
|||||||
|
# Market
|
||||||
|
market.vendors=\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.vendor.name=\u0421\u0442\u0430\u043D\u0446\u0438\u044F
|
||||||
|
|
||||||
|
# Offer
|
||||||
|
market.offer.buy=\u041F\u043E\u043A\u0443\u043F\u043A\u0430
|
||||||
|
market.offer.sell=\u041F\u0440\u043E\u0434\u0430\u0436\u0430
|
||||||
|
market.offer.price=\u0426\u0435\u043D\u0430
|
||||||
|
market.offer.min=\u041C\u0438\u043D.
|
||||||
|
market.offer.avg=\u0421\u0440.
|
||||||
|
market.offer.max=\u041C\u0430\u043A\u0441.
|
||||||
|
market.offer.max.full=\u041C\u0430\u043A\u0441\u0438\u043C\u0443\u043C
|
||||||
|
market.offer.best=\u041B\u0443\u0447\u0448\u0430\u044F
|
||||||
|
|
||||||
|
# Order
|
||||||
|
market.order.count=\u041A\u043E\u043B-\u0432\u043E
|
||||||
|
market.order.profit=\u041F\u0440\u0438\u0431\u044B\u043B\u044C
|
||||||
|
market.order.buyer=\u041F\u043E\u043A\u0443\u043F\u0430\u0442\u0435\u043B\u044C
|
||||||
|
market.order.seller=\u041F\u0440\u043E\u0434\u0430\u0432\u0435\u0446
|
||||||
|
market.order.distance=\u0414\u0438\u0441\u0442\u0430\u043D\u0446\u0438\u044F
|
||||||
|
|
||||||
|
# Route
|
||||||
|
routes=\u041C\u0430\u0440\u0448\u0440\u0443\u0442\u044B
|
||||||
|
routes.path=\u041F\u0443\u0442\u044C
|
||||||
|
routes.jumps=\u041F\u0440\u044B\u0436\u043A\u043E\u0432
|
||||||
|
routes.refills=\u0417\u0430\u043F\u0440\u0430\u0432\u043E\u043A
|
||||||
|
routes.lands=\u041F\u043E\u0441\u0430\u0434\u043E\u043A
|
||||||
|
|
||||||
|
# main.fxml
|
||||||
|
main.title=\u0422\u043E\u0440\u0433\u043E\u0439\u0434
|
||||||
|
main.menu.file=\u0424\u0430\u0439\u043B
|
||||||
|
main.menu.file.save=\u0421\u043E\u0445\u0440\u0430\u043D\u0438\u0442\u044C
|
||||||
|
main.menu.file.import=\u0418\u043C\u043F\u043E\u0440\u0442...
|
||||||
|
main.menu.file.language=\u042F\u0437\u044B\u043A
|
||||||
|
main.menu.file.language.item=\u0420\u0443\u0441\u0441\u043A\u0438\u0439
|
||||||
|
main.menu.edit=\u041F\u0440\u0430\u0432\u043A\u0430
|
||||||
|
main.menu.edit.addStation=\u0414\u043E\u0431\u0430\u0432\u0438\u0442\u044C \u0441\u0442\u0430\u043D\u0446\u0438\u044E
|
||||||
|
main.menu.edit.addItem=\u0414\u043E\u0431\u0430\u0432\u0438\u0442\u044C \u0442\u043E\u0432\u0430\u0440
|
||||||
|
main.menu.edit.editStation=\u0420\u0435\u0434\u0430\u043A\u0442\u0438\u0440\u043E\u0432\u0430\u0442\u044C \u0441\u0442\u0430\u043D\u0446\u0438\u044E
|
||||||
|
|
||||||
|
# save confirm dialog
|
||||||
|
dialogs.save=\u0418\u0437\u043C\u0435\u043D\u0435\u043D\u0438\u044F \u043D\u0435 \u0431\u044B\u043B\u0438 \u0441\u043E\u0445\u0440\u0430\u043D\u0435\u043D\u044B, \u0441\u043E\u0445\u0440\u0430\u043D\u0438\u0442\u044C?
|
||||||
|
|
||||||
|
# add item dialog
|
||||||
|
dialogs.addItem.title=\u0414\u043E\u0431\u0430\u0432\u043B\u0435\u043D\u0438\u0435 \u043D\u043E\u0432\u043E\u0433\u043E \u0442\u043E\u0432\u0430\u0440\u0430
|
||||||
|
dialogs.addItem.message=\u0412\u0432\u0435\u0434\u0438\u0442\u0435 \u043D\u0430\u0437\u0432\u0430\u043D\u0438\u0435 \u0442\u043E\u0432\u0430\u0440\u0430
|
||||||
|
|
||||||
|
# items.fxml
|
||||||
|
|
||||||
|
# itemDesc.fxml
|
||||||
|
itemDesc.sellers=\u041F\u0440\u043E\u0434\u0430\u0432\u0446\u044B:
|
||||||
|
itemDesc.buyers=\u041F\u043E\u043A\u0443\u043F\u0430\u0442\u0435\u043B\u0438:
|
||||||
|
|
||||||
|
# oEditor.fxml
|
||||||
|
oEditor.sell=\u041F\u0440\u043E\u0434\u0430\u0436\u0430:
|
||||||
|
oEditor.buy=\u041F\u043E\u043A\u0443\u043F\u043A\u0430:
|
||||||
|
|
||||||
|
# offers.fxml
|
||||||
|
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
|
||||||
|
|
||||||
|
# orders.fxml
|
||||||
|
orders.title=\u0421\u043E\u0437\u0434\u0430\u043D\u0438\u0435 \u0437\u0430\u043A\u0430\u0437\u043E\u0432
|
||||||
|
|
||||||
|
# topOrders.fxml
|
||||||
|
topOrders.title=TOP \u0437\u0430\u043A\u0430\u0437\u043E\u0432
|
||||||
|
|
||||||
|
# vEditor.fxml
|
||||||
|
vEditor.save=\u0421\u043E\u0445\u0440\u0430\u043D\u0438\u0442\u044C
|
||||||
|
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
|
||||||
|
|
||||||
|
# paths.fxml
|
||||||
|
paths.title=\u0414\u043E\u0441\u0442\u0443\u043F\u043D\u044B\u0435 \u043C\u0430\u0440\u0448\u0440\u0443\u0442\u044B
|
||||||
|
|
||||||
|
# router.fxml
|
||||||
|
router.pane.ship=\u041F\u0430\u0440\u0430\u043C\u0435\u0442\u0440\u044B \u043A\u043E\u0440\u0430\u0431\u043B\u044F
|
||||||
|
router.pane.ship.balance=\u0411\u0430\u043B\u0430\u043D\u0441:
|
||||||
|
router.pane.ship.cargo=\u0422\u0440\u044E\u043C:
|
||||||
|
router.pane.ship.fueltank=\u0417\u0430\u043F\u0430\u0441 \u0442\u043E\u043F\u043B\u0438\u0432\u0430(LY):
|
||||||
|
router.pane.ship.distance=\u0414\u0438\u0441\u0442\u0430\u043D\u0446\u0438\u044F \u043F\u0440\u044B\u0436\u043A\u0430(LY):
|
||||||
|
router.pane.route=\u041F\u0430\u0440\u0430\u043C\u0435\u0442\u0440\u044B \u043C\u0430\u0440\u0448\u0440\u0443\u0442\u0430
|
||||||
|
router.pane.route.from=\u041E\u0442:
|
||||||
|
router.pane.route.to=\u0414\u043E:
|
||||||
|
router.pane.route.jumps=\u041F\u0440\u044B\u0436\u043A\u043E\u0432:
|
||||||
|
route.button.edit=\u0418\u0437\u043C\u0435\u043D\u0438\u0442\u044C
|
||||||
|
route.button.remove=\u0423\u0434\u0430\u043B\u0438\u0442\u044C
|
||||||
|
route.button.clear=\u041E\u0447\u0438\u0441\u0442\u0438\u0442\u044C
|
||||||
|
route.button.top=TOP 100
|
||||||
|
router.pane.total=\u0418\u0442\u043E\u0433\u043E
|
||||||
|
router.pane.total.profit=\u041F\u0440\u0438\u0431\u044B\u043B\u044C:
|
||||||
19
client/src/main/resources/lang/ru_Ru.properties
Normal file
19
client/src/main/resources/lang/ru_Ru.properties
Normal file
@@ -0,0 +1,19 @@
|
|||||||
|
# main.fxml
|
||||||
|
main.menu.file=\uFFFD\uFFFD\uFFFD\uFFFD
|
||||||
|
main.menu.file.save=\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD
|
||||||
|
main.menu.file.import=\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD...
|
||||||
|
main.menu.file.language=\uFFFD\uFFFD\uFFFD\uFFFD
|
||||||
|
main.menu.file.language.item=\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD
|
||||||
|
main.menu.edit=\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD
|
||||||
|
main.menu.edit.addStation=\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD \uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD
|
||||||
|
main.menu.edit.addItem=\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD \uFFFD\uFFFD\uFFFD\uFFFD\uFFFD
|
||||||
|
main.menu.edit.editStation=\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD \uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD
|
||||||
|
main.tab.items=\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD
|
||||||
|
main.tab.stations=\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD
|
||||||
|
main.tab.routes=\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD
|
||||||
|
|
||||||
|
# add item dialog
|
||||||
|
dialogs.addItem.title=\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD \uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD \uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD
|
||||||
|
dialogs.addItem.message=\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD \uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD \uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD
|
||||||
|
|
||||||
|
|
||||||
@@ -10,11 +10,11 @@
|
|||||||
spacing="4" >
|
spacing="4" >
|
||||||
<fx:define><Insets fx:id="vbox_margin" left="6" top="3" bottom="3"/></fx:define>
|
<fx:define><Insets fx:id="vbox_margin" left="6" top="3" bottom="3"/></fx:define>
|
||||||
|
|
||||||
<Label text="Продавцы:" VBox.margin="$vbox_margin"/>
|
<Label text="%itemDesc.sellers" VBox.margin="$vbox_margin"/>
|
||||||
<ListView fx:id="seller" maxHeight="200.0">
|
<ListView fx:id="seller" maxHeight="200.0">
|
||||||
<cellFactory><OfferListCell/></cellFactory>
|
<cellFactory><OfferListCell/></cellFactory>
|
||||||
</ListView>
|
</ListView>
|
||||||
<Label text="Покупатели:" VBox.margin="$vbox_margin"/>
|
<Label text="%itemDesc.buyers" VBox.margin="$vbox_margin"/>
|
||||||
<ListView fx:id="buyer" maxHeight="200.0">
|
<ListView fx:id="buyer" maxHeight="200.0">
|
||||||
<cellFactory><OfferListCell/></cellFactory>
|
<cellFactory><OfferListCell/></cellFactory>
|
||||||
</ListView>
|
</ListView>
|
||||||
|
|||||||
@@ -12,46 +12,46 @@
|
|||||||
fx:controller="ru.trader.controllers.ItemsController">
|
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="1095.0">
|
||||||
<columns>
|
<columns>
|
||||||
<TableColumn editable="true" minWidth="200.0" text="Товар">
|
<TableColumn editable="true" minWidth="200.0" text="%market.item.name">
|
||||||
<cellValueFactory><PropertyValueFactory property="name"/></cellValueFactory>
|
<cellValueFactory><PropertyValueFactory property="name"/></cellValueFactory>
|
||||||
</TableColumn>
|
</TableColumn>
|
||||||
<TableColumn editable="true" resizable="false" text="Покупка">
|
<TableColumn editable="true" resizable="false" text="%market.offer.buy">
|
||||||
<columns>
|
<columns>
|
||||||
<TableColumn minWidth="120.0" text="Мин.">
|
<TableColumn minWidth="120.0" text="%market.offer.min">
|
||||||
<cellValueFactory><OfferCellValueImpl property="minSell"/></cellValueFactory>
|
<cellValueFactory><OfferCellValueImpl property="minSell"/></cellValueFactory>
|
||||||
</TableColumn>
|
</TableColumn>
|
||||||
<TableColumn minWidth="80.0" text="Ср.">
|
<TableColumn minWidth="80.0" text="%market.offer.avg">
|
||||||
<cellFactory><DoubleCell/></cellFactory>
|
<cellFactory><DoubleCell/></cellFactory>
|
||||||
<cellValueFactory><PropertyValueFactory property="avgSell"/></cellValueFactory>
|
<cellValueFactory><PropertyValueFactory property="avgSell"/></cellValueFactory>
|
||||||
</TableColumn>
|
</TableColumn>
|
||||||
<TableColumn minWidth="120.0" text="Макс.">
|
<TableColumn minWidth="120.0" text="%market.offer.max">
|
||||||
<cellValueFactory><OfferCellValueImpl property="maxSell"/></cellValueFactory>
|
<cellValueFactory><OfferCellValueImpl property="maxSell"/></cellValueFactory>
|
||||||
</TableColumn>
|
</TableColumn>
|
||||||
</columns>
|
</columns>
|
||||||
</TableColumn>
|
</TableColumn>
|
||||||
<TableColumn editable="true" resizable="false" text="Продажа">
|
<TableColumn editable="true" resizable="false" text="%market.offer.sell">
|
||||||
<columns>
|
<columns>
|
||||||
<TableColumn minWidth="120.0" text="Мин.">
|
<TableColumn minWidth="120.0" text="%market.offer.min">
|
||||||
<cellValueFactory><OfferCellValueImpl property="minBuy"/></cellValueFactory>
|
<cellValueFactory><OfferCellValueImpl property="minBuy"/></cellValueFactory>
|
||||||
</TableColumn>
|
</TableColumn>
|
||||||
<TableColumn minWidth="80.0" text="Ср.">
|
<TableColumn minWidth="80.0" text="%market.offer.avg">
|
||||||
<cellFactory><DoubleCell/></cellFactory>
|
<cellFactory><DoubleCell/></cellFactory>
|
||||||
<cellValueFactory><PropertyValueFactory property="avgBuy"/></cellValueFactory>
|
<cellValueFactory><PropertyValueFactory property="avgBuy"/></cellValueFactory>
|
||||||
</TableColumn>
|
</TableColumn>
|
||||||
<TableColumn minWidth="120.0" text="Макс.">
|
<TableColumn minWidth="120.0" text="%market.offer.max">
|
||||||
<cellValueFactory><OfferCellValueImpl property="maxBuy"/></cellValueFactory>
|
<cellValueFactory><OfferCellValueImpl property="maxBuy"/></cellValueFactory>
|
||||||
</TableColumn>
|
</TableColumn>
|
||||||
</columns>
|
</columns>
|
||||||
</TableColumn>
|
</TableColumn>
|
||||||
<TableColumn editable="true" resizable="false" text="Прибыль">
|
<TableColumn editable="true" resizable="false" text="%market.order.profit">
|
||||||
<columns>
|
<columns>
|
||||||
<TableColumn fx:id="minProfit" minWidth="80.0" text="Мин.">
|
<TableColumn fx:id="minProfit" minWidth="80.0" text="%market.offer.min">
|
||||||
<cellFactory><DoubleCell/></cellFactory>
|
<cellFactory><DoubleCell/></cellFactory>
|
||||||
</TableColumn>
|
</TableColumn>
|
||||||
<TableColumn fx:id="avgProfit" minWidth="80.0" text="Ср.">
|
<TableColumn fx:id="avgProfit" minWidth="80.0" text="%market.offer.avg">
|
||||||
<cellFactory><DoubleCell/></cellFactory>
|
<cellFactory><DoubleCell/></cellFactory>
|
||||||
</TableColumn>
|
</TableColumn>
|
||||||
<TableColumn fx:id="maxProfit" minWidth="80.0" text="Макс." sortType="DESCENDING">
|
<TableColumn fx:id="maxProfit" minWidth="80.0" text="%market.offer.max" sortType="DESCENDING">
|
||||||
<cellFactory><DoubleCell/></cellFactory>
|
<cellFactory><DoubleCell/></cellFactory>
|
||||||
</TableColumn>
|
</TableColumn>
|
||||||
</columns>
|
</columns>
|
||||||
|
|||||||
@@ -9,27 +9,28 @@
|
|||||||
>
|
>
|
||||||
<top>
|
<top>
|
||||||
<MenuBar>
|
<MenuBar>
|
||||||
<Menu text="Файл">
|
<Menu text="%main.menu.file">
|
||||||
<MenuItem text="Сохранить" onAction="#save"/>
|
<MenuItem text="%main.menu.file.save" onAction="#save"/>
|
||||||
<MenuItem text="Импорт..." onAction="#importWorld"/>
|
<MenuItem text="%main.menu.file.import" onAction="#importWorld"/>
|
||||||
|
<Menu fx:id="langs" text="%main.menu.file.language"/>
|
||||||
</Menu>
|
</Menu>
|
||||||
<Menu text="Правка">
|
<Menu text="%main.menu.edit">
|
||||||
<MenuItem text="Добавить станцию" onAction="#addVendor"/>
|
<MenuItem text="%main.menu.edit.addStation" onAction="#addVendor"/>
|
||||||
<MenuItem text="Добавить товар" onAction="#addItem"/>
|
<MenuItem text="%main.menu.edit.addItem" onAction="#addItem"/>
|
||||||
<MenuItem text="Редактировать станцию" onAction="#editVendor"/>
|
<MenuItem text="%main.menu.edit.editStation" onAction="#editVendor"/>
|
||||||
</Menu>
|
</Menu>
|
||||||
</MenuBar>
|
</MenuBar>
|
||||||
</top>
|
</top>
|
||||||
<center>
|
<center>
|
||||||
<TabPane tabClosingPolicy="UNAVAILABLE" BorderPane.alignment="CENTER">
|
<TabPane tabClosingPolicy="UNAVAILABLE" BorderPane.alignment="CENTER">
|
||||||
<Tab text="Товары">
|
<Tab text="%market.items">
|
||||||
<fx:include fx:id="items" source="items.fxml"/>
|
<fx:include fx:id="items" source="items.fxml"/>
|
||||||
</Tab>
|
</Tab>
|
||||||
<Tab text="Станции">
|
<Tab text="%market.vendors">
|
||||||
<fx:include fx:id="offers" source="offers.fxml"/>
|
<fx:include fx:id="offers" source="offers.fxml"/>
|
||||||
</Tab>
|
</Tab>
|
||||||
<Tab text="Маршруты">
|
<Tab text="%routes">
|
||||||
<fx:include source="routers.fxml"/>
|
<fx:include source="router.fxml"/>
|
||||||
</Tab>
|
</Tab>
|
||||||
</TabPane>
|
</TabPane>
|
||||||
</center>
|
</center>
|
||||||
|
|||||||
@@ -8,9 +8,9 @@
|
|||||||
fx:controller="ru.trader.controllers.OffersEditorController">
|
fx:controller="ru.trader.controllers.OffersEditorController">
|
||||||
<Label fx:id="name"/>
|
<Label fx:id="name"/>
|
||||||
<HBox>
|
<HBox>
|
||||||
<Label text="Продажа:"/>
|
<Label text="%oEditor.sell"/>
|
||||||
<NumberField fx:id="sell"/>
|
<NumberField fx:id="sell"/>
|
||||||
<Label text="Покупка:"/>
|
<Label text="%oEditor.buy"/>
|
||||||
<NumberField fx:id="buy"/>
|
<NumberField fx:id="buy"/>
|
||||||
</HBox>
|
</HBox>
|
||||||
</VBox>
|
</VBox>
|
||||||
|
|||||||
@@ -11,39 +11,47 @@
|
|||||||
<?import ru.trader.view.support.cells.DoubleCell?>
|
<?import ru.trader.view.support.cells.DoubleCell?>
|
||||||
<HBox xmlns="http://javafx.com/javafx/8" xmlns:fx="http://javafx.com/fxml/1"
|
<HBox xmlns="http://javafx.com/javafx/8" xmlns:fx="http://javafx.com/fxml/1"
|
||||||
fx:controller="ru.trader.controllers.OffersController">
|
fx:controller="ru.trader.controllers.OffersController">
|
||||||
<TitledPane text="Станции" minWidth="250" prefHeight="510" collapsible="false">
|
<TitledPane text="%market.vendors" minWidth="250" prefHeight="510" collapsible="false">
|
||||||
<ListView fx:id="vendors" />
|
<ListView fx:id="vendors" />
|
||||||
</TitledPane>
|
</TitledPane>
|
||||||
|
|
||||||
<Accordion HBox.hgrow="ALWAYS">
|
<Accordion HBox.hgrow="ALWAYS">
|
||||||
<panes>
|
<panes>
|
||||||
<TitledPane fx:id="sells" animated="false" text="Продаваемые товары">
|
<TitledPane fx:id="sells" animated="false" text="%offers.pane.sell">
|
||||||
<TableView fx:id="tblSell" editable="true">
|
<TableView fx:id="tblSell" editable="true">
|
||||||
<columns>
|
<columns>
|
||||||
<TableColumn minWidth="230.0" text="Товар">
|
<TableColumn minWidth="230.0" text="%market.item.name">
|
||||||
<cellValueFactory><PropertyValueFactory property="name"/></cellValueFactory>
|
<cellValueFactory><PropertyValueFactory property="name"/></cellValueFactory>
|
||||||
</TableColumn>
|
</TableColumn>
|
||||||
<TableColumn minWidth="110.0" text="Цена" onEditCommit="#editPrice">
|
<TableColumn minWidth="110.0" text="%market.offer.price" onEditCommit="#editPrice">
|
||||||
<cellFactory><PriceCellImpl/></cellFactory>
|
<cellFactory><PriceCellImpl/></cellFactory>
|
||||||
<cellValueFactory><PropertyValueFactory property="price"/></cellValueFactory>
|
<cellValueFactory><PropertyValueFactory property="price"/></cellValueFactory>
|
||||||
</TableColumn>
|
</TableColumn>
|
||||||
<TableColumn fx:id="sortSell" minWidth="80.0" text="Прибыль" sortType="DESCENDING">
|
<TableColumn fx:id="sortSell" minWidth="90.0" text="%market.order.profit" sortType="DESCENDING">
|
||||||
<cellFactory><DoubleCell/></cellFactory>
|
<cellFactory><DoubleCell/></cellFactory>
|
||||||
<cellValueFactory><PropertyValueFactory property="profit"/></cellValueFactory>
|
<cellValueFactory><PropertyValueFactory property="profit"/></cellValueFactory>
|
||||||
</TableColumn>
|
</TableColumn>
|
||||||
<TableColumn minWidth="80.0" text="AVG SELL">
|
<TableColumn text="%market.offer.avg">
|
||||||
<cellFactory><DoubleCell/></cellFactory>
|
<columns>
|
||||||
<cellValueFactory><PropertyValueFactory property="avgSell"/></cellValueFactory>
|
<TableColumn minWidth="80.0" text="%market.offer.sell">
|
||||||
|
<cellFactory><DoubleCell/></cellFactory>
|
||||||
|
<cellValueFactory><PropertyValueFactory property="avgSell"/></cellValueFactory>
|
||||||
|
</TableColumn>
|
||||||
|
<TableColumn minWidth="80.0" text="%market.offer.buy">
|
||||||
|
<cellFactory><DoubleCell/></cellFactory>
|
||||||
|
<cellValueFactory><PropertyValueFactory property="avgBuy"/></cellValueFactory>
|
||||||
|
</TableColumn>
|
||||||
|
</columns>
|
||||||
</TableColumn>
|
</TableColumn>
|
||||||
<TableColumn minWidth="80.0" text="AVG BUY">
|
<TableColumn text="%market.offer.best">
|
||||||
<cellFactory><DoubleCell/></cellFactory>
|
<columns>
|
||||||
<cellValueFactory><PropertyValueFactory property="avgBuy"/></cellValueFactory>
|
<TableColumn minWidth="120.0" text="%market.offer.sell">
|
||||||
</TableColumn>
|
<cellValueFactory><OfferCellValueImpl property="bestSell"/></cellValueFactory>
|
||||||
<TableColumn minWidth="120.0" text="BEST SELL">
|
</TableColumn>
|
||||||
<cellValueFactory><OfferCellValueImpl property="bestSell"/></cellValueFactory>
|
<TableColumn minWidth="120.0" text="%market.offer.buy">
|
||||||
</TableColumn>
|
<cellValueFactory><OfferCellValueImpl property="bestBuy"/></cellValueFactory>
|
||||||
<TableColumn minWidth="120.0" text="BEST BUY">
|
</TableColumn>
|
||||||
<cellValueFactory><OfferCellValueImpl property="bestBuy"/></cellValueFactory>
|
</columns>
|
||||||
</TableColumn>
|
</TableColumn>
|
||||||
</columns>
|
</columns>
|
||||||
<columnResizePolicy>
|
<columnResizePolicy>
|
||||||
@@ -54,33 +62,41 @@
|
|||||||
</sortOrder>
|
</sortOrder>
|
||||||
</TableView>
|
</TableView>
|
||||||
</TitledPane>
|
</TitledPane>
|
||||||
<TitledPane animated="false" text="Покупаемые товары">
|
<TitledPane animated="false" text="%offers.pane.buy">
|
||||||
<TableView fx:id="tblBuy" editable="true">
|
<TableView fx:id="tblBuy" editable="true">
|
||||||
<columns>
|
<columns>
|
||||||
<TableColumn minWidth="230.0" text="Товар">
|
<TableColumn minWidth="230.0" text="%market.item.name">
|
||||||
<cellValueFactory><PropertyValueFactory property="name"/></cellValueFactory>
|
<cellValueFactory><PropertyValueFactory property="name"/></cellValueFactory>
|
||||||
</TableColumn>
|
</TableColumn>
|
||||||
<TableColumn minWidth="110.0" text="Цена" editable="true" onEditCommit="#editPrice">
|
<TableColumn minWidth="110.0" text="%market.offer.price" editable="true" onEditCommit="#editPrice">
|
||||||
<cellFactory><PriceCellImpl/></cellFactory>
|
<cellFactory><PriceCellImpl/></cellFactory>
|
||||||
<cellValueFactory><PropertyValueFactory property="price"/></cellValueFactory>
|
<cellValueFactory><PropertyValueFactory property="price"/></cellValueFactory>
|
||||||
</TableColumn>
|
</TableColumn>
|
||||||
<TableColumn fx:id="sortBuy" minWidth="80.0" text="Прибыль" sortType="DESCENDING">
|
<TableColumn fx:id="sortBuy" minWidth="90.0" text="%market.order.profit" sortType="DESCENDING">
|
||||||
<cellFactory><DoubleCell/></cellFactory>
|
<cellFactory><DoubleCell/></cellFactory>
|
||||||
<cellValueFactory><PropertyValueFactory property="profit"/></cellValueFactory>
|
<cellValueFactory><PropertyValueFactory property="profit"/></cellValueFactory>
|
||||||
</TableColumn>
|
</TableColumn>
|
||||||
<TableColumn minWidth="80.0" text="AVG SELL">
|
<TableColumn text="%market.offer.avg">
|
||||||
<cellFactory><DoubleCell/></cellFactory>
|
<columns>
|
||||||
<cellValueFactory><PropertyValueFactory property="avgSell"/></cellValueFactory>
|
<TableColumn minWidth="80.0" text="%market.offer.sell">
|
||||||
|
<cellFactory><DoubleCell/></cellFactory>
|
||||||
|
<cellValueFactory><PropertyValueFactory property="avgSell"/></cellValueFactory>
|
||||||
|
</TableColumn>
|
||||||
|
<TableColumn minWidth="80.0" text="%market.offer.buy">
|
||||||
|
<cellFactory><DoubleCell/></cellFactory>
|
||||||
|
<cellValueFactory><PropertyValueFactory property="avgBuy"/></cellValueFactory>
|
||||||
|
</TableColumn>
|
||||||
|
</columns>
|
||||||
</TableColumn>
|
</TableColumn>
|
||||||
<TableColumn minWidth="80.0" text="AVG BUY">
|
<TableColumn text="%market.offer.best">
|
||||||
<cellFactory><DoubleCell/></cellFactory>
|
<columns>
|
||||||
<cellValueFactory><PropertyValueFactory property="avgBuy"/></cellValueFactory>
|
<TableColumn minWidth="120.0" text="%market.offer.sell">
|
||||||
</TableColumn>
|
<cellValueFactory><OfferCellValueImpl property="bestSell"/></cellValueFactory>
|
||||||
<TableColumn minWidth="120.0" text="BEST SELL">
|
</TableColumn>
|
||||||
<cellValueFactory><OfferCellValueImpl property="bestSell"/></cellValueFactory>
|
<TableColumn minWidth="120.0" text="%market.offer.buy">
|
||||||
</TableColumn>
|
<cellValueFactory><OfferCellValueImpl property="bestBuy"/></cellValueFactory>
|
||||||
<TableColumn minWidth="120.0" text="BEST BUY">
|
</TableColumn>
|
||||||
<cellValueFactory><OfferCellValueImpl property="bestBuy"/></cellValueFactory>
|
</columns>
|
||||||
</TableColumn>
|
</TableColumn>
|
||||||
</columns>
|
</columns>
|
||||||
<columnResizePolicy>
|
<columnResizePolicy>
|
||||||
|
|||||||
@@ -14,30 +14,30 @@
|
|||||||
prefWidth="1010">
|
prefWidth="1010">
|
||||||
<TableView fx:id="tblOrders" editable="true">
|
<TableView fx:id="tblOrders" editable="true">
|
||||||
<columns>
|
<columns>
|
||||||
<TableColumn minWidth="160.0" text="Товар">
|
<TableColumn minWidth="160.0" text="%market.item.name">
|
||||||
<cellValueFactory><PropertyValueFactory property="name"/></cellValueFactory>
|
<cellValueFactory><PropertyValueFactory property="name"/></cellValueFactory>
|
||||||
</TableColumn>
|
</TableColumn>
|
||||||
<TableColumn minWidth="60.0" text="Цена">
|
<TableColumn minWidth="60.0" text="%market.offer.price">
|
||||||
<cellFactory><DoubleCell/></cellFactory>
|
<cellFactory><DoubleCell/></cellFactory>
|
||||||
<cellValueFactory><PropertyValueFactory property="price"/></cellValueFactory>
|
<cellValueFactory><PropertyValueFactory property="price"/></cellValueFactory>
|
||||||
</TableColumn>
|
</TableColumn>
|
||||||
<TableColumn fx:id="count" minWidth="60.0" prefWidth="60.0" text="Кол-во">
|
<TableColumn fx:id="count" minWidth="60.0" prefWidth="60.0" text="%market.order.count">
|
||||||
<cellValueFactory><PropertyValueFactory property="count"/></cellValueFactory>
|
<cellValueFactory><PropertyValueFactory property="count"/></cellValueFactory>
|
||||||
</TableColumn>
|
</TableColumn>
|
||||||
<TableColumn minWidth="160.0" text="Покупатель">
|
<TableColumn minWidth="160.0" text="%market.order.buyer">
|
||||||
<cellValueFactory><OfferCellValueImpl property="buyOffer"/></cellValueFactory>
|
<cellValueFactory><OfferCellValueImpl property="buyOffer"/></cellValueFactory>
|
||||||
</TableColumn>
|
</TableColumn>
|
||||||
<TableColumn minWidth="80.0" text="Прибыль">
|
<TableColumn minWidth="80.0" text="%market.order.profit">
|
||||||
<cellFactory><DoubleCell/></cellFactory>
|
<cellFactory><DoubleCell/></cellFactory>
|
||||||
<cellValueFactory><PropertyValueFactory property="profit"/></cellValueFactory>
|
<cellValueFactory><PropertyValueFactory property="profit"/></cellValueFactory>
|
||||||
</TableColumn>
|
</TableColumn>
|
||||||
|
|
||||||
<TableColumn resizable="false" text="Максимум">
|
<TableColumn resizable="false" text="%market.offer.max.full">
|
||||||
<columns>
|
<columns>
|
||||||
<TableColumn fx:id="maxCount" minWidth="60.0" prefWidth="60.0" text="Кол-во">
|
<TableColumn fx:id="maxCount" minWidth="60.0" prefWidth="60.0" text="%market.order.count">
|
||||||
<cellValueFactory><PropertyValueFactory property="max"/></cellValueFactory>
|
<cellValueFactory><PropertyValueFactory property="max"/></cellValueFactory>
|
||||||
</TableColumn>
|
</TableColumn>
|
||||||
<TableColumn fx:id="bestProfit" minWidth="80.0" text="Прибыль" sortType="DESCENDING">
|
<TableColumn fx:id="bestProfit" minWidth="80.0" text="%market.order.profit" sortType="DESCENDING">
|
||||||
<cellFactory><DoubleCell/></cellFactory>
|
<cellFactory><DoubleCell/></cellFactory>
|
||||||
<cellValueFactory><PropertyValueFactory property="bestProfit"/></cellValueFactory>
|
<cellValueFactory><PropertyValueFactory property="bestProfit"/></cellValueFactory>
|
||||||
</TableColumn>
|
</TableColumn>
|
||||||
@@ -53,14 +53,14 @@
|
|||||||
</TableView>
|
</TableView>
|
||||||
<TableView fx:id="tblBuyers" minWidth="335">
|
<TableView fx:id="tblBuyers" minWidth="335">
|
||||||
<columns>
|
<columns>
|
||||||
<TableColumn minWidth="160.0" text="Покупатель">
|
<TableColumn minWidth="160.0" text="%market.order.buyer">
|
||||||
<cellFactory><OfferTableCell/></cellFactory>
|
<cellFactory><OfferTableCell/></cellFactory>
|
||||||
<cellValueFactory><PropertyValueFactory property="price"/></cellValueFactory>
|
<cellValueFactory><PropertyValueFactory property="price"/></cellValueFactory>
|
||||||
</TableColumn>
|
</TableColumn>
|
||||||
<TableColumn fx:id="curDistance" minWidth="80.0" text="Дистанция">
|
<TableColumn fx:id="curDistance" minWidth="80.0" text="%market.order.distance">
|
||||||
<cellFactory><DoubleCell format="\%.2f LY"/></cellFactory>
|
<cellFactory><DoubleCell format="\%.2f LY"/></cellFactory>
|
||||||
</TableColumn>
|
</TableColumn>
|
||||||
<TableColumn fx:id="curProfit" minWidth="80.0" text="Прибыль" sortType="DESCENDING">
|
<TableColumn fx:id="curProfit" minWidth="80.0" text="%market.order.profit" sortType="DESCENDING">
|
||||||
<cellFactory><DoubleCell/></cellFactory>
|
<cellFactory><DoubleCell/></cellFactory>
|
||||||
</TableColumn>
|
</TableColumn>
|
||||||
</columns>
|
</columns>
|
||||||
|
|||||||
@@ -15,26 +15,26 @@
|
|||||||
prefWidth="1050">
|
prefWidth="1050">
|
||||||
<TableView fx:id="tblPaths" editable="true">
|
<TableView fx:id="tblPaths" editable="true">
|
||||||
<columns>
|
<columns>
|
||||||
<TableColumn minWidth="600.0" text="Путь">
|
<TableColumn minWidth="600.0" text="%routes.path">
|
||||||
<cellFactory><PathRouteCell /></cellFactory>
|
<cellFactory><PathRouteCell /></cellFactory>
|
||||||
</TableColumn>
|
</TableColumn>
|
||||||
<TableColumn minWidth="70.0" text="Прыжков">
|
<TableColumn minWidth="70.0" text="%routes.jumps">
|
||||||
<cellValueFactory><PropertyValueFactory property="jumps"/></cellValueFactory>
|
<cellValueFactory><PropertyValueFactory property="jumps"/></cellValueFactory>
|
||||||
</TableColumn>
|
</TableColumn>
|
||||||
<TableColumn minWidth="70.0" text="Заправок">
|
<TableColumn minWidth="70.0" text="%routes.refills">
|
||||||
<cellValueFactory><PropertyValueFactory property="refuels"/></cellValueFactory>
|
<cellValueFactory><PropertyValueFactory property="refuels"/></cellValueFactory>
|
||||||
</TableColumn>
|
</TableColumn>
|
||||||
<TableColumn minWidth="70.0" text="Посадок">
|
<TableColumn minWidth="70.0" text="%routes.lands">
|
||||||
<cellValueFactory><PropertyValueFactory property="lands"/></cellValueFactory>
|
<cellValueFactory><PropertyValueFactory property="lands"/></cellValueFactory>
|
||||||
</TableColumn>
|
</TableColumn>
|
||||||
<TableColumn minWidth="80.0" text="Дистанция">
|
<TableColumn minWidth="80.0" text="%market.order.distance">
|
||||||
<cellFactory><DoubleCell format="\%.2f LY"/></cellFactory>
|
<cellFactory><DoubleCell format="\%.2f LY"/></cellFactory>
|
||||||
<cellValueFactory><PropertyValueFactory property="distance"/></cellValueFactory>
|
<cellValueFactory><PropertyValueFactory property="distance"/></cellValueFactory>
|
||||||
</TableColumn>
|
</TableColumn>
|
||||||
<TableColumn minWidth="70.0" text="Прибыль">
|
<TableColumn minWidth="70.0" text="%market.order.profit">
|
||||||
<cellValueFactory><PropertyValueFactory property="totalProfit"/></cellValueFactory>
|
<cellValueFactory><PropertyValueFactory property="totalProfit"/></cellValueFactory>
|
||||||
</TableColumn>
|
</TableColumn>
|
||||||
<TableColumn fx:id="avgProfit" minWidth="70.0" text="Ср." sortType="DESCENDING">
|
<TableColumn fx:id="avgProfit" minWidth="70.0" text="%market.offer.avg" sortType="DESCENDING">
|
||||||
<cellFactory><DoubleCell format="\%.0f"/></cellFactory>
|
<cellFactory><DoubleCell format="\%.0f"/></cellFactory>
|
||||||
<cellValueFactory><PropertyValueFactory property="avgProfit"/></cellValueFactory>
|
<cellValueFactory><PropertyValueFactory property="avgProfit"/></cellValueFactory>
|
||||||
</TableColumn>
|
</TableColumn>
|
||||||
|
|||||||
@@ -10,68 +10,68 @@
|
|||||||
|
|
||||||
<?import javafx.geometry.Insets?>
|
<?import javafx.geometry.Insets?>
|
||||||
<HBox xmlns="http://javafx.com/javafx/8" xmlns:fx="http://javafx.com/fxml/1"
|
<HBox xmlns="http://javafx.com/javafx/8" xmlns:fx="http://javafx.com/fxml/1"
|
||||||
fx:controller="ru.trader.controllers.RoutersController">
|
fx:controller="ru.trader.controllers.RouterController">
|
||||||
<fx:define><Insets fx:id="fields_group_margin" left="2" right="10"/></fx:define>
|
<fx:define><Insets fx:id="fields_group_margin" left="2" right="10"/></fx:define>
|
||||||
<fx:define><Insets fx:id="separator_margin" top="10" bottom="10"/></fx:define>
|
<fx:define><Insets fx:id="separator_margin" top="10" bottom="10"/></fx:define>
|
||||||
|
|
||||||
<VBox minWidth="250">
|
<VBox minWidth="250">
|
||||||
<TitledPane text="Параметры корабля" minHeight="160" collapsible="false">
|
<TitledPane text="%router.pane.ship" minHeight="160" collapsible="false">
|
||||||
<GridPane vgap="4">
|
<GridPane vgap="4">
|
||||||
<columnConstraints>
|
<columnConstraints>
|
||||||
<ColumnConstraints minWidth="140" />
|
<ColumnConstraints minWidth="140" />
|
||||||
<ColumnConstraints minWidth="90" maxWidth="90"/>
|
<ColumnConstraints minWidth="90" maxWidth="90"/>
|
||||||
</columnConstraints>
|
</columnConstraints>
|
||||||
<Label text="Баланс:"/>
|
<Label text="%router.pane.ship.balance"/>
|
||||||
<NumberField fx:id="balance" GridPane.columnIndex="1" />
|
<NumberField fx:id="balance" GridPane.columnIndex="1" />
|
||||||
<Label text="Трюм:" GridPane.rowIndex="1" />
|
<Label text="%router.pane.ship.cargo" GridPane.rowIndex="1" />
|
||||||
<NumberField fx:id="cargo" GridPane.columnIndex="1" GridPane.rowIndex="1" />
|
<NumberField fx:id="cargo" GridPane.columnIndex="1" GridPane.rowIndex="1" />
|
||||||
<Label text="Запас топлива(LY):" GridPane.rowIndex="2" />
|
<Label text="%router.pane.ship.fueltank" GridPane.rowIndex="2" />
|
||||||
<NumberField fx:id="tank" GridPane.columnIndex="1" GridPane.rowIndex="2" />
|
<NumberField fx:id="tank" GridPane.columnIndex="1" GridPane.rowIndex="2" />
|
||||||
<Label text="Дистанция прыжка(LY):" GridPane.rowIndex="3" />
|
<Label text="%router.pane.ship.distance" GridPane.rowIndex="3" />
|
||||||
<NumberField fx:id="distance" GridPane.columnIndex="1" GridPane.rowIndex="3" />
|
<NumberField fx:id="distance" GridPane.columnIndex="1" GridPane.rowIndex="3" />
|
||||||
</GridPane>
|
</GridPane>
|
||||||
</TitledPane>
|
</TitledPane>
|
||||||
<TitledPane text="Параметры маршрута" minHeight="250" collapsible="false">
|
<TitledPane text="%router.pane.route" minHeight="250" collapsible="false">
|
||||||
<GridPane vgap="4">
|
<GridPane vgap="4">
|
||||||
<columnConstraints>
|
<columnConstraints>
|
||||||
<ColumnConstraints minWidth="70"/>
|
<ColumnConstraints minWidth="70"/>
|
||||||
<ColumnConstraints minWidth="160" maxWidth="160"/>
|
<ColumnConstraints minWidth="160" maxWidth="160"/>
|
||||||
</columnConstraints>
|
</columnConstraints>
|
||||||
<Label text="От:" />
|
<Label text="%router.pane.route.from" />
|
||||||
<ComboBox fx:id="source" prefWidth="160" GridPane.columnIndex="1" />
|
<ComboBox fx:id="source" prefWidth="160" GridPane.columnIndex="1" />
|
||||||
<Label text="До:" GridPane.rowIndex="1"/>
|
<Label text="%router.pane.route.to" GridPane.rowIndex="1"/>
|
||||||
<ComboBox fx:id="target" prefWidth="160" GridPane.columnIndex="1" GridPane.rowIndex="1"/>
|
<ComboBox fx:id="target" prefWidth="160" GridPane.columnIndex="1" GridPane.rowIndex="1"/>
|
||||||
<Label text="Прыжков:" GridPane.rowIndex="2" />
|
<Label text="%router.pane.route.jumps" GridPane.rowIndex="2" />
|
||||||
<NumberField fx:id="jumps" GridPane.columnIndex="1" GridPane.rowIndex="2" />
|
<NumberField fx:id="jumps" GridPane.columnIndex="1" GridPane.rowIndex="2" />
|
||||||
|
|
||||||
<Separator GridPane.columnSpan="2" GridPane.rowIndex="3" GridPane.margin="$separator_margin"/>
|
<Separator GridPane.columnSpan="2" GridPane.rowIndex="3" GridPane.margin="$separator_margin"/>
|
||||||
<VBox GridPane.columnSpan="2" GridPane.rowIndex="4" spacing="5">
|
<VBox GridPane.columnSpan="2" GridPane.rowIndex="4" spacing="5">
|
||||||
<HBox alignment="CENTER" spacing="5">
|
<HBox alignment="CENTER" spacing="5">
|
||||||
<Button fx:id="editBtn" text="Изменить" onAction="#editOrders"/>
|
<Button fx:id="editBtn" text="%route.button.edit" onAction="#editOrders"/>
|
||||||
<Button fx:id="removeBtn" text="Удалить" onAction="#removeSelected"/>
|
<Button fx:id="removeBtn" text="%route.button.remove" onAction="#removeSelected"/>
|
||||||
<Button text="Очистить" onAction="#removeAll" />
|
<Button text="%route.button.clear" onAction="#removeAll" />
|
||||||
</HBox>
|
</HBox>
|
||||||
<HBox alignment="CENTER" spacing="5">
|
<HBox alignment="CENTER" spacing="5">
|
||||||
<Button prefWidth="80" text="Заказы" onAction="#showOrders" />
|
<Button prefWidth="80" text="%market.offers" onAction="#showOrders" />
|
||||||
<Button text="TOP 100" onAction="#showTopOrders" />
|
<Button text="%route.button.top" onAction="#showTopOrders" />
|
||||||
</HBox>
|
</HBox>
|
||||||
<HBox alignment="CENTER" spacing="5">
|
<HBox alignment="CENTER" spacing="5">
|
||||||
<Button prefWidth="80" text="Маршруты" onAction="#showRoutes" />
|
<Button prefWidth="80" text="%routes" onAction="#showRoutes" />
|
||||||
<Button text="TOP 100" onAction="#showTopRoutes" />
|
<Button text="%route.button.top" onAction="#showTopRoutes" />
|
||||||
</HBox>
|
</HBox>
|
||||||
</VBox>
|
</VBox>
|
||||||
</GridPane>
|
</GridPane>
|
||||||
</TitledPane>
|
</TitledPane>
|
||||||
<Pane VBox.vgrow="ALWAYS"/>
|
<Pane VBox.vgrow="ALWAYS"/>
|
||||||
<TitledPane text="Итого" minHeight="100" collapsible="false">
|
<TitledPane text="%router.pane.total" minHeight="100" collapsible="false">
|
||||||
<GridPane vgap="4">
|
<GridPane vgap="4">
|
||||||
<columnConstraints>
|
<columnConstraints>
|
||||||
<ColumnConstraints minWidth="70"/>
|
<ColumnConstraints minWidth="70"/>
|
||||||
<ColumnConstraints minWidth="160"/>
|
<ColumnConstraints minWidth="160"/>
|
||||||
</columnConstraints>
|
</columnConstraints>
|
||||||
<Label text="Баланс:"/>
|
<Label text="%router.pane.ship.balance"/>
|
||||||
<NumberField fx:id="totalBalance" prefWidth="100" GridPane.columnIndex="1" editable="false"/>
|
<NumberField fx:id="totalBalance" prefWidth="100" GridPane.columnIndex="1" editable="false"/>
|
||||||
<Label text="Прибыль:" GridPane.rowIndex="1"/>
|
<Label text="%router.pane.total.profit" GridPane.rowIndex="1"/>
|
||||||
<NumberField fx:id="totalProfit" prefWidth="100" GridPane.columnIndex="1" GridPane.rowIndex="1" editable="false"/>
|
<NumberField fx:id="totalProfit" prefWidth="100" GridPane.columnIndex="1" GridPane.rowIndex="1" editable="false"/>
|
||||||
</GridPane>
|
</GridPane>
|
||||||
</TitledPane>
|
</TitledPane>
|
||||||
@@ -79,27 +79,27 @@
|
|||||||
<VBox HBox.hgrow="ALWAYS">
|
<VBox HBox.hgrow="ALWAYS">
|
||||||
<TableView fx:id="tblOrders" VBox.vgrow="ALWAYS">
|
<TableView fx:id="tblOrders" VBox.vgrow="ALWAYS">
|
||||||
<columns>
|
<columns>
|
||||||
<TableColumn minWidth="210.0" text="Продавец">
|
<TableColumn minWidth="210.0" text="%market.order.seller">
|
||||||
<cellValueFactory><PropertyValueFactory property="vendor"/></cellValueFactory>
|
<cellValueFactory><PropertyValueFactory property="vendor"/></cellValueFactory>
|
||||||
</TableColumn>
|
</TableColumn>
|
||||||
<TableColumn minWidth="180.0" text="Товар">
|
<TableColumn minWidth="180.0" text="%market.item.name">
|
||||||
<cellValueFactory><PropertyValueFactory property="name"/></cellValueFactory>
|
<cellValueFactory><PropertyValueFactory property="name"/></cellValueFactory>
|
||||||
</TableColumn>
|
</TableColumn>
|
||||||
<TableColumn minWidth="80.0" text="Цена">
|
<TableColumn minWidth="80.0" text="%market.offer.price">
|
||||||
<cellFactory><DoubleCell/></cellFactory>
|
<cellFactory><DoubleCell/></cellFactory>
|
||||||
<cellValueFactory><PropertyValueFactory property="price"/></cellValueFactory>
|
<cellValueFactory><PropertyValueFactory property="price"/></cellValueFactory>
|
||||||
</TableColumn>
|
</TableColumn>
|
||||||
<TableColumn minWidth="80.0" text="Кол-во">
|
<TableColumn minWidth="80.0" text="%market.order.count">
|
||||||
<cellValueFactory><PropertyValueFactory property="count"/></cellValueFactory>
|
<cellValueFactory><PropertyValueFactory property="count"/></cellValueFactory>
|
||||||
</TableColumn>
|
</TableColumn>
|
||||||
<TableColumn minWidth="120.0" text="Покупатель">
|
<TableColumn minWidth="120.0" text="%market.order.buyer">
|
||||||
<cellValueFactory><OfferCellValueImpl property="buyOffer"/></cellValueFactory>
|
<cellValueFactory><OfferCellValueImpl property="buyOffer"/></cellValueFactory>
|
||||||
</TableColumn>
|
</TableColumn>
|
||||||
<TableColumn minWidth="80.0" text="Дистанция">
|
<TableColumn minWidth="80.0" text="%market.order.distance">
|
||||||
<cellFactory><DoubleCell format="\%.2f LY"/></cellFactory>
|
<cellFactory><DoubleCell format="\%.2f LY"/></cellFactory>
|
||||||
<cellValueFactory><PropertyValueFactory property="distance"/></cellValueFactory>
|
<cellValueFactory><PropertyValueFactory property="distance"/></cellValueFactory>
|
||||||
</TableColumn>
|
</TableColumn>
|
||||||
<TableColumn minWidth="80.0" text="Прибыль">
|
<TableColumn minWidth="80.0" text="%market.order.profit">
|
||||||
<cellFactory><DoubleCell/></cellFactory>
|
<cellFactory><DoubleCell/></cellFactory>
|
||||||
<cellValueFactory><PropertyValueFactory property="profit"/></cellValueFactory>
|
<cellValueFactory><PropertyValueFactory property="profit"/></cellValueFactory>
|
||||||
</TableColumn>
|
</TableColumn>
|
||||||
@@ -11,26 +11,26 @@
|
|||||||
<?import ru.trader.view.support.cells.OfferTableCell?>
|
<?import ru.trader.view.support.cells.OfferTableCell?>
|
||||||
<HBox xmlns="http://javafx.com/javafx/8" xmlns:fx="http://javafx.com/fxml/1"
|
<HBox xmlns="http://javafx.com/javafx/8" xmlns:fx="http://javafx.com/fxml/1"
|
||||||
fx:controller="ru.trader.controllers.TopOrdersController" styleClass="dialog"
|
fx:controller="ru.trader.controllers.TopOrdersController" styleClass="dialog"
|
||||||
prefWidth="715">
|
prefWidth="725">
|
||||||
<TableView fx:id="tblOrders" editable="true">
|
<TableView fx:id="tblOrders" editable="true">
|
||||||
<columns>
|
<columns>
|
||||||
<TableColumn minWidth="160.0" text="Товар">
|
<TableColumn minWidth="160.0" text="%market.item.name">
|
||||||
<cellValueFactory><PropertyValueFactory property="name"/></cellValueFactory>
|
<cellValueFactory><PropertyValueFactory property="name"/></cellValueFactory>
|
||||||
</TableColumn>
|
</TableColumn>
|
||||||
<TableColumn minWidth="160.0" text="Продавец">
|
<TableColumn minWidth="160.0" text="%market.order.seller">
|
||||||
<cellValueFactory><OfferCellValueImpl property="offer"/></cellValueFactory>
|
<cellValueFactory><OfferCellValueImpl property="offer"/></cellValueFactory>
|
||||||
</TableColumn>
|
</TableColumn>
|
||||||
<TableColumn fx:id="count" minWidth="60.0" text="Кол-во">
|
<TableColumn fx:id="count" minWidth="60.0" text="%market.order.count">
|
||||||
<cellValueFactory><PropertyValueFactory property="count"/></cellValueFactory>
|
<cellValueFactory><PropertyValueFactory property="count"/></cellValueFactory>
|
||||||
</TableColumn>
|
</TableColumn>
|
||||||
<TableColumn minWidth="160.0" text="Покупатель">
|
<TableColumn minWidth="160.0" text="%market.order.buyer">
|
||||||
<cellValueFactory><OfferCellValueImpl property="buyOffer"/></cellValueFactory>
|
<cellValueFactory><OfferCellValueImpl property="buyOffer"/></cellValueFactory>
|
||||||
</TableColumn>
|
</TableColumn>
|
||||||
<TableColumn minWidth="80.0" text="Дистанция">
|
<TableColumn minWidth="80.0" text="%market.order.distance">
|
||||||
<cellFactory><DoubleCell format="\%.2f LY"/></cellFactory>
|
<cellFactory><DoubleCell format="\%.2f LY"/></cellFactory>
|
||||||
<cellValueFactory><PropertyValueFactory property="distance"/></cellValueFactory>
|
<cellValueFactory><PropertyValueFactory property="distance"/></cellValueFactory>
|
||||||
</TableColumn>
|
</TableColumn>
|
||||||
<TableColumn fx:id="profit" minWidth="80.0" text="Прибыль" sortType="DESCENDING">
|
<TableColumn fx:id="profit" minWidth="80.0" text="%market.order.profit" sortType="DESCENDING">
|
||||||
<cellFactory><DoubleCell/></cellFactory>
|
<cellFactory><DoubleCell/></cellFactory>
|
||||||
<cellValueFactory><PropertyValueFactory property="profit"/></cellValueFactory>
|
<cellValueFactory><PropertyValueFactory property="profit"/></cellValueFactory>
|
||||||
</TableColumn>
|
</TableColumn>
|
||||||
|
|||||||
@@ -29,13 +29,13 @@
|
|||||||
</VBox>
|
</VBox>
|
||||||
<TableView fx:id="items" prefWidth="375.0" editable="true" GridPane.columnIndex="1" GridPane.rowIndex="2">
|
<TableView fx:id="items" prefWidth="375.0" editable="true" GridPane.columnIndex="1" GridPane.rowIndex="2">
|
||||||
<columns>
|
<columns>
|
||||||
<TableColumn minWidth="200.0" text="Товар" editable="false">
|
<TableColumn minWidth="200.0" text="%market.item.name" editable="false">
|
||||||
<cellValueFactory><PropertyValueFactory property="name"/></cellValueFactory>
|
<cellValueFactory><PropertyValueFactory property="name"/></cellValueFactory>
|
||||||
</TableColumn>
|
</TableColumn>
|
||||||
<TableColumn fx:id="buy" minWidth="80.0" text="Продажа">
|
<TableColumn fx:id="buy" minWidth="80.0" text="%market.offer.sell">
|
||||||
<cellValueFactory><PropertyValueFactory property="bprice"/></cellValueFactory>
|
<cellValueFactory><PropertyValueFactory property="bprice"/></cellValueFactory>
|
||||||
</TableColumn>
|
</TableColumn>
|
||||||
<TableColumn fx:id="sell" minWidth="80.0" text="Покупка">
|
<TableColumn fx:id="sell" minWidth="80.0" text="%market.offer.buy">
|
||||||
<cellValueFactory><PropertyValueFactory property="sprice"/></cellValueFactory>
|
<cellValueFactory><PropertyValueFactory property="sprice"/></cellValueFactory>
|
||||||
</TableColumn>
|
</TableColumn>
|
||||||
</columns>
|
</columns>
|
||||||
|
|||||||
Reference in New Issue
Block a user