(ChooserFacade chooserFacade)
| 1461 | } |
| 1462 | |
| 1463 | @Override |
| 1464 | public boolean showGeneralChooser(ChooserFacade chooserFacade) |
| 1465 | { |
| 1466 | // Check for an override of the chooser to be used |
| 1467 | Optional<RandomChooser> choiceHandler = ChooserFactory.getChoiceHandler(); |
| 1468 | if (choiceHandler.isPresent()) |
| 1469 | { |
| 1470 | return choiceHandler.get().makeChoice(chooserFacade); |
| 1471 | } |
| 1472 | |
| 1473 | if (chooserFacade.isPreferRadioSelection() && chooserFacade.getRemainingSelections().get() == 1) |
| 1474 | { |
| 1475 | RadioChooserDialog dialog = new RadioChooserDialog(this, chooserFacade); |
| 1476 | dialog.setLocationRelativeTo(this); |
| 1477 | dialog.setVisible(true); |
| 1478 | return dialog.isCommitted(); |
| 1479 | } |
| 1480 | else |
| 1481 | { |
| 1482 | ChooserDialog dialog = new ChooserDialog(this, chooserFacade); |
| 1483 | dialog.setLocationRelativeTo(this); |
| 1484 | dialog.setVisible(true); |
| 1485 | return dialog.isCommitted(); |
| 1486 | } |
| 1487 | } |
| 1488 | |
| 1489 | /* |
| 1490 | * This thread does all work of loading sources that the user |
nothing calls this directly
no test coverage detected