Archived
0

- add localization support

- add english language
This commit is contained in:
iMoHax
2014-08-27 14:43:27 +04:00
parent c011ea05d5
commit 9d58026568
22 changed files with 502 additions and 142 deletions

View File

@@ -0,0 +1,113 @@
<?xml version="1.0" encoding="UTF-8"?>
<?import javafx.scene.control.*?>
<?import javafx.scene.layout.*?>
<?import ru.trader.view.support.NumberField?>
<?import javafx.scene.control.cell.PropertyValueFactory?>
<?import ru.trader.view.support.cells.DoubleCell?>
<?import ru.trader.view.support.cells.OfferCellValueImpl?>
<?import javafx.geometry.Insets?>
<HBox xmlns="http://javafx.com/javafx/8" xmlns:fx="http://javafx.com/fxml/1"
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="separator_margin" top="10" bottom="10"/></fx:define>
<VBox minWidth="250">
<TitledPane text="%router.pane.ship" minHeight="160" collapsible="false">
<GridPane vgap="4">
<columnConstraints>
<ColumnConstraints minWidth="140" />
<ColumnConstraints minWidth="90" maxWidth="90"/>
</columnConstraints>
<Label text="%router.pane.ship.balance"/>
<NumberField fx:id="balance" GridPane.columnIndex="1" />
<Label text="%router.pane.ship.cargo" GridPane.rowIndex="1" />
<NumberField fx:id="cargo" GridPane.columnIndex="1" GridPane.rowIndex="1" />
<Label text="%router.pane.ship.fueltank" GridPane.rowIndex="2" />
<NumberField fx:id="tank" GridPane.columnIndex="1" GridPane.rowIndex="2" />
<Label text="%router.pane.ship.distance" GridPane.rowIndex="3" />
<NumberField fx:id="distance" GridPane.columnIndex="1" GridPane.rowIndex="3" />
</GridPane>
</TitledPane>
<TitledPane text="%router.pane.route" minHeight="250" collapsible="false">
<GridPane vgap="4">
<columnConstraints>
<ColumnConstraints minWidth="70"/>
<ColumnConstraints minWidth="160" maxWidth="160"/>
</columnConstraints>
<Label text="%router.pane.route.from" />
<ComboBox fx:id="source" prefWidth="160" GridPane.columnIndex="1" />
<Label text="%router.pane.route.to" GridPane.rowIndex="1"/>
<ComboBox fx:id="target" prefWidth="160" GridPane.columnIndex="1" GridPane.rowIndex="1"/>
<Label text="%router.pane.route.jumps" GridPane.rowIndex="2" />
<NumberField fx:id="jumps" GridPane.columnIndex="1" GridPane.rowIndex="2" />
<Separator GridPane.columnSpan="2" GridPane.rowIndex="3" GridPane.margin="$separator_margin"/>
<VBox GridPane.columnSpan="2" GridPane.rowIndex="4" spacing="5">
<HBox alignment="CENTER" spacing="5">
<Button fx:id="editBtn" text="%route.button.edit" onAction="#editOrders"/>
<Button fx:id="removeBtn" text="%route.button.remove" onAction="#removeSelected"/>
<Button text="%route.button.clear" onAction="#removeAll" />
</HBox>
<HBox alignment="CENTER" spacing="5">
<Button prefWidth="80" text="%market.offers" onAction="#showOrders" />
<Button text="%route.button.top" onAction="#showTopOrders" />
</HBox>
<HBox alignment="CENTER" spacing="5">
<Button prefWidth="80" text="%routes" onAction="#showRoutes" />
<Button text="%route.button.top" onAction="#showTopRoutes" />
</HBox>
</VBox>
</GridPane>
</TitledPane>
<Pane VBox.vgrow="ALWAYS"/>
<TitledPane text="%router.pane.total" minHeight="100" collapsible="false">
<GridPane vgap="4">
<columnConstraints>
<ColumnConstraints minWidth="70"/>
<ColumnConstraints minWidth="160"/>
</columnConstraints>
<Label text="%router.pane.ship.balance"/>
<NumberField fx:id="totalBalance" prefWidth="100" GridPane.columnIndex="1" editable="false"/>
<Label text="%router.pane.total.profit" GridPane.rowIndex="1"/>
<NumberField fx:id="totalProfit" prefWidth="100" GridPane.columnIndex="1" GridPane.rowIndex="1" editable="false"/>
</GridPane>
</TitledPane>
</VBox>
<VBox HBox.hgrow="ALWAYS">
<TableView fx:id="tblOrders" VBox.vgrow="ALWAYS">
<columns>
<TableColumn minWidth="210.0" text="%market.order.seller">
<cellValueFactory><PropertyValueFactory property="vendor"/></cellValueFactory>
</TableColumn>
<TableColumn minWidth="180.0" text="%market.item.name">
<cellValueFactory><PropertyValueFactory property="name"/></cellValueFactory>
</TableColumn>
<TableColumn minWidth="80.0" text="%market.offer.price">
<cellFactory><DoubleCell/></cellFactory>
<cellValueFactory><PropertyValueFactory property="price"/></cellValueFactory>
</TableColumn>
<TableColumn minWidth="80.0" text="%market.order.count">
<cellValueFactory><PropertyValueFactory property="count"/></cellValueFactory>
</TableColumn>
<TableColumn minWidth="120.0" text="%market.order.buyer">
<cellValueFactory><OfferCellValueImpl property="buyOffer"/></cellValueFactory>
</TableColumn>
<TableColumn minWidth="80.0" text="%market.order.distance">
<cellFactory><DoubleCell format="\%.2f LY"/></cellFactory>
<cellValueFactory><PropertyValueFactory property="distance"/></cellValueFactory>
</TableColumn>
<TableColumn minWidth="80.0" text="%market.order.profit">
<cellFactory><DoubleCell/></cellFactory>
<cellValueFactory><PropertyValueFactory property="profit"/></cellValueFactory>
</TableColumn>
</columns>
<columnResizePolicy>
<TableView fx:constant="UNCONSTRAINED_RESIZE_POLICY"/>
</columnResizePolicy>
</TableView>
<ScrollPane fx:id="path" styleClass="path-pane" minHeight="100" fitToHeight="true"/>
</VBox>
</HBox>