(Frame editor, String title,
String primary, String secondary)
| 257 | |
| 258 | |
| 259 | static public int showYesNoQuestion(Frame editor, String title, |
| 260 | String primary, String secondary) { |
| 261 | if (!Platform.isMacOS()) { |
| 262 | return JOptionPane.showConfirmDialog(editor, |
| 263 | "<html><body>" + |
| 264 | "<b>" + primary + "</b>" + |
| 265 | "<br>" + secondary, title, |
| 266 | JOptionPane.YES_NO_OPTION, |
| 267 | JOptionPane.QUESTION_MESSAGE); |
| 268 | } else { |
| 269 | int result = showCustomQuestion(editor, title, primary, secondary, |
| 270 | 0, "Yes", "No"); |
| 271 | if (result == 0) { |
| 272 | return JOptionPane.YES_OPTION; |
| 273 | } else if (result == 1) { |
| 274 | return JOptionPane.NO_OPTION; |
| 275 | } else { |
| 276 | return JOptionPane.CLOSED_OPTION; |
| 277 | } |
| 278 | } |
| 279 | } |
| 280 | |
| 281 | |
| 282 | /** |
no test coverage detected