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

Class ConsoleUIDelegate

code/src/java/pcgen/system/ConsoleUIDelegate.java:38–104  ·  view source on GitHub ↗

The Class ConsoleUIDelegate displays messages to the console and returns default choices. It is used when PCGen is running in batch mode without any windows shown.

Source from the content-addressed store, hash-verified

36 *
37 */
38public class ConsoleUIDelegate implements UIDelegate
39{
40
41 @Override
42 public Boolean maybeShowWarningConfirm(String title, String message, String checkBoxText, PropertyContext context,
43 String contextProp)
44 {
45 Logging.log(Logging.WARNING, title + " - " + message);
46 return false;
47 }
48
49 @Override
50 public void showErrorMessage(String title, String message)
51 {
52 Logging.log(Logging.ERROR, title + " - " + message);
53 }
54
55 @Override
56 public void showInfoMessage(String title, String message)
57 {
58 Logging.log(Logging.INFO, title + " - " + message);
59 }
60
61 @Override
62 public void showLevelUpInfo(CharacterFacade character, int oldLevel)
63 {
64 Logging.log(Logging.INFO, "Level up from " + oldLevel + " complete for character " + character);
65 }
66
67 @Override
68 public boolean showWarningConfirm(String title, String message)
69 {
70 Logging.log(Logging.WARNING, title + " - " + message);
71 return true;
72 }
73
74 @Override
75 public void showWarningMessage(String title, String message)
76 {
77 Logging.log(Logging.WARNING, title + " - " + message);
78 }
79
80 @Override
81 public boolean showGeneralChooser(ChooserFacade chooserFacade)
82 {
83 return false;
84 }
85
86 @Override
87 public Optional<String> showInputDialog(String title, String message, String initialValue)
88 {
89 return Optional.empty();
90 }
91
92 @Override
93 public CustomEquipResult showCustomEquipDialog(CharacterFacade character, EquipmentBuilderFacade equipBuilder)
94 {
95 return CustomEquipResult.CANCELLED;

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected