Archived
0

implement search for mission prototype

This commit is contained in:
iMoHax
2015-09-09 17:12:13 +03:00
parent e1d8dcc680
commit 5a658ce90a
17 changed files with 567 additions and 75 deletions

View File

@@ -61,6 +61,9 @@
<Tab text="%main.tab.search">
<fx:include source="search.fxml"/>
</Tab>
<Tab text="Маршрут">
<fx:include source="routeSearch.fxml"/>
</Tab>
</TabPane>
</center>

View File

@@ -0,0 +1,71 @@
<?xml version="1.0" encoding="UTF-8"?>
<?import javafx.geometry.*?>
<?import javafx.scene.control.*?>
<?import javafx.scene.layout.*?>
<?import org.controlsfx.glyphfont.Glyph?>
<?import ru.trader.view.support.NumberField?>
<?import ru.trader.view.support.cells.ItemListCell?>
<?import ru.trader.view.support.ItemStringConverter?>
<GridPane xmlns="http://javafx.com/javafx/8" xmlns:fx="http://javafx.com/fxml/1"
fx:controller="ru.trader.controllers.MissionsController"
hgap="10" vgap="5">
<columnConstraints>
<ColumnConstraints minWidth="180" />
<ColumnConstraints minWidth="180" />
<ColumnConstraints minWidth="180" />
</columnConstraints>
<Label text="Курьерские"/>
<HBox GridPane.rowIndex="1">
<Label text="Доставить на:"/>
<TextField fx:id="receiverText" prefWidth="160"/>
</HBox>
<HBox GridPane.rowIndex="3">
<Label text="Прибыль:"/>
<NumberField fx:id="courierProfit" value="0" />
</HBox>
<Button fx:id="addCourierBtn" prefWidth="30" onAction="#addCourier" GridPane.rowIndex="4">
<graphic><Glyph text="FontAwesome|PLUS"/></graphic>
</Button>
<Label text="Доставка" GridPane.columnIndex="1"/>
<HBox GridPane.rowIndex="1" GridPane.columnIndex="1">
<Label text="Доставить на:"/>
<TextField fx:id="buyerText" prefWidth="160"/>
</HBox>
<HBox GridPane.rowIndex="2" GridPane.columnIndex="1">
<Label text="Кол-во:"/>
<NumberField fx:id="deliveryCount" value="0"/>
</HBox>
<HBox GridPane.rowIndex="3" GridPane.columnIndex="1">
<Label text="Прибыль:"/>
<NumberField fx:id="deliveryProfit" value="0"/>
</HBox>
<Button fx:id="addDeliveryBtn" prefWidth="30" onAction="#addDelivery" GridPane.rowIndex="4" GridPane.columnIndex="1">
<graphic><Glyph text="FontAwesome|PLUS"/></graphic>
</Button>
<Label text="Поставка" GridPane.columnIndex="2"/>
<HBox GridPane.rowIndex="1" GridPane.columnIndex="2">
<Label text="Товар:"/>
<ComboBox fx:id="item" prefWidth="160">
<cellFactory><ItemListCell /></cellFactory>
<converter><ItemStringConverter /></converter>
</ComboBox>
</HBox>
<HBox GridPane.rowIndex="2" GridPane.columnIndex="2">
<Label text="Кол-во:"/>
<NumberField fx:id="supplyCount" value="0"/>
</HBox>
<HBox GridPane.rowIndex="3" GridPane.columnIndex="2">
<Label text="Прибыль:"/>
<NumberField fx:id="supplyProfit" value="0"/>
</HBox>
<Button fx:id="addSupplyBtn" prefWidth="30" onAction="#addSupply" GridPane.rowIndex="4" GridPane.columnIndex="2">
<graphic><Glyph text="FontAwesome|PLUS"/></graphic>
</Button>
</GridPane>

View File

@@ -6,35 +6,30 @@
<?import ru.trader.view.support.cells.OfferListCell?>
<?import javafx.geometry.Insets?>
<?import ru.trader.view.support.NumberField?>
<HBox xmlns="http://javafx.com/javafx/8" xmlns:fx="http://javafx.com/fxml/1"
<?import org.controlsfx.glyphfont.Glyph?>
<VBox xmlns="http://javafx.com/javafx/8" xmlns:fx="http://javafx.com/fxml/1"
fx:controller="ru.trader.controllers.RouteSearchController"
spacing="4" >
<Label text="Имя:" />
<TextField fx:id="name" />
<Label text="Баланс:" />
<NumberField fx:id="balance" />
<Label text="Система:" />
<TextField fx:id="systemText" />
<Button fx:id="btnAddSystem"/>
<Label text="Станция:" />
<ComboBox fx:id="station" />
<Button fx:id="btnAddStation"/>
<HBox>
<HBox>
<Label text="От:" />
<TextField fx:id="fromSystemText" />
<ComboBox fx:id="fromStation" />
<Button onAction="#currentAsFrom"/>
</HBox>
<HBox>
<Label text="До:" />
<TextField fx:id="toSystemText" />
<ComboBox fx:id="toStation" />
<Button onAction="#loop"/>
</HBox>
<Button prefWidth="80" text="Найти" onAction="#search" />
</HBox>
<VBox>
<fx:include fx:id="missions" source="missions.fxml"/>
<HBox>
<Label text="Трюм:" />
<NumberField fx:id="cargo" />
</HBox>
<HBox>
<Label text="Топливный бак:" />
<NumberField fx:id="tank" />
</HBox>
<HBox>
<Label text="Масса:" />
<NumberField fx:id="mass" />
</HBox>
<HBox>
<Label text="Двигатель:" />
<ComboBox fx:id="engine" />
<ListView fx:id="missionsList" />
<Button prefWidth="30" onAction="#removeMission"><graphic><Glyph text="FontAwesome|MINUS"/></graphic></Button>
</HBox>
</VBox>
</HBox>
</VBox>