Merge branch 'features/r2_11_2_alphafold/JAL-629' into features/JAL-3858_PAEsInProjects
[jalview.git] / src / jalview / gui / EditNameDialog.java
index c976545..ff0fe3a 100644 (file)
  */
 package jalview.gui;
 
-import jalview.util.MessageManager;
-import jalview.util.dialogrunner.RunResponse;
-
 import java.awt.FlowLayout;
 import java.awt.Font;
+import java.util.concurrent.Callable;
 
 import javax.swing.BoxLayout;
 import javax.swing.JButton;
@@ -33,6 +31,8 @@ import javax.swing.JLabel;
 import javax.swing.JPanel;
 import javax.swing.JTextField;
 
+import jalview.util.MessageManager;
+
 /**
  * A dialog where a name and description may be edited
  */
@@ -40,6 +40,7 @@ public class EditNameDialog
 {
   private static final Font COURIER_12 = new Font("Courier", Font.PLAIN,
           12);
+
   JTextField id;
 
   JTextField description;
@@ -111,12 +112,11 @@ public class EditNameDialog
    * 
    * @param action
    */
-  public void showDialog(JComponent parent, String title,
-          RunResponse action)
+  public void showDialog(JComponent parent, String title, Callable action)
   {
     Object[] options = new Object[] { MessageManager.getString("action.ok"),
         MessageManager.getString("action.cancel") };
-    JvOptionPane.newOptionDialog(parent).addResponse(0, action)
+    JvOptionPane.newOptionDialog(parent).setResponseHandler(0, action)
             .showInternalDialog(panel, title,
                     JvOptionPane.YES_NO_CANCEL_OPTION,
                     JvOptionPane.PLAIN_MESSAGE, null, options,