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

Method maybeShowWarningConfirm

code/src/java/pcgen/gui2/PCGenFrame.java:1384–1398  ·  view source on GitHub ↗
(String title, String message, String checkBoxText,
		final PropertyContext context, final String contextProp)

Source from the content-addressed store, hash-verified

1382 }
1383
1384 @Override
1385 public Boolean maybeShowWarningConfirm(String title, String message, String checkBoxText,
1386 final PropertyContext context, final String contextProp)
1387 {
1388 if (!context.getBoolean(contextProp, true))
1389 {
1390 return null;
1391 }
1392 final JCheckBox checkBox = new JCheckBox(checkBoxText, true);
1393 checkBox.addItemListener(e -> context.setBoolean(contextProp, checkBox.isSelected()));
1394 JPanel panel = buildMessageLabelPanel(message, checkBox);
1395 int ret = JOptionPane.showConfirmDialog(this, panel, title, JOptionPane.YES_NO_OPTION,
1396 JOptionPane.WARNING_MESSAGE);
1397 return ret == JOptionPane.YES_OPTION;
1398 }
1399
1400 @Override
1401 public boolean showWarningConfirm(String title, String message)

Callers

nothing calls this directly

Calls 3

getBooleanMethod · 0.80
setBooleanMethod · 0.80

Tested by

no test coverage detected