(Frame editor, String title,
String primary, String secondary)
| 151 | |
| 152 | |
| 153 | static public int showYesNoQuestion(Frame editor, String title, |
| 154 | String primary, String secondary) { |
| 155 | if (!Platform.isMacOS()) { |
| 156 | return JOptionPane.showConfirmDialog(editor, |
| 157 | Toolkit.formatMessage(primary, secondary), |
| 158 | //"<html><body>" + |
| 159 | //"<b>" + primary + "</b>" + |
| 160 | //"<br>" + secondary, |
| 161 | title, |
| 162 | JOptionPane.YES_NO_OPTION, |
| 163 | JOptionPane.QUESTION_MESSAGE); |
| 164 | } else { |
| 165 | int result = showCustomQuestion(editor, title, primary, secondary, |
| 166 | 0, "Yes", "No"); |
| 167 | if (result == 0) { |
| 168 | return JOptionPane.YES_OPTION; |
| 169 | } else if (result == 1) { |
| 170 | return JOptionPane.NO_OPTION; |
| 171 | } else { |
| 172 | return JOptionPane.CLOSED_OPTION; |
| 173 | } |
| 174 | } |
| 175 | } |
| 176 | |
| 177 | |
| 178 | /** |
no test coverage detected