From b34a0220312b1aa2ab34854dce078f316fafee7f Mon Sep 17 00:00:00 2001 From: Ben Fry Date: Tue, 3 Aug 2021 20:48:43 -0400 Subject: [PATCH] remove unused code --- app/src/processing/app/Messages.java | 77 ---------------------------- 1 file changed, 77 deletions(-) diff --git a/app/src/processing/app/Messages.java b/app/src/processing/app/Messages.java index dd0fce1fc..5257491ca 100644 --- a/app/src/processing/app/Messages.java +++ b/app/src/processing/app/Messages.java @@ -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(), "" + @@ -105,25 +103,8 @@ public class Messages { "

" + secondary + "

", 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(" " + - " " + - "" + Language.text("save.title") + "" + - "

" + Language.text("save.hint") + "

", - 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()) {