Archived
0

add illegal only option to vendor filter

This commit is contained in:
Mo
2016-04-16 16:58:17 +03:00
parent 89c2c46365
commit 2981909d02
7 changed files with 27 additions and 4 deletions

View File

@@ -33,6 +33,8 @@ public class VendorFilterController {
private CheckBox cbDontBuy;
@FXML
private CheckBox cbSkipIllegal;
@FXML
private CheckBox cbIllegalOnly;
private VendorFilter filter;
private Dialog<VendorFilter> dlg;
@@ -89,6 +91,7 @@ public class VendorFilterController {
private void fill(VendorFilter filter){
this.filter = filter;
cbIllegalOnly.setSelected(filter.isIllegalOnly());
cbSkipIllegal.setSelected(filter.isSkipIllegal());
cbDontSell.setSelected(filter.isDontSell());
cbDontBuy.setSelected(filter.isDontBuy());
@@ -112,6 +115,7 @@ public class VendorFilterController {
private void save() {
LOG.trace("Old filter", filter);
filter.setIllegalOnly(cbIllegalOnly.isSelected());
filter.setSkipIllegal(cbSkipIllegal.isSelected());
filter.dontSell(cbDontSell.isSelected());
filter.dontBuy(cbDontBuy.isSelected());

View File

@@ -213,6 +213,7 @@ filter.stations.global=Default filter
# vFilter.fxml
filter.stations.legalOnly=Legals only
filter.stations.illegalOnly=Sell illegal only
filter.stations.notBuy=Don't buy
filter.stations.notSell=Don't sell
filter.stations.label.notBuy=Don't buy:

View File

@@ -213,6 +213,7 @@ filter.stations.global=\u0413\u043B\u043E\u0431\u0430\u043B\u044C\u043D\u044B\u0
# vFilter.fxml
filter.stations.legalOnly=\u0422\u043E\u043B\u044C\u043A\u043E \u043B\u0435\u0433\u0430\u043B\u044C\u043D\u044B\u0435
filter.stations.illegalOnly=\u0422\u043E\u043B\u044C\u043A\u043E \u043A\u043E\u043D\u0442\u0440\u0430\u0431\u0430\u043D\u0434\u0430
filter.stations.notBuy=\u041D\u0435 \u043F\u043E\u043A\u0443\u043F\u0430\u0442\u044C
filter.stations.notSell=\u041D\u0435 \u043F\u0440\u043E\u0434\u0430\u0432\u0430\u0442\u044C
filter.stations.label.notBuy=\u041D\u0435 \u043F\u043E\u043A\u0443\u043F\u0430\u0442\u044C:

View File

@@ -3,11 +3,13 @@
<VBox xmlns="http://javafx.com/javafx/8" xmlns:fx="http://javafx.com/fxml/1" fx:controller="ru.trader.controllers.VendorFilterController"
styleClass="dialog" spacing="10">
<HBox spacing="10">
<CheckBox fx:id="cbIllegalOnly" text="%filter.stations.illegalOnly"/>
<CheckBox fx:id="cbSkipIllegal" text="%filter.stations.legalOnly"/>
</HBox>
<HBox spacing="10">
<CheckBox fx:id="cbDontSell" text="%filter.stations.notBuy"/>
<CheckBox fx:id="cbDontBuy" text="%filter.stations.notSell"/>
</HBox>
<VBox spacing="4">
<Label text="%filter.stations.label.notBuy"/>
<ScrollPane maxHeight="200" maxWidth="400">