mirror of
https://github.com/processing/processing4.git
synced 2026-06-16 04:26:26 +02:00
remove unused code
This commit is contained in:
@@ -84,8 +84,6 @@ public class Messages {
|
||||
System.out.println(title + ": " + message);
|
||||
|
||||
} else {
|
||||
// JOptionPane.showMessageDialog(new Frame(), message,
|
||||
// title, JOptionPane.WARNING_MESSAGE);
|
||||
if (!Platform.isMacOS()) {
|
||||
JOptionPane.showMessageDialog(new JFrame(),
|
||||
"<html><body>" +
|
||||
@@ -105,25 +103,8 @@ public class Messages {
|
||||
"<p>" + secondary + "</p>",
|
||||
JOptionPane.WARNING_MESSAGE);
|
||||
|
||||
// String[] options = new String[] {
|
||||
// "Yes", "No"
|
||||
// };
|
||||
// pane.setOptions(options);
|
||||
|
||||
// highlight the safest option ala apple hig
|
||||
// pane.setInitialValue(options[0]);
|
||||
|
||||
JDialog dialog = pane.createDialog(new JFrame(), null);
|
||||
dialog.setVisible(true);
|
||||
|
||||
// Object result = pane.getValue();
|
||||
// if (result == options[0]) {
|
||||
// return JOptionPane.YES_OPTION;
|
||||
// } else if (result == options[1]) {
|
||||
// return JOptionPane.NO_OPTION;
|
||||
// } else {
|
||||
// return JOptionPane.CLOSED_OPTION;
|
||||
// }
|
||||
}
|
||||
}
|
||||
if (e != null) e.printStackTrace();
|
||||
@@ -184,64 +165,6 @@ public class Messages {
|
||||
}
|
||||
|
||||
|
||||
// ...................................................................
|
||||
|
||||
|
||||
|
||||
/*
|
||||
// incomplete
|
||||
static public int showYesNoCancelQuestion(Editor editor, String title,
|
||||
String primary, String secondary) {
|
||||
if (!Platform.isMacOS()) {
|
||||
return JOptionPane.showConfirmDialog(null, primary + "\n" + secondary, title,
|
||||
JOptionPane.YES_NO_CANCEL_OPTION,
|
||||
JOptionPane.QUESTION_MESSAGE);
|
||||
|
||||
} else {
|
||||
// Pane formatting adapted from the Quaqua guide
|
||||
// http://www.randelshofer.ch/quaqua/guide/joptionpane.html
|
||||
JOptionPane pane =
|
||||
new JOptionPane("<html> " +
|
||||
"<head> <style type=\"text/css\">"+
|
||||
"b { font: 13pt \"Lucida Grande\" }"+
|
||||
"p { font: 11pt \"Lucida Grande\"; margin-top: 8px; width: 300px }"+
|
||||
"</style> </head>" +
|
||||
"<b>" + Language.text("save.title") + "</b>" +
|
||||
"<p>" + Language.text("save.hint") + "</p>",
|
||||
JOptionPane.QUESTION_MESSAGE);
|
||||
|
||||
String[] options = new String[] {
|
||||
Language.text("save.btn.save"),
|
||||
Language.text("prompt.cancel"),
|
||||
Language.text("save.btn.dont_save")
|
||||
};
|
||||
pane.setOptions(options);
|
||||
|
||||
// highlight the safest option ala apple hig
|
||||
pane.setInitialValue(options[0]);
|
||||
|
||||
// on macosx, setting the destructive property places this option
|
||||
// away from the others at the lefthand side
|
||||
pane.putClientProperty("Quaqua.OptionPane.destructiveOption", 2);
|
||||
|
||||
JDialog dialog = pane.createDialog(editor, null);
|
||||
dialog.setVisible(true);
|
||||
|
||||
Object result = pane.getValue();
|
||||
if (result == options[0]) {
|
||||
return JOptionPane.YES_OPTION;
|
||||
} else if (result == options[1]) {
|
||||
return JOptionPane.CANCEL_OPTION;
|
||||
} else if (result == options[2]) {
|
||||
return JOptionPane.NO_OPTION;
|
||||
} else {
|
||||
return JOptionPane.CLOSED_OPTION;
|
||||
}
|
||||
}
|
||||
}
|
||||
*/
|
||||
|
||||
|
||||
static public int showYesNoQuestion(Frame editor, String title,
|
||||
String primary, String secondary) {
|
||||
if (!Platform.isMacOS()) {
|
||||
|
||||
Reference in New Issue
Block a user