MCPcopy Index your code
hub / github.com/processing/processing / showYesNoQuestion

Method showYesNoQuestion

app/src/processing/app/Messages.java:259–279  ·  view source on GitHub ↗
(Frame editor, String title,
                                      String primary, String secondary)

Source from the content-addressed store, hash-verified

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 /**

Callers 3

copyAndLoadMethod · 0.95
downloadImportsMethod · 0.95
stopTweakModeMethod · 0.95

Calls 2

isMacOSMethod · 0.95
showCustomQuestionMethod · 0.95

Tested by

no test coverage detected