add Refuel service
This commit is contained in:
@@ -18,6 +18,7 @@ import ru.trader.view.support.autocomplete.AutoCompletion;
|
||||
import ru.trader.view.support.autocomplete.CachedSuggestionProvider;
|
||||
import ru.trader.view.support.autocomplete.SystemsProvider;
|
||||
import ru.trader.view.support.cells.CustomListCell;
|
||||
|
||||
import java.util.Optional;
|
||||
|
||||
public class FilterController {
|
||||
@@ -40,6 +41,8 @@ public class FilterController {
|
||||
@FXML
|
||||
private CheckBox cbBlackMarket;
|
||||
@FXML
|
||||
private CheckBox cbRefuel;
|
||||
@FXML
|
||||
private CheckBox cbRepair;
|
||||
@FXML
|
||||
private CheckBox cbMunition;
|
||||
@@ -109,6 +112,7 @@ public class FilterController {
|
||||
distance.setValue(filter.getDistance());
|
||||
cbMarket.setSelected(filter.has(SERVICE_TYPE.MARKET));
|
||||
cbBlackMarket.setSelected(filter.has(SERVICE_TYPE.BLACK_MARKET));
|
||||
cbRefuel.setSelected(filter.has(SERVICE_TYPE.REFUEL));
|
||||
cbMunition.setSelected(filter.has(SERVICE_TYPE.MUNITION));
|
||||
cbRepair.setSelected(filter.has(SERVICE_TYPE.REPAIR));
|
||||
cbOutfit.setSelected(filter.has(SERVICE_TYPE.OUTFIT));
|
||||
@@ -134,6 +138,7 @@ public class FilterController {
|
||||
filter.setDistance(distance.getValue().doubleValue());
|
||||
if (cbMarket.isSelected()) filter.add(SERVICE_TYPE.MARKET); else filter.remove(SERVICE_TYPE.MARKET);
|
||||
if (cbBlackMarket.isSelected()) filter.add(SERVICE_TYPE.BLACK_MARKET); else filter.remove(SERVICE_TYPE.BLACK_MARKET);
|
||||
if (cbRefuel.isSelected()) filter.add(SERVICE_TYPE.REFUEL); else filter.remove(SERVICE_TYPE.REFUEL);
|
||||
if (cbMunition.isSelected()) filter.add(SERVICE_TYPE.MUNITION); else filter.remove(SERVICE_TYPE.MUNITION);
|
||||
if (cbRepair.isSelected()) filter.add(SERVICE_TYPE.REPAIR); else filter.remove(SERVICE_TYPE.REPAIR);
|
||||
if (cbOutfit.isSelected()) filter.add(SERVICE_TYPE.OUTFIT); else filter.remove(SERVICE_TYPE.OUTFIT);
|
||||
|
||||
@@ -2,7 +2,6 @@ package ru.trader.controllers;
|
||||
|
||||
import javafx.application.Platform;
|
||||
import javafx.collections.FXCollections;
|
||||
import javafx.event.ActionEvent;
|
||||
import javafx.fxml.FXML;
|
||||
import javafx.geometry.Insets;
|
||||
import javafx.scene.control.*;
|
||||
@@ -51,6 +50,8 @@ public class OffersController {
|
||||
@FXML
|
||||
private CheckBox cbBlackMarket;
|
||||
@FXML
|
||||
private CheckBox cbRefuel;
|
||||
@FXML
|
||||
private CheckBox cbRepair;
|
||||
@FXML
|
||||
private CheckBox cbMunition;
|
||||
@@ -159,6 +160,7 @@ public class OffersController {
|
||||
distance.setText(String.valueOf(station.getDistance()));
|
||||
cbMarket.setSelected(station.hasService(SERVICE_TYPE.MARKET));
|
||||
cbBlackMarket.setSelected(station.hasService(SERVICE_TYPE.BLACK_MARKET));
|
||||
cbRefuel.setSelected(station.hasService(SERVICE_TYPE.REFUEL));
|
||||
cbMunition.setSelected(station.hasService(SERVICE_TYPE.MUNITION));
|
||||
cbRepair.setSelected(station.hasService(SERVICE_TYPE.REPAIR));
|
||||
cbOutfit.setSelected(station.hasService(SERVICE_TYPE.OUTFIT));
|
||||
|
||||
@@ -43,6 +43,8 @@ public class SearchController {
|
||||
@FXML
|
||||
private CheckBox cbBlackMarket;
|
||||
@FXML
|
||||
private CheckBox cbRefuel;
|
||||
@FXML
|
||||
private CheckBox cbRepair;
|
||||
@FXML
|
||||
private CheckBox cbMunition;
|
||||
@@ -115,6 +117,7 @@ public class SearchController {
|
||||
filter.setDistance(distance.getValue().doubleValue());
|
||||
if (cbMarket.isSelected()) filter.add(SERVICE_TYPE.MARKET); else filter.remove(SERVICE_TYPE.MARKET);
|
||||
if (cbBlackMarket.isSelected()) filter.add(SERVICE_TYPE.BLACK_MARKET); else filter.remove(SERVICE_TYPE.BLACK_MARKET);
|
||||
if (cbRefuel.isSelected()) filter.add(SERVICE_TYPE.REFUEL); else filter.remove(SERVICE_TYPE.REFUEL);
|
||||
if (cbMunition.isSelected()) filter.add(SERVICE_TYPE.MUNITION); else filter.remove(SERVICE_TYPE.MUNITION);
|
||||
if (cbRepair.isSelected()) filter.add(SERVICE_TYPE.REPAIR); else filter.remove(SERVICE_TYPE.REPAIR);
|
||||
if (cbOutfit.isSelected()) filter.add(SERVICE_TYPE.OUTFIT); else filter.remove(SERVICE_TYPE.OUTFIT);
|
||||
|
||||
@@ -50,6 +50,8 @@ public class StationEditorController {
|
||||
@FXML
|
||||
private CheckBox cbMarket;
|
||||
@FXML
|
||||
private CheckBox cbRefuel;
|
||||
@FXML
|
||||
private CheckBox cbBlackMarket;
|
||||
@FXML
|
||||
private CheckBox cbRepair;
|
||||
@@ -101,6 +103,7 @@ public class StationEditorController {
|
||||
distance.numberProperty().bindBidirectional(updater.distanceProperty());
|
||||
cbMarket.selectedProperty().bindBidirectional(updater.serviceProperty(SERVICE_TYPE.MARKET));
|
||||
cbBlackMarket.selectedProperty().bindBidirectional(updater.serviceProperty(SERVICE_TYPE.BLACK_MARKET));
|
||||
cbRefuel.selectedProperty().bindBidirectional(updater.serviceProperty(SERVICE_TYPE.REFUEL));
|
||||
cbMunition.selectedProperty().bindBidirectional(updater.serviceProperty(SERVICE_TYPE.MUNITION));
|
||||
cbRepair.selectedProperty().bindBidirectional(updater.serviceProperty(SERVICE_TYPE.REPAIR));
|
||||
cbOutfit.selectedProperty().bindBidirectional(updater.serviceProperty(SERVICE_TYPE.OUTFIT));
|
||||
|
||||
@@ -25,6 +25,7 @@ services.REPAIR=Repair
|
||||
services.MUNITION=Munition
|
||||
services.OUTFIT=Outfit
|
||||
services.SHIPYARD=Shipyard
|
||||
services.REFUEL=Refuel
|
||||
services.MEDIUM_LANDPAD=Medium Pad
|
||||
services.LARGE_LANDPAD=Large Pad
|
||||
|
||||
|
||||
@@ -35,6 +35,8 @@ routes.path=Path
|
||||
routes.jumps=Jumps
|
||||
routes.refills=Refills
|
||||
routes.lands=Landings
|
||||
routes.time=Time
|
||||
routes.profitByTime=Cr/Sec
|
||||
|
||||
# Dialog
|
||||
dialog.confirm.save=Changes were not saved, save changes?
|
||||
|
||||
@@ -35,6 +35,8 @@ 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
|
||||
routes.time=\u0412\u0440\u0435\u043C\u044F
|
||||
routes.profitByTime=\u041A\u0440/\u0421\u0435\u043A
|
||||
|
||||
# Dialog
|
||||
dialog.confirm.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?
|
||||
|
||||
@@ -21,12 +21,13 @@ government.PRISON_COLONY=\u0422\u044E\u0440\u0435\u043C\u043D\u0430\u044F \u043A
|
||||
government.THEOCRACY=\u0422\u0435\u043E\u043A\u0440\u0430\u0442\u0438\u044F
|
||||
government.NONE=\u041D\u0435\u0442
|
||||
|
||||
services.MARKET=\u0420\u044B\u043D\u043E\u043A
|
||||
services.MARKET=\u041F\u0440\u0435\u0434\u043C\u0435\u0442\u044B \u043F\u043E\u0442\u0440\u0435\u0431\u043B\u0435\u043D\u0438\u044F
|
||||
services.BLACK_MARKET=\u0427\u0435\u0440\u043D\u044B\u0439 \u0440\u044B\u043D\u043E\u043A
|
||||
services.REPAIR=\u0420\u0435\u043C\u043E\u043D\u0442
|
||||
services.MUNITION=\u0411\u043E\u0435\u043F\u0440\u0438\u043F\u0430\u0441\u044B
|
||||
services.REPAIR=\u041F\u043E\u0447\u0438\u043D\u043A\u0430
|
||||
services.MUNITION=\u041F\u0435\u0440\u0435\u0432\u043E\u043E\u0440\u0443\u0436\u0435\u043D\u0438\u0435
|
||||
services.OUTFIT=\u0421\u043D\u0430\u0440\u044F\u0436\u0435\u043D\u0438\u044F
|
||||
services.SHIPYARD=\u041A\u043E\u0441\u043C\u043E\u0432\u0435\u0440\u0444\u044C
|
||||
services.REFUEL=\u0414\u043E\u0437\u0430\u043F\u0440\u0430\u0432\u043A\u0430
|
||||
services.MEDIUM_LANDPAD=\u0421\u0440\u0435\u0434\u043D\u044F\u044F
|
||||
services.LARGE_LANDPAD=\u0411\u043E\u043B\u044C\u0448\u0430\u044F
|
||||
item.group.chemicals=\u0425\u0438\u043C\u0438\u043A\u0430\u0442\u044B
|
||||
|
||||
@@ -1,18 +1,7 @@
|
||||
<?import javafx.scene.layout.GridPane?>
|
||||
<?import javafx.scene.layout.ColumnConstraints?>
|
||||
<?import javafx.scene.control.Label?>
|
||||
<?import ru.trader.view.support.NumberField?>
|
||||
|
||||
|
||||
<?import javafx.scene.control.CheckBox?>
|
||||
<?import javafx.scene.control.ComboBox?>
|
||||
<?import javafx.scene.layout.TilePane?>
|
||||
<?import javafx.scene.layout.VBox?>
|
||||
<?import javafx.scene.layout.HBox?>
|
||||
<?import javafx.scene.control.*?>
|
||||
<?import javafx.scene.layout.*?>
|
||||
<?import org.controlsfx.glyphfont.Glyph?>
|
||||
<?import javafx.scene.control.Button?>
|
||||
<?import javafx.scene.control.ListView?>
|
||||
<?import javafx.scene.control.TextField?>
|
||||
<?import ru.trader.view.support.NumberField?>
|
||||
<GridPane xmlns="http://javafx.com/javafx/8" xmlns:fx="http://javafx.com/fxml/1" fx:controller="ru.trader.controllers.FilterController"
|
||||
styleClass="dialog" vgap="4" hgap="8">
|
||||
<columnConstraints>
|
||||
@@ -27,9 +16,10 @@
|
||||
<Label text="%filter.distance" GridPane.rowIndex="3" />
|
||||
<NumberField fx:id="distance" GridPane.columnIndex="1" GridPane.rowIndex="3" />
|
||||
<Label text="%filter.services" GridPane.rowIndex="4" />
|
||||
<TilePane hgap="5" vgap="5" tileAlignment="BASELINE_LEFT" GridPane.columnIndex="1" GridPane.rowIndex="4" >
|
||||
<TilePane hgap="5" vgap="5" tileAlignment="BASELINE_LEFT" prefColumns="2" GridPane.columnIndex="1" GridPane.rowIndex="4" >
|
||||
<CheckBox fx:id="cbMarket" text="%services.MARKET"/>
|
||||
<CheckBox fx:id="cbBlackMarket" text="%services.BLACK_MARKET"/>
|
||||
<CheckBox fx:id="cbRefuel" text="%services.REFUEL"/>
|
||||
<CheckBox fx:id="cbRepair" text="%services.REPAIR"/>
|
||||
<CheckBox fx:id="cbMunition" text="%services.MUNITION"/>
|
||||
<CheckBox fx:id="cbOutfit" text="%services.OUTFIT"/>
|
||||
|
||||
@@ -36,16 +36,17 @@
|
||||
</HBox>
|
||||
<HBox spacing="4">
|
||||
<Label text="%offers.text.services"/>
|
||||
<HBox spacing="15">
|
||||
<TilePane hgap="5" vgap="5" prefColumns="5" tileAlignment="BASELINE_LEFT">
|
||||
<CheckBox fx:id="cbMarket" text="%services.MARKET"/>
|
||||
<CheckBox fx:id="cbBlackMarket" text="%services.BLACK_MARKET"/>
|
||||
<CheckBox fx:id="cbRefuel" text="%services.REFUEL"/>
|
||||
<CheckBox fx:id="cbRepair" text="%services.REPAIR"/>
|
||||
<CheckBox fx:id="cbMunition" text="%services.MUNITION"/>
|
||||
<CheckBox fx:id="cbOutfit" text="%services.OUTFIT"/>
|
||||
<CheckBox fx:id="cbShipyard" text="%services.SHIPYARD"/>
|
||||
<CheckBox fx:id="cbMediumLandpad" text="%services.MEDIUM_LANDPAD"/>
|
||||
<CheckBox fx:id="cbLargeLandpad" text="%services.LARGE_LANDPAD"/>
|
||||
</HBox>
|
||||
</TilePane>
|
||||
</HBox>
|
||||
</VBox>
|
||||
|
||||
|
||||
@@ -1,13 +1,11 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
|
||||
<?import javafx.geometry.*?>
|
||||
<?import javafx.geometry.Insets?>
|
||||
<?import javafx.scene.control.*?>
|
||||
<?import javafx.scene.control.cell.*?>
|
||||
<?import javafx.scene.layout.*?>
|
||||
|
||||
<?import javafx.scene.control.cell.PropertyValueFactory?>
|
||||
|
||||
<?import ru.trader.view.support.NumberField?>
|
||||
<?import ru.trader.view.support.cells.DistanceCell?>
|
||||
<?import ru.trader.view.support.NumberField?>
|
||||
<GridPane xmlns="http://javafx.com/javafx/8" xmlns:fx="http://javafx.com/fxml/1"
|
||||
fx:controller="ru.trader.controllers.SearchController">
|
||||
|
||||
@@ -35,9 +33,10 @@
|
||||
<Label text="%search.text.distance" GridPane.rowIndex="3" />
|
||||
<NumberField fx:id="distance" GridPane.columnIndex="1" GridPane.rowIndex="3" />
|
||||
<Label text="%filter.services" GridPane.rowIndex="4" />
|
||||
<TilePane hgap="5" vgap="5" tileAlignment="BASELINE_LEFT" GridPane.columnSpan="2" GridPane.rowIndex="5" >
|
||||
<TilePane hgap="5" vgap="5" tileAlignment="BASELINE_LEFT" prefColumns="2" GridPane.columnSpan="2" GridPane.rowIndex="5" >
|
||||
<CheckBox fx:id="cbMarket" text="%services.MARKET"/>
|
||||
<CheckBox fx:id="cbBlackMarket" text="%services.BLACK_MARKET"/>
|
||||
<CheckBox fx:id="cbRefuel" text="%services.REFUEL"/>
|
||||
<CheckBox fx:id="cbRepair" text="%services.REPAIR"/>
|
||||
<CheckBox fx:id="cbMunition" text="%services.MUNITION"/>
|
||||
<CheckBox fx:id="cbOutfit" text="%services.OUTFIT"/>
|
||||
|
||||
@@ -29,16 +29,23 @@
|
||||
</VBox>
|
||||
<VBox HBox.hgrow="ALWAYS" alignment="CENTER">
|
||||
<Label text="%vEditor.text.services"/>
|
||||
<TilePane hgap="5" vgap="5" maxWidth="350" tileAlignment="BASELINE_LEFT">
|
||||
<CheckBox fx:id="cbMarket" text="%services.MARKET"/>
|
||||
<CheckBox fx:id="cbBlackMarket" text="%services.BLACK_MARKET"/>
|
||||
<CheckBox fx:id="cbRepair" text="%services.REPAIR"/>
|
||||
<CheckBox fx:id="cbMunition" text="%services.MUNITION"/>
|
||||
<CheckBox fx:id="cbOutfit" text="%services.OUTFIT"/>
|
||||
<CheckBox fx:id="cbShipyard" text="%services.SHIPYARD"/>
|
||||
<CheckBox fx:id="cbMediumLandpad" text="%services.MEDIUM_LANDPAD"/>
|
||||
<CheckBox fx:id="cbLargeLandpad" text="%services.LARGE_LANDPAD"/>
|
||||
</TilePane>
|
||||
<HBox spacing="5" maxWidth="400">
|
||||
<VBox spacing="5">
|
||||
<CheckBox fx:id="cbMarket" text="%services.MARKET"/>
|
||||
<CheckBox fx:id="cbBlackMarket" text="%services.BLACK_MARKET"/>
|
||||
<CheckBox fx:id="cbRefuel" text="%services.REFUEL"/>
|
||||
</VBox>
|
||||
<VBox spacing="5">
|
||||
<CheckBox fx:id="cbRepair" text="%services.REPAIR"/>
|
||||
<CheckBox fx:id="cbMunition" text="%services.MUNITION"/>
|
||||
<CheckBox fx:id="cbOutfit" text="%services.OUTFIT"/>
|
||||
</VBox>
|
||||
<VBox spacing="5">
|
||||
<CheckBox fx:id="cbShipyard" text="%services.SHIPYARD"/>
|
||||
<CheckBox fx:id="cbMediumLandpad" text="%services.MEDIUM_LANDPAD"/>
|
||||
<CheckBox fx:id="cbLargeLandpad" text="%services.LARGE_LANDPAD"/>
|
||||
</VBox>
|
||||
</HBox>
|
||||
</VBox>
|
||||
</HBox>
|
||||
<VBox GridPane.rowIndex="3" alignment="CENTER" spacing="10">
|
||||
|
||||
Reference in New Issue
Block a user