add by time checkbox
This commit is contained in:
@@ -1,6 +1,7 @@
|
|||||||
package ru.trader.controllers;
|
package ru.trader.controllers;
|
||||||
|
|
||||||
import javafx.fxml.FXML;
|
import javafx.fxml.FXML;
|
||||||
|
import javafx.scene.control.CheckBox;
|
||||||
import javafx.scene.control.ComboBox;
|
import javafx.scene.control.ComboBox;
|
||||||
import javafx.scene.control.ListView;
|
import javafx.scene.control.ListView;
|
||||||
import javafx.scene.control.TextField;
|
import javafx.scene.control.TextField;
|
||||||
@@ -24,6 +25,8 @@ public class RouteSearchController {
|
|||||||
@FXML
|
@FXML
|
||||||
private ComboBox<StationModel> toStation;
|
private ComboBox<StationModel> toStation;
|
||||||
@FXML
|
@FXML
|
||||||
|
private CheckBox cbFast;
|
||||||
|
@FXML
|
||||||
private ListView<MissionModel> missionsList;
|
private ListView<MissionModel> missionsList;
|
||||||
@FXML
|
@FXML
|
||||||
private MissionsController missionsController;
|
private MissionsController missionsController;
|
||||||
@@ -42,9 +45,9 @@ public class RouteSearchController {
|
|||||||
market = MainController.getMarket();
|
market = MainController.getMarket();
|
||||||
profile = MainController.getProfile();
|
profile = MainController.getProfile();
|
||||||
SystemsProvider provider = new SystemsProvider(market);
|
SystemsProvider provider = new SystemsProvider(market);
|
||||||
fromSystem = new AutoCompletion<>(fromSystemText, provider, provider.getConverter());
|
fromSystem = new AutoCompletion<>(fromSystemText, provider, ModelFabric.NONE_SYSTEM, provider.getConverter());
|
||||||
provider = new SystemsProvider(market);
|
provider = new SystemsProvider(market);
|
||||||
toSystem = new AutoCompletion<>(toSystemText, provider, provider.getConverter());
|
toSystem = new AutoCompletion<>(toSystemText, provider, ModelFabric.NONE_SYSTEM, provider.getConverter());
|
||||||
}
|
}
|
||||||
|
|
||||||
private void initListeners(){
|
private void initListeners(){
|
||||||
@@ -73,6 +76,7 @@ public class RouteSearchController {
|
|||||||
StationModel tS = toStation.getValue();
|
StationModel tS = toStation.getValue();
|
||||||
|
|
||||||
CrawlerSpecificator specificator = new CrawlerSpecificator();
|
CrawlerSpecificator specificator = new CrawlerSpecificator();
|
||||||
|
specificator.setByTime(cbFast.isSelected());
|
||||||
missionsList.getItems().forEach(m -> m.toSpecification(specificator));
|
missionsList.getItems().forEach(m -> m.toSpecification(specificator));
|
||||||
market.getRoutes(f, fS, t, tS, profile.getBalance(), specificator, routes -> {
|
market.getRoutes(f, fS, t, tS, profile.getBalance(), specificator, routes -> {
|
||||||
Optional<RouteModel> path = Screeners.showRouters(routes);
|
Optional<RouteModel> path = Screeners.showRouters(routes);
|
||||||
|
|||||||
@@ -23,6 +23,7 @@
|
|||||||
<ComboBox fx:id="toStation" />
|
<ComboBox fx:id="toStation" />
|
||||||
<Button onAction="#loop"/>
|
<Button onAction="#loop"/>
|
||||||
</HBox>
|
</HBox>
|
||||||
|
<CheckBox fx:id="cbFast" text="Быстрый"/>
|
||||||
<Button prefWidth="80" text="Найти" onAction="#search" />
|
<Button prefWidth="80" text="Найти" onAction="#search" />
|
||||||
</HBox>
|
</HBox>
|
||||||
<VBox>
|
<VBox>
|
||||||
|
|||||||
Reference in New Issue
Block a user