(String title, String message, String checkBoxText, final PropertyContext context, final String contextProp)
| 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) |
nothing calls this directly
no test coverage detected