fix filter dialog
This commit is contained in:
@@ -131,7 +131,11 @@ public class FilterController {
|
|||||||
return showDialog(parent, content, new MarketFilter());
|
return showDialog(parent, content, new MarketFilter());
|
||||||
}
|
}
|
||||||
|
|
||||||
public Optional<MarketFilter> showDialog(Parent parent, Parent content, MarketFilter filter){
|
public boolean showEditDialog(Parent parent, Parent content, MarketFilter filter){
|
||||||
|
return showDialog(parent, content, filter).isPresent();
|
||||||
|
}
|
||||||
|
|
||||||
|
private Optional<MarketFilter> showDialog(Parent parent, Parent content, MarketFilter filter){
|
||||||
if (dlg == null){
|
if (dlg == null){
|
||||||
createDialog(parent, content);
|
createDialog(parent, content);
|
||||||
}
|
}
|
||||||
@@ -164,7 +168,4 @@ public class FilterController {
|
|||||||
excludes.getItems().clear();
|
excludes.getItems().clear();
|
||||||
}
|
}
|
||||||
|
|
||||||
public MarketFilter getFilter(){
|
|
||||||
return filter;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -258,12 +258,9 @@ public class MainController {
|
|||||||
}
|
}
|
||||||
|
|
||||||
public void editFilter(){
|
public void editFilter(){
|
||||||
/*TODO: implement
|
if (Screeners.showFilter(market.getAnalyzer().getFilter())){
|
||||||
Optional<MarketFilter> res = Screeners.showFilter(market.getAnalyzer().getFilter());
|
Main.SETTINGS.setFilter(market.getAnalyzer().getFilter());
|
||||||
if (res.isPresent()){
|
|
||||||
Main.SETTINGS.setFilter(res.get());
|
|
||||||
}
|
}
|
||||||
*/
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public void impMadSystems(ActionEvent actionEvent) {
|
public void impMadSystems(ActionEvent actionEvent) {
|
||||||
|
|||||||
@@ -224,8 +224,8 @@ public class Screeners {
|
|||||||
return filterController.showDialog(mainScreen, filterScreen);
|
return filterController.showDialog(mainScreen, filterScreen);
|
||||||
}
|
}
|
||||||
|
|
||||||
public static Optional<MarketFilter> showFilter(MarketFilter filter) {
|
public static boolean showFilter(MarketFilter filter) {
|
||||||
return filterController.showDialog(mainScreen, filterScreen, filter);
|
return filterController.showEditDialog(mainScreen, filterScreen, filter);
|
||||||
}
|
}
|
||||||
|
|
||||||
public static Optional<Pair<String, String>> showLogin() {
|
public static Optional<Pair<String, String>> showLogin() {
|
||||||
|
|||||||
@@ -302,6 +302,10 @@ public class MarketAnalyzer {
|
|||||||
return vendors;
|
return vendors;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public MarketFilter getFilter(){
|
||||||
|
return market.getFilter();
|
||||||
|
}
|
||||||
|
|
||||||
public MarketAnalyzer newInstance(Profile profile, AnalysisCallBack callback){
|
public MarketAnalyzer newInstance(Profile profile, AnalysisCallBack callback){
|
||||||
return new MarketAnalyzer(market, profile, callback);
|
return new MarketAnalyzer(market, profile, callback);
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user