MCPcopy Create free account
hub / github.com/PCGen/pcgen / showGeneralChooser

Method showGeneralChooser

code/src/java/pcgen/gui2/PCGenFrame.java:1463–1487  ·  view source on GitHub ↗
(ChooserFacade chooserFacade)

Source from the content-addressed store, hash-verified

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

Callers

nothing calls this directly

Calls 8

getChoiceHandlerMethod · 0.95
setVisibleMethod · 0.95
isCommittedMethod · 0.95
isPresentMethod · 0.80
makeChoiceMethod · 0.80
getMethod · 0.65

Tested by

no test coverage detected