MCPcopy Index your code
hub / github.com/benfry/processing4 / showYesNoQuestion

Method showYesNoQuestion

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

Source from the content-addressed store, hash-verified

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

Callers 3

openContribBundleMethod · 0.95
downloadImportsMethod · 0.95
stopTweakModeMethod · 0.95

Calls 3

isMacOSMethod · 0.95
formatMessageMethod · 0.95
showCustomQuestionMethod · 0.95

Tested by

no test coverage detected